summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms/Utils/LCSSA.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2006-08-02 00:16:47 +0000
committerChris Lattner <sabre@nondot.org>2006-08-02 00:16:47 +0000
commit38b6e8382a44d300b76cfd859e220ca63f5a1fff (patch)
tree55666d41a7ef1dfd8f2ddc35303f72860d907869 /llvm/lib/Transforms/Utils/LCSSA.cpp
parent4d074f795a0a52e379b2dfaa89a08f720b7ac727 (diff)
downloadbcm5719-llvm-38b6e8382a44d300b76cfd859e220ca63f5a1fff.tar.gz
bcm5719-llvm-38b6e8382a44d300b76cfd859e220ca63f5a1fff.zip
Add special check to avoid isLoop call. Simple, but doesn't seem to speed
up lcssa much in practice. llvm-svn: 29465
Diffstat (limited to 'llvm/lib/Transforms/Utils/LCSSA.cpp')
-rw-r--r--llvm/lib/Transforms/Utils/LCSSA.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/Transforms/Utils/LCSSA.cpp b/llvm/lib/Transforms/Utils/LCSSA.cpp
index 43c9678cd0b..21f93526373 100644
--- a/llvm/lib/Transforms/Utils/LCSSA.cpp
+++ b/llvm/lib/Transforms/Utils/LCSSA.cpp
@@ -177,7 +177,7 @@ void LCSSA::ProcessInstruction(Instruction *Instr,
}
// If the user is in the loop, don't rewrite it!
- if (inLoop(UserBB)) {
+ if (UserBB == Instr->getParent() || inLoop(UserBB)) {
++UI;
continue;
}
@@ -215,7 +215,7 @@ SetVector<Instruction*> LCSSA::getLoopValuesUsedOutsideLoop(Loop *L) {
UserBB = p->getIncomingBlock(OperandNo/2);
}
- if (!inLoop(UserBB)) {
+ if (*BB != UserBB && !inLoop(UserBB)) {
AffectedValues.insert(I);
break;
}
OpenPOWER on IntegriCloud