Replace M_REMATERIALIZIBLE and the newly-added isOtherReMaterializableLoad
[oota-llvm.git] / lib / CodeGen / LiveIntervalAnalysis.cpp
index aae27bb882d2511a676e06bbfb5b16fbe58047e5..34134520d65460f6b2c36e001e66eeed5fb1b654 100644 (file)
@@ -336,14 +336,13 @@ void LiveIntervals::handleVirtualRegisterDef(MachineBasicBlock *mbb,
   // time we see a vreg.
   if (interval.empty()) {
     // Remember if the definition can be rematerialized. All load's from fixed
-    // stack slots are re-materializable. The target may permit other loads to
-    // be re-materialized as well.
+    // stack slots are re-materializable. The target may permit other
+    // instructions to be re-materialized as well.
     int FrameIdx = 0;
     if (vi.DefInst &&
-        (tii_->isReMaterializable(vi.DefInst->getOpcode()) ||
+        (tii_->isTriviallyReMaterializable(vi.DefInst) ||
          (tii_->isLoadFromStackSlot(vi.DefInst, FrameIdx) &&
-          mf_->getFrameInfo()->isFixedObjectIndex(FrameIdx)) ||
-         tii_->isOtherReMaterializableLoad(vi.DefInst)))
+          mf_->getFrameInfo()->isFixedObjectIndex(FrameIdx))))
       interval.remat = vi.DefInst;
 
     // Get the Idx of the defining instructions.