summaryrefslogtreecommitdiff
path: root/lib/CodeGen/AggressiveAntiDepBreaker.cpp
diff options
context:
space:
mode:
authorDavid Goodwin <david_goodwin@apple.com>2009-11-12 19:08:21 +0000
committerDavid Goodwin <david_goodwin@apple.com>2009-11-12 19:08:21 +0000
commit12dd99dc308150a6beff32aafc824e1d6fec1139 (patch)
treeeb3d33bed5ca1f1a02cf1b69a12e4748ed96a268 /lib/CodeGen/AggressiveAntiDepBreaker.cpp
parent70d75ca3107ce05bc30ad3511aa669b9fab5eb90 (diff)
downloadllvm-12dd99dc308150a6beff32aafc824e1d6fec1139.tar.gz
llvm-12dd99dc308150a6beff32aafc824e1d6fec1139.tar.bz2
llvm-12dd99dc308150a6beff32aafc824e1d6fec1139.tar.xz
Rename registers to break output dependencies in addition to anti-dependencies.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@87015 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/AggressiveAntiDepBreaker.cpp')
-rw-r--r--lib/CodeGen/AggressiveAntiDepBreaker.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/CodeGen/AggressiveAntiDepBreaker.cpp b/lib/CodeGen/AggressiveAntiDepBreaker.cpp
index 17b50bd955..b8cea27e51 100644
--- a/lib/CodeGen/AggressiveAntiDepBreaker.cpp
+++ b/lib/CodeGen/AggressiveAntiDepBreaker.cpp
@@ -285,7 +285,7 @@ static void AntiDepPathStep(SUnit *SU, AntiDepBreaker::AntiDepRegVector& Regs,
for (SUnit::pred_iterator P = SU->Preds.begin(), PE = SU->Preds.end();
P != PE; ++P) {
- if (P->getKind() == SDep::Anti) {
+ if ((P->getKind() == SDep::Anti) || (P->getKind() == SDep::Output)) {
unsigned Reg = P->getReg();
if (RegSet.count(Reg) != 0) {
Edges.push_back(&*P);
@@ -716,7 +716,8 @@ unsigned AggressiveAntiDepBreaker::BreakAntiDependencies(
SDep *Edge = Edges[i];
SUnit *NextSU = Edge->getSUnit();
- if (Edge->getKind() != SDep::Anti) continue;
+ if ((Edge->getKind() != SDep::Anti) &&
+ (Edge->getKind() != SDep::Output)) continue;
unsigned AntiDepReg = Edge->getReg();
DEBUG(errs() << "\tAntidep reg: " << TRI->getName(AntiDepReg));