diff options
author | Evan Cheng <evan.cheng@apple.com> | 2009-06-14 20:22:55 +0000 |
---|---|---|
committer | Evan Cheng <evan.cheng@apple.com> | 2009-06-14 20:22:55 +0000 |
commit | 90f95f88c6ce09c6744777dc9d140c3c77203b92 (patch) | |
tree | 3996a490bf685eea1de9b1579d28f69500dbf8a6 /lib/CodeGen/VirtRegMap.h | |
parent | caf6b2bbaf40580596e974b5eee0a7e59b58bd98 (diff) | |
download | external_llvm-90f95f88c6ce09c6744777dc9d140c3c77203b92.zip external_llvm-90f95f88c6ce09c6744777dc9d140c3c77203b92.tar.gz external_llvm-90f95f88c6ce09c6744777dc9d140c3c77203b92.tar.bz2 |
Move register allocation preference (or hint) from LiveInterval to MachineRegisterInfo. This allows more passes to set them.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73346 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/VirtRegMap.h')
-rw-r--r-- | lib/CodeGen/VirtRegMap.h | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/CodeGen/VirtRegMap.h b/lib/CodeGen/VirtRegMap.h index 507557d..fe767b7 100644 --- a/lib/CodeGen/VirtRegMap.h +++ b/lib/CodeGen/VirtRegMap.h @@ -31,6 +31,7 @@ namespace llvm { class LiveIntervals; class MachineInstr; class MachineFunction; + class MachineRegisterInfo; class TargetInstrInfo; class TargetRegisterInfo; @@ -47,6 +48,7 @@ namespace llvm { std::pair<unsigned, ModRef> > MI2VirtMapTy; private: + MachineRegisterInfo *MRI; const TargetInstrInfo *TII; const TargetRegisterInfo *TRI; MachineFunction *MF; @@ -190,6 +192,9 @@ namespace llvm { grow(); } + /// @brief returns the register allocation preference. + unsigned getRegAllocPref(unsigned virtReg); + /// @brief records virtReg is a split live interval from SReg. void setIsSplitFromReg(unsigned virtReg, unsigned SReg) { Virt2SplitMap[virtReg] = SReg; @@ -445,8 +450,7 @@ namespace llvm { /// FindUnusedRegisters - Gather a list of allocatable registers that /// have not been allocated to any virtual register. - bool FindUnusedRegisters(const TargetRegisterInfo *TRI, - LiveIntervals* LIs); + bool FindUnusedRegisters(LiveIntervals* LIs); /// HasUnusedRegisters - Return true if there are any allocatable registers /// that have not been allocated to any virtual register. |