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 | 1b9c8e73b5d620cf2d9a8e150b179fe95ddb8c4e (patch) | |
tree | a746bfa8656dc406e4a4fcca752b03d941000592 /lib/Transforms | |
parent | ae2650a9cff478febe7d35d322dc3911b19ac30c (diff) | |
download | external_llvm-1b9c8e73b5d620cf2d9a8e150b179fe95ddb8c4e.zip external_llvm-1b9c8e73b5d620cf2d9a8e150b179fe95ddb8c4e.tar.gz external_llvm-1b9c8e73b5d620cf2d9a8e150b179fe95ddb8c4e.tar.bz2 |
prepare for a change I'm about to make
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31248 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms')
-rw-r--r-- | lib/Transforms/Scalar/LoopStrengthReduce.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/Transforms/Scalar/LoopStrengthReduce.cpp b/lib/Transforms/Scalar/LoopStrengthReduce.cpp index e498860..1c6acc6 100644 --- a/lib/Transforms/Scalar/LoopStrengthReduce.cpp +++ b/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)]; |