Index: src/IceTargetLoweringX8632.h |
diff --git a/src/IceTargetLoweringX8632.h b/src/IceTargetLoweringX8632.h |
index 7422f8a243916a9444cf78fe5564b41b609c17f6..985d3ae6a3e5c2cb6c5a0d0ddaa101e538ca28cb 100644 |
--- a/src/IceTargetLoweringX8632.h |
+++ b/src/IceTargetLoweringX8632.h |
@@ -484,10 +484,20 @@ protected: |
SizeT NextLabelNumber; |
bool ComputedLiveRanges; |
VarList PhysicalRegisters[IceType_NUM]; |
+ VarList FakeKilledScratchRegisters; |
static IceString RegNames[]; |
private: |
~TargetX8632() override {} |
+ // Ideally, this initialization would be done in the constructor, |
+ // but we need to defer it until after the initial CFG is built, |
+ // because some of the bitcode reader tests rely on the order that |
+ // Variables are created and their default printable names. |
+ void initFakeKilledScratchRegisters() { |
+ for (SizeT I = 0; I < ScratchRegs.size(); ++I) |
+ if (ScratchRegs[I]) |
+ FakeKilledScratchRegisters.push_back(getPhysicalRegister(I)); |
+ } |
template <typename T> void emitConstantPool() const; |
}; |