Make load->store deletion a bit smarter. This allows us to compile this:
[oota-llvm.git] / lib / CodeGen / MachineLICM.cpp
index 94e10611226d84e7535fd0fd064edc46b82bb5dd..04211aba97cbbad846190f8cfdb93d5d3706ba74 100644 (file)
@@ -225,23 +225,21 @@ void MachineLICM::HoistRegion(MachineDomTreeNode *N) {
 bool MachineLICM::IsLoopInvariantInst(MachineInstr &I) {
   DEBUG({
       DOUT << "--- Checking if we can hoist " << I;
-      if (I.getInstrDescriptor()->ImplicitUses) {
+      if (I.getDesc().getImplicitUses()) {
         DOUT << "  * Instruction has implicit uses:\n";
 
         const MRegisterInfo *MRI = TM->getRegisterInfo();
-        const unsigned *ImpUses = I.getInstrDescriptor()->ImplicitUses;
-
-        for (; *ImpUses; ++ImpUses)
+        for (const unsigned *ImpUses = I.getDesc().getImplicitUses();
+             *ImpUses; ++ImpUses)
           DOUT << "      -> " << MRI->getName(*ImpUses) << "\n";
       }
 
-      if (I.getInstrDescriptor()->ImplicitDefs) {
+      if (I.getDesc().getImplicitDefs()) {
         DOUT << "  * Instruction has implicit defines:\n";
 
         const MRegisterInfo *MRI = TM->getRegisterInfo();
-        const unsigned *ImpDefs = I.getInstrDescriptor()->ImplicitDefs;
-
-        for (; *ImpDefs; ++ImpDefs)
+        for (const unsigned *ImpDefs = I.getDesc().getImplicitDefs();
+             *ImpDefs; ++ImpDefs)
           DOUT << "      -> " << MRI->getName(*ImpDefs) << "\n";
       }