From 43910e474b14c2b93ea37434a47e17fd4370960f Mon Sep 17 00:00:00 2001 From: Lioncash Date: Mon, 16 Jan 2017 16:21:01 -0500 Subject: [PATCH] IR_X86: Use member initializers where applicable for RegInfo --- Source/Core/Core/PowerPC/Jit64IL/IR_X86.cpp | 20 ++++++++------------ 1 file changed, 8 insertions(+), 12 deletions(-) diff --git a/Source/Core/Core/PowerPC/Jit64IL/IR_X86.cpp b/Source/Core/Core/PowerPC/Jit64IL/IR_X86.cpp index 9427ebf78e..a9107b1e81 100644 --- a/Source/Core/Core/PowerPC/Jit64IL/IR_X86.cpp +++ b/Source/Core/Core/PowerPC/Jit64IL/IR_X86.cpp @@ -54,7 +54,7 @@ struct RegInfo final : private NonCopyable static constexpr size_t MAX_NUMBER_OF_REGS = 16; JitIL* Jit; - IRBuilder* Build; + IRBuilder* Build = nullptr; InstLoc FirstI; // IInfo contains (per instruction) @@ -66,22 +66,18 @@ struct RegInfo final : private NonCopyable // and if we can clobber the operands registers. // Warning, Memory instruction use these bits slightly differently. // Bits 15-31: Spill location - std::vector IInfo; + std::vector IInfo; // The last instruction which uses the result of this instruction. Used by the register allocator. std::vector lastUsed; - std::array regs; - std::array fregs; - unsigned numSpills; - unsigned numFSpills; - unsigned exitNumber; + std::array regs{}; + std::array fregs{}; + u32 numSpills = 0; + u32 numFSpills = 0; + u32 exitNumber = 0; - RegInfo(JitIL* j, InstLoc f, unsigned insts) - : Jit(j), Build(nullptr), FirstI(f), IInfo(insts), lastUsed(insts), regs(), fregs(), - numSpills(0), numFSpills(0), exitNumber(0) - { - } + RegInfo(JitIL* j, InstLoc f, u32 insts) : Jit(j), FirstI(f), IInfo(insts), lastUsed(insts) {} }; static BitSet32 regsInUse(RegInfo& R)