summaryrefslogtreecommitdiff
path: root/include/llvm/CodeGen/RegisterScavenging.h
diff options
context:
space:
mode:
authorJakob Stoklund Olesen <stoklund@2pi.dk>2009-08-18 21:14:54 +0000
committerJakob Stoklund Olesen <stoklund@2pi.dk>2009-08-18 21:14:54 +0000
commitc0823fe7c679ca8f7d1667a310c2fca97b9402d5 (patch)
tree2106aeae81f3562cd04d6387d271ab62e0770706 /include/llvm/CodeGen/RegisterScavenging.h
parent1123135dbfa776bbe4c2120a16098d81e0850a76 (diff)
downloadllvm-c0823fe7c679ca8f7d1667a310c2fca97b9402d5.tar.gz
llvm-c0823fe7c679ca8f7d1667a310c2fca97b9402d5.tar.bz2
llvm-c0823fe7c679ca8f7d1667a310c2fca97b9402d5.tar.xz
Simplify RegScavenger::FindUnusedReg.
- Drop the Candidates argument and fix all callers. Now that RegScavenger tracks available registers accurately, there is no need to restict the search. - Make sure that no aliases of the found register are in use. This was a potential bug. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79369 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/CodeGen/RegisterScavenging.h')
-rw-r--r--include/llvm/CodeGen/RegisterScavenging.h10
1 files changed, 2 insertions, 8 deletions
diff --git a/include/llvm/CodeGen/RegisterScavenging.h b/include/llvm/CodeGen/RegisterScavenging.h
index 6a15fcf065..511b8bb784 100644
--- a/include/llvm/CodeGen/RegisterScavenging.h
+++ b/include/llvm/CodeGen/RegisterScavenging.h
@@ -98,15 +98,9 @@ public:
/// getRegsUsed - return all registers currently in use in used.
void getRegsUsed(BitVector &used, bool includeReserved);
- /// FindUnusedReg - Find a unused register of the specified register class
- /// from the specified set of registers. It return 0 is none is found.
- unsigned FindUnusedReg(const TargetRegisterClass *RegClass,
- const BitVector &Candidates) const;
-
/// FindUnusedReg - Find a unused register of the specified register class.
- /// Exclude callee saved registers if directed. It return 0 is none is found.
- unsigned FindUnusedReg(const TargetRegisterClass *RegClass,
- bool ExCalleeSaved = false) const;
+ /// Return 0 if none is found.
+ unsigned FindUnusedReg(const TargetRegisterClass *RegClass) const;
/// setScavengingFrameIndex / getScavengingFrameIndex - accessor and setter of
/// ScavengingFrameIndex.