summaryrefslogtreecommitdiff
path: root/lib/CodeGen/VirtRegMap.h
diff options
context:
space:
mode:
authorEvan Cheng <evan.cheng@apple.com>2008-03-11 21:34:46 +0000
committerEvan Cheng <evan.cheng@apple.com>2008-03-11 21:34:46 +0000
commitc1f53c742620dd4f2460685477303002bba8a8d8 (patch)
tree2f56ff10470c4e84228abd285d7b6aae291e1f4a /lib/CodeGen/VirtRegMap.h
parent9736028d84de3a72dd8db5f49cfaa07280154a0e (diff)
downloadllvm-c1f53c742620dd4f2460685477303002bba8a8d8.tar.gz
llvm-c1f53c742620dd4f2460685477303002bba8a8d8.tar.bz2
llvm-c1f53c742620dd4f2460685477303002bba8a8d8.tar.xz
Transfer physical register spill info when load / store folding happens.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48246 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/VirtRegMap.h')
-rw-r--r--lib/CodeGen/VirtRegMap.h17
1 files changed, 17 insertions, 0 deletions
diff --git a/lib/CodeGen/VirtRegMap.h b/lib/CodeGen/VirtRegMap.h
index 7ebf31eeff..63d5b87b26 100644
--- a/lib/CodeGen/VirtRegMap.h
+++ b/lib/CodeGen/VirtRegMap.h
@@ -268,6 +268,8 @@ namespace llvm {
}
}
+ /// @brief - transfer spill point information from one instruction to
+ /// another.
void transferSpillPts(MachineInstr *Old, MachineInstr *New) {
std::map<MachineInstr*,std::vector<std::pair<unsigned,bool> > >::iterator
I = SpillPt2VirtMap.find(Old);
@@ -343,6 +345,21 @@ namespace llvm {
return EmergencySpillMap[MI];
}
+ /// @brief - transfer emergency spill information from one instruction to
+ /// another.
+ void transferEmergencySpills(MachineInstr *Old, MachineInstr *New) {
+ std::map<MachineInstr*,std::vector<unsigned> >::iterator I =
+ EmergencySpillMap.find(Old);
+ if (I == EmergencySpillMap.end())
+ return;
+ while (!I->second.empty()) {
+ unsigned virtReg = I->second.back();
+ I->second.pop_back();
+ addEmergencySpill(virtReg, New);
+ }
+ EmergencySpillMap.erase(I);
+ }
+
/// @brief return or get a emergency spill slot for the register class.
int getEmergencySpillSlot(const TargetRegisterClass *RC);