aboutsummaryrefslogtreecommitdiffstats
path: root/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
commitf9ba401bf5eddc5ca6282766682116e922f092d7 (patch)
treebe258711a0cc784007055e8a71029519c1cf8908 /lib/Transforms/Utils/LCSSA.cpp
parent880ddb018a4bdcff00d35f28988d9eddb557b8e6 (diff)
downloadexternal_llvm-f9ba401bf5eddc5ca6282766682116e922f092d7.zip
external_llvm-f9ba401bf5eddc5ca6282766682116e922f092d7.tar.gz
external_llvm-f9ba401bf5eddc5ca6282766682116e922f092d7.tar.bz2
Add special check to avoid isLoop call. Simple, but doesn't seem to speed
up lcssa much in practice. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29465 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms/Utils/LCSSA.cpp')
-rw-r--r--lib/Transforms/Utils/LCSSA.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/Transforms/Utils/LCSSA.cpp b/lib/Transforms/Utils/LCSSA.cpp
index 43c9678..21f9352 100644
--- a/lib/Transforms/Utils/LCSSA.cpp
+++ b/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;
}