llvm.org GIT mirror llvm / e83a275
All remat'ed loads cannot be folded into two-address code. Not just argument loads. This change doesn't really have any impact on codegen. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47557 91177308-0d34-0410-b5e6-96231b3b80d8 Evan Cheng 12 years ago
1 changed file(s) with 4 addition(s) and 4 deletion(s). Raw diff Collapse all Expand all
788788 /// folding is possible.
789789 bool LiveIntervals::canFoldMemoryOperand(MachineInstr *MI,
790790 SmallVector &Ops,
791 bool ReMatLoadSS) const {
791 bool ReMatLoad) const {
792792 // Filter the list of operand indexes that are to be folded. Abort if
793793 // any operand will prevent folding.
794794 unsigned MRInfo = 0;
796796 if (FilterFoldedOps(MI, Ops, MRInfo, FoldOps))
797797 return false;
798798
799 // Can't fold a load from fixed stack slot into a two address instruction.
800 if (ReMatLoadSS && (MRInfo & VirtRegMap::isMod))
799 // Can't fold a remat'ed load into a two address instruction.
800 if (ReMatLoad && (MRInfo & VirtRegMap::isMod))
801801 return false;
802802
803803 return tii_->canFoldMemoryOperand(MI, FoldOps);
950950 goto RestartInstruction;
951951 }
952952 } else {
953 CanFold = canFoldMemoryOperand(MI, Ops, DefIsReMat && isLoadSS);
953 CanFold = canFoldMemoryOperand(MI, Ops, DefIsReMat && isLoad);
954954 }
955955 } else
956956 CanFold = false;