summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorJakob Stoklund Olesen <stoklund@2pi.dk>2012-10-17 18:44:18 +0000
committerJakob Stoklund Olesen <stoklund@2pi.dk>2012-10-17 18:44:18 +0000
commit9aa6e0a134358c681cc5918ec65b1ec9726b778e (patch)
treea738921c6cfaf78dabeffc56473fcab921ed1079 /include
parent72d9bbf11793345bee97bfe97cf954b289b12064 (diff)
downloadllvm-9aa6e0a134358c681cc5918ec65b1ec9726b778e.tar.gz
llvm-9aa6e0a134358c681cc5918ec65b1ec9726b778e.tar.bz2
llvm-9aa6e0a134358c681cc5918ec65b1ec9726b778e.tar.xz
Merge MRI::isPhysRegOrOverlapUsed() into isPhysRegUsed().
All callers of these functions really want the isPhysRegOrOverlapUsed() functionality which also checks aliases. For historical reasons, targets without register aliases were calling isPhysRegUsed() instead. Change isPhysRegUsed() to also check aliases, and switch all isPhysRegOrOverlapUsed() callers to isPhysRegUsed(). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166117 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include')
-rw-r--r--include/llvm/CodeGen/MachineRegisterInfo.h13
1 files changed, 6 insertions, 7 deletions
diff --git a/include/llvm/CodeGen/MachineRegisterInfo.h b/include/llvm/CodeGen/MachineRegisterInfo.h
index 670640a715..46731978fd 100644
--- a/include/llvm/CodeGen/MachineRegisterInfo.h
+++ b/include/llvm/CodeGen/MachineRegisterInfo.h
@@ -357,14 +357,13 @@ public:
//===--------------------------------------------------------------------===//
/// isPhysRegUsed - Return true if the specified register is used in this
- /// function. This only works after register allocation.
+ /// function. Also check for clobbered aliases and registers clobbered by
+ /// function calls with register mask operands.
+ ///
+ /// This only works after register allocation. It is primarily used by
+ /// PrologEpilogInserter to determine which callee-saved registers need
+ /// spilling.
bool isPhysRegUsed(unsigned Reg) const {
- return UsedPhysRegs.test(Reg) || UsedPhysRegMask.test(Reg);
- }
-
- /// isPhysRegOrOverlapUsed - Return true if Reg or any overlapping register
- /// is used in this function.
- bool isPhysRegOrOverlapUsed(unsigned Reg) const {
if (UsedPhysRegMask.test(Reg))
return true;
for (MCRegAliasIterator AI(Reg, TRI, true); AI.isValid(); ++AI)