summaryrefslogtreecommitdiffstats
path: root/llvm/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
commite14ef7e6f8becbccf80762eb596f545a972ba6fb (patch)
tree61c8d499f0bb9aa28ff70c906f06867e4ef5c3ab /llvm/lib/CodeGen
parentab9ebd35212f032b7eacae27c8ff676671c8b660 (diff)
downloadbcm5719-llvm-e14ef7e6f8becbccf80762eb596f545a972ba6fb.tar.gz
bcm5719-llvm-e14ef7e6f8becbccf80762eb596f545a972ba6fb.zip
Check all overlaps when looking for used registers.
A function using any RC alias is enough to enable the ExeDepsFix pass. llvm-svn: 144636
Diffstat (limited to 'llvm/lib/CodeGen')
-rw-r--r--llvm/lib/CodeGen/ExecutionDepsFix.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/llvm/lib/CodeGen/ExecutionDepsFix.cpp b/llvm/lib/CodeGen/ExecutionDepsFix.cpp
index 050edce2ec8..16a8f921b3d 100644
--- a/llvm/lib/CodeGen/ExecutionDepsFix.cpp
+++ b/llvm/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.
OpenPOWER on IntegriCloud