summaryrefslogtreecommitdiff
path: root/lib/CodeGen
diff options
context:
space:
mode:
authorJakob Stoklund Olesen <stoklund@2pi.dk>2011-11-15 08:20:43 +0000
committerJakob Stoklund Olesen <stoklund@2pi.dk>2011-11-15 08:20:43 +0000
commitd1bfc301986c5e3203ec57cba4122342f7dca108 (patch)
tree22c2682cf37e5933565ab6f476824eddfd74c673 /lib/CodeGen
parentf4a5084d06438fcd7f91684b6236b66c4c202e16 (diff)
downloadllvm-d1bfc301986c5e3203ec57cba4122342f7dca108.tar.gz
llvm-d1bfc301986c5e3203ec57cba4122342f7dca108.tar.bz2
llvm-d1bfc301986c5e3203ec57cba4122342f7dca108.tar.xz
Check all overlaps when looking for used registers.
A function using any RC alias is enough to enable the ExeDepsFix pass. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@144636 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen')
-rw-r--r--lib/CodeGen/ExecutionDepsFix.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/lib/CodeGen/ExecutionDepsFix.cpp b/lib/CodeGen/ExecutionDepsFix.cpp
index 050edce2ec..16a8f921b3 100644
--- a/lib/CodeGen/ExecutionDepsFix.cpp
+++ b/lib/CodeGen/ExecutionDepsFix.cpp
@@ -650,10 +650,11 @@ bool ExeDepsFix::runOnMachineFunction(MachineFunction &mf) {
bool anyregs = false;
for (TargetRegisterClass::const_iterator I = RC->begin(), E = RC->end();
I != E; ++I)
- if (MF->getRegInfo().isPhysRegUsed(*I)) {
- anyregs = true;
- break;
- }
+ for (const unsigned *AI = TRI->getOverlaps(*I); *AI; ++AI)
+ if (MF->getRegInfo().isPhysRegUsed(*AI)) {
+ anyregs = true;
+ break;
+ }
if (!anyregs) return false;
// Initialize the AliasMap on the first use.