diff options
author | Chris Lattner <sabre@nondot.org> | 2006-10-28 06:45:33 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2006-10-28 06:45:33 +0000 |
commit | 0997fadc3781c3f7e9386ec0f232aaba795f14e3 (patch) | |
tree | 098346a0a63c0484a63395261954d2e96f22eee3 /lib | |
parent | 27e1f90d8551b84db910c93ab21c941031c18b60 (diff) | |
download | external_llvm-0997fadc3781c3f7e9386ec0f232aaba795f14e3.zip external_llvm-0997fadc3781c3f7e9386ec0f232aaba795f14e3.tar.gz external_llvm-0997fadc3781c3f7e9386ec0f232aaba795f14e3.tar.bz2 |
break edges more intelligently
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31257 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r-- | lib/Transforms/Scalar/LoopStrengthReduce.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/Transforms/Scalar/LoopStrengthReduce.cpp b/lib/Transforms/Scalar/LoopStrengthReduce.cpp index 1c6acc6..5b64e54f 100644 --- a/lib/Transforms/Scalar/LoopStrengthReduce.cpp +++ b/lib/Transforms/Scalar/LoopStrengthReduce.cpp @@ -378,7 +378,8 @@ static bool IVUseShouldUsePostIncValue(Instruction *User, Instruction *IV, // post-incremented value. for (unsigned i = 0, e = PN->getNumIncomingValues(); i != e; ++i) if (PN->getIncomingValue(i) == IV) { - SplitCriticalEdge(PN->getIncomingBlock(i), PN->getParent(), P); + SplitCriticalEdge(PN->getIncomingBlock(i), PN->getParent(), P, + true); // Splitting the critical edge can reduce the number of entries in this // PHI. e = PN->getNumIncomingValues(); @@ -582,7 +583,7 @@ void BasedUser::RewriteInstructionToUseNewBase(const SCEVHandle &NewBase, (PN->getParent() != L->getHeader() || !L->contains(PHIPred))) { // First step, split the critical edge. - SplitCriticalEdge(PHIPred, PN->getParent(), P); + SplitCriticalEdge(PHIPred, PN->getParent(), P, true); // Next step: move the basic block. In particular, if the PHI node // is outside of the loop, and PredTI is in the loop, we want to |