diff options
author | Chris Lattner <sabre@nondot.org> | 2006-10-28 00:59:20 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2006-10-28 00:59:20 +0000 |
commit | 5191c6548557a75e657992a243af60793f0f3c39 (patch) | |
tree | 8e471a3cf7be82c30fcfae520abdee5dc4998c52 /llvm/lib | |
parent | a6873c0f884e8037476694b7b0cc43a8e345c571 (diff) | |
download | bcm5719-llvm-5191c6548557a75e657992a243af60793f0f3c39.tar.gz bcm5719-llvm-5191c6548557a75e657992a243af60793f0f3c39.zip |
prepare for a change I'm about to make
llvm-svn: 31248
Diffstat (limited to 'llvm/lib')
-rw-r--r-- | llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp b/llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp index e498860b5e8..1c6acc6eef8 100644 --- a/llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp +++ b/llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp @@ -379,6 +379,9 @@ static bool IVUseShouldUsePostIncValue(Instruction *User, Instruction *IV, for (unsigned i = 0, e = PN->getNumIncomingValues(); i != e; ++i) if (PN->getIncomingValue(i) == IV) { SplitCriticalEdge(PN->getIncomingBlock(i), PN->getParent(), P); + // Splitting the critical edge can reduce the number of entries in this + // PHI. + e = PN->getNumIncomingValues(); if (--NumUses == 0) break; } @@ -589,6 +592,9 @@ void BasedUser::RewriteInstructionToUseNewBase(const SCEVHandle &NewBase, BasicBlock *NewBB = PN->getIncomingBlock(i); NewBB->moveBefore(PN->getParent()); } + + // Splitting the edge can reduce the number of PHI entries we have. + e = PN->getNumIncomingValues(); } Value *&Code = InsertedCode[PN->getIncomingBlock(i)]; |