aboutsummaryrefslogtreecommitdiffstats
path: root/include/llvm/CodeGen/MachineRegisterInfo.h
diff options
context:
space:
mode:
authorJakob Stoklund Olesen <stoklund@2pi.dk>2012-01-16 22:34:08 +0000
committerJakob Stoklund Olesen <stoklund@2pi.dk>2012-01-16 22:34:08 +0000
commitc035c940a656f34a58ebe22fcc5f9b2a7d8e97fb (patch)
treedafece65a47d774ec131ca06120699dca710bb33 /include/llvm/CodeGen/MachineRegisterInfo.h
parent61425c0a7f4e3608a85f7bbf254cd052a15b7446 (diff)
downloadexternal_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.h10
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
//===--------------------------------------------------------------------===//