diff options
author | Jakob Stoklund Olesen <stoklund@2pi.dk> | 2012-01-16 22:34:08 +0000 |
---|---|---|
committer | Jakob Stoklund Olesen <stoklund@2pi.dk> | 2012-01-16 22:34:08 +0000 |
commit | c035c940a656f34a58ebe22fcc5f9b2a7d8e97fb (patch) | |
tree | dafece65a47d774ec131ca06120699dca710bb33 /include/llvm/CodeGen/MachineRegisterInfo.h | |
parent | 61425c0a7f4e3608a85f7bbf254cd052a15b7446 (diff) | |
download | external_llvm-c035c940a656f34a58ebe22fcc5f9b2a7d8e97fb.zip external_llvm-c035c940a656f34a58ebe22fcc5f9b2a7d8e97fb.tar.gz external_llvm-c035c940a656f34a58ebe22fcc5f9b2a7d8e97fb.tar.bz2 |
Extract method for detecting constant unallocatable physregs.
It is safe to move uses of such registers.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@148259 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/CodeGen/MachineRegisterInfo.h')
-rw-r--r-- | include/llvm/CodeGen/MachineRegisterInfo.h | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/include/llvm/CodeGen/MachineRegisterInfo.h b/include/llvm/CodeGen/MachineRegisterInfo.h index 34d454e..b121dc5 100644 --- a/include/llvm/CodeGen/MachineRegisterInfo.h +++ b/include/llvm/CodeGen/MachineRegisterInfo.h @@ -64,6 +64,9 @@ class MachineRegisterInfo { /// started. BitVector ReservedRegs; + /// AllocatableRegs - From TRI->getAllocatableSet. + mutable BitVector AllocatableRegs; + /// LiveIns/LiveOuts - Keep track of the physical registers that are /// livein/liveout of the function. Live in values are typically arguments in /// registers, live out values are typically return values in registers. @@ -215,7 +218,12 @@ public: #ifndef NDEBUG void dumpUses(unsigned RegNo) const; #endif - + + /// isConstantPhysReg - Returns true if PhysReg is unallocatable and constant + /// throughout the function. It is safe to move instructions that read such + /// a physreg. + bool isConstantPhysReg(unsigned PhysReg, const MachineFunction &MF) const; + //===--------------------------------------------------------------------===// // Virtual Register Info //===--------------------------------------------------------------------===// |