summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2006-10-28 06:45:33 +0000
committerChris Lattner <sabre@nondot.org>2006-10-28 06:45:33 +0000
commita6eb7e0803cb4991de670db72f0079115e8b99fe (patch)
tree1dae455d0933d38f562259aa494881c22efb0a10 /llvm/lib/Transforms
parent80ea207bfa1fc00f0970fc8beb1c632e93965260 (diff)
downloadbcm5719-llvm-a6eb7e0803cb4991de670db72f0079115e8b99fe.tar.gz
bcm5719-llvm-a6eb7e0803cb4991de670db72f0079115e8b99fe.zip
break edges more intelligently
llvm-svn: 31257
Diffstat (limited to 'llvm/lib/Transforms')
-rw-r--r--llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp b/llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp
index 1c6acc6eef8..5b64e54f1f2 100644
--- a/llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp
+++ b/llvm/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
OpenPOWER on IntegriCloud