diff options
author | Chris Lattner <sabre@nondot.org> | 2006-02-02 20:12:32 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2006-02-02 20:12:32 +0000 |
commit | 408396014742a05cad1c91949d2226169e3f9d80 (patch) | |
tree | bcd6c4a3a88b934ee998a89cdf6a7ec1d9b03bf7 /lib/CodeGen/VirtRegMap.cpp | |
parent | af9fa2bd0c1ee25f3adda96b3e5d7129fbab393a (diff) |
Move isLoadFrom/StoreToStackSlot from MRegisterInfo to TargetInstrInfo,a far more logical place. Other methods should also be moved if anyoneis interested. :)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25913 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/VirtRegMap.cpp')
-rw-r--r-- | lib/CodeGen/VirtRegMap.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/CodeGen/VirtRegMap.cpp b/lib/CodeGen/VirtRegMap.cpp index 8a4574460c..313452dd9a 100644 --- a/lib/CodeGen/VirtRegMap.cpp +++ b/lib/CodeGen/VirtRegMap.cpp @@ -490,8 +490,9 @@ void LocalSpiller::RewriteMBB(MachineBasicBlock &MBB, const VirtRegMap &VRM) { // straight load from the virt reg slot. if ((MR & VirtRegMap::isRef) && !(MR & VirtRegMap::isMod)) { int FrameIdx; - if (unsigned DestReg = MRI->isLoadFromStackSlot(&MI, FrameIdx)) { - // If this spill slot is available, insert a copy for it! + if (unsigned DestReg = TII->isLoadFromStackSlot(&MI, FrameIdx)) { + // If this spill slot is available, turn it into a copy (or nothing) + // instead of leaving it as a load! std::map<int, unsigned>::iterator It = SpillSlotsAvailable.find(SS); if (FrameIdx == SS && It != SpillSlotsAvailable.end()) { DEBUG(std::cerr << "Promoted Load To Copy: " << MI); |