summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/AggressiveAntiDepBreaker.cpp
diff options
context:
space:
mode:
authorDavid Goodwin <david_goodwin@apple.com>2009-11-05 21:06:09 +0000
committerDavid Goodwin <david_goodwin@apple.com>2009-11-05 21:06:09 +0000
commitbed7cb6c1ddbbe9f50d68ae8200601b8188e6f5c (patch)
tree40a0bb8b7b58ca9da59a5c5b8cce1e063bcd4448 /llvm/lib/CodeGen/AggressiveAntiDepBreaker.cpp
parent4ebb7f3e4c5f4d2a25b6a71b6f5091467a5a7bef (diff)
downloadbcm5719-llvm-bed7cb6c1ddbbe9f50d68ae8200601b8188e6f5c.tar.gz
bcm5719-llvm-bed7cb6c1ddbbe9f50d68ae8200601b8188e6f5c.zip
Fix bug in aggressive antidep breaking; liveness was not updated correctly for regions that do not have antidep candidates.
llvm-svn: 86172
Diffstat (limited to 'llvm/lib/CodeGen/AggressiveAntiDepBreaker.cpp')
-rw-r--r--llvm/lib/CodeGen/AggressiveAntiDepBreaker.cpp17
1 files changed, 7 insertions, 10 deletions
diff --git a/llvm/lib/CodeGen/AggressiveAntiDepBreaker.cpp b/llvm/lib/CodeGen/AggressiveAntiDepBreaker.cpp
index 86d051c102f..c10900c18d6 100644
--- a/llvm/lib/CodeGen/AggressiveAntiDepBreaker.cpp
+++ b/llvm/lib/CodeGen/AggressiveAntiDepBreaker.cpp
@@ -630,12 +630,6 @@ unsigned AggressiveAntiDepBreaker::BreakAntiDependencies(
std::multimap<unsigned, AggressiveAntiDepState::RegisterReference>&
RegRefs = State->GetRegRefs();
- // Nothing to do if no candidates.
- if (Candidates.empty()) {
- DEBUG(errs() << "\n===== No anti-dependency candidates\n");
- return 0;
- }
-
// The code below assumes that there is at least one instruction,
// so just duck out immediately if the block is empty.
if (SUnits.empty()) return 0;
@@ -655,16 +649,19 @@ unsigned AggressiveAntiDepBreaker::BreakAntiDependencies(
// ...need a map from MI to SUnit.
std::map<MachineInstr *, SUnit *> MISUnitMap;
-
- DEBUG(errs() << "\n===== Attempting to break " << Candidates.size() <<
- " anti-dependencies\n");
for (unsigned i = 0, e = SUnits.size(); i != e; ++i) {
SUnit *SU = &SUnits[i];
MISUnitMap.insert(std::pair<MachineInstr *, SUnit *>(SU->getInstr(), SU));
}
+ // Even if there are no anti-dependencies we still need to go
+ // through the instructions to update Def, Kills, etc.
#ifndef NDEBUG
- {
+ if (Candidates.empty()) {
+ DEBUG(errs() << "\n===== No anti-dependency candidates\n");
+ } else {
+ DEBUG(errs() << "\n===== Attempting to break " << Candidates.size() <<
+ " anti-dependencies\n");
DEBUG(errs() << "Available regs:");
for (unsigned Reg = 0; Reg < TRI->getNumRegs(); ++Reg) {
if (!State->IsLive(Reg))
OpenPOWER on IntegriCloud