Only remat loads from immutable stack slots.
authorEvan Cheng <evan.cheng@apple.com>
Thu, 10 Jan 2008 08:24:38 +0000 (08:24 +0000)
committerEvan Cheng <evan.cheng@apple.com>
Thu, 10 Jan 2008 08:24:38 +0000 (08:24 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45831 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/LiveIntervalAnalysis.cpp

index 80920405de471144a1f985ca14ec3f07548f239c..da76269c68ffc57306fb912a6783ae6b200f2d49 100644 (file)
@@ -624,7 +624,7 @@ bool LiveIntervals::isReMaterializable(const LiveInterval &li,
 
   int FrameIdx = 0;
   if (!tii_->isLoadFromStackSlot(MI, FrameIdx) ||
-      !mf_->getFrameInfo()->isFixedObjectIndex(FrameIdx))
+      !mf_->getFrameInfo()->isImmutableObjectIndex(FrameIdx))
     return false;
 
   // This is a load from fixed stack slot. It can be rematerialized unless it's
@@ -719,7 +719,7 @@ bool LiveIntervals::tryFoldMemoryOperand(MachineInstr* &MI,
     else
       LiveVariables::transferKillDeadInfo(MI, fmi, mri_);
     MachineBasicBlock &MBB = *MI->getParent();
-    if (isSS && !mf_->getFrameInfo()->isFixedObjectIndex(Slot))
+    if (isSS && !mf_->getFrameInfo()->isImmutableObjectIndex(Slot))
       vrm.virtFolded(Reg, MI, fmi, (VirtRegMap::ModRef)MRInfo);
     vrm.transferSpillPts(MI, fmi);
     vrm.transferRestorePts(MI, fmi);