aboutsummaryrefslogtreecommitdiffstats
path: root/include/llvm/CodeGen/MachineRegisterInfo.h
diff options
context:
space:
mode:
authorJakob Stoklund Olesen <stoklund@2pi.dk>2010-05-11 20:30:28 +0000
committerJakob Stoklund Olesen <stoklund@2pi.dk>2010-05-11 20:30:28 +0000
commit82b07dc4995d48065bd95affff4d8513a5cad4f2 (patch)
tree6b6af716b38928b7be1e04fa7e0dceb3c1903251 /include/llvm/CodeGen/MachineRegisterInfo.h
parentd42718080f1f140726220563d741261fd7f661c5 (diff)
downloadexternal_llvm-82b07dc4995d48065bd95affff4d8513a5cad4f2.zip
external_llvm-82b07dc4995d48065bd95affff4d8513a5cad4f2.tar.gz
external_llvm-82b07dc4995d48065bd95affff4d8513a5cad4f2.tar.bz2
Simplify the tracking of used physregs to a bulk bitor followed by a transitive
closure after allocating all blocks. Add a few more test cases for -regalloc=fast. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103500 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/CodeGen/MachineRegisterInfo.h')
-rw-r--r--include/llvm/CodeGen/MachineRegisterInfo.h11
1 files changed, 9 insertions, 2 deletions
diff --git a/include/llvm/CodeGen/MachineRegisterInfo.h b/include/llvm/CodeGen/MachineRegisterInfo.h
index b377dec..905be96 100644
--- a/include/llvm/CodeGen/MachineRegisterInfo.h
+++ b/include/llvm/CodeGen/MachineRegisterInfo.h
@@ -229,11 +229,18 @@ public:
/// setPhysRegUsed - Mark the specified register used in this function.
/// This should only be called during and after register allocation.
void setPhysRegUsed(unsigned Reg) { UsedPhysRegs[Reg] = true; }
-
+
+ /// addPhysRegsUsed - Mark the specified registers used in this function.
+ /// This should only be called during and after register allocation.
+ void addPhysRegsUsed(const BitVector &Regs) { UsedPhysRegs |= Regs; }
+
/// setPhysRegUnused - Mark the specified register unused in this function.
/// This should only be called during and after register allocation.
void setPhysRegUnused(unsigned Reg) { UsedPhysRegs[Reg] = false; }
-
+
+ /// closePhysRegsUsed - Expand UsedPhysRegs to its transitive closure over
+ /// subregisters. That means that if R is used, so are all subregisters.
+ void closePhysRegsUsed(const TargetRegisterInfo&);
//===--------------------------------------------------------------------===//
// LiveIn/LiveOut Management