diff options
Diffstat (limited to 'lib/CodeGen/VirtRegMap.h')
-rw-r--r-- | lib/CodeGen/VirtRegMap.h | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/lib/CodeGen/VirtRegMap.h b/lib/CodeGen/VirtRegMap.h index 7ebf31e..63d5b87 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); |