diff options
author | Chris Lattner <sabre@nondot.org> | 2004-03-01 01:12:13 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2004-03-01 01:12:13 +0000 |
commit | 99cca7d3aa774d52b28f04bb0783747c038cda7a (patch) | |
tree | 6a8b38d3ced52229fba8f50ae07d49c2410ff1a2 /lib/Transforms | |
parent | 201ff603a79a677ca5feb438dd3fbe4b42fded14 (diff) |
Disable tail duplication in a case that breaks on Olden/tsp
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12021 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms')
-rw-r--r-- | lib/Transforms/Scalar/TailDuplication.cpp | 4 | ||||
-rw-r--r-- | lib/Transforms/Utils/LowerInvoke.cpp | 2 |
2 files changed, 5 insertions, 1 deletions
diff --git a/lib/Transforms/Scalar/TailDuplication.cpp b/lib/Transforms/Scalar/TailDuplication.cpp index 315b90697c..a3980b342c 100644 --- a/lib/Transforms/Scalar/TailDuplication.cpp +++ b/lib/Transforms/Scalar/TailDuplication.cpp @@ -135,6 +135,10 @@ bool TailDup::canEliminateUnconditionalBranch(TerminatorInst *TI) { Instruction *User = cast<Instruction>(*UI); if (User->getParent() != Tail && User->getParent() != BB) return false; + + // The 'swap' problem foils the tail duplication rewriting code. + if (isa<PHINode>(User) && User->getParent() == Tail) + return false; } return true; } diff --git a/lib/Transforms/Utils/LowerInvoke.cpp b/lib/Transforms/Utils/LowerInvoke.cpp index d42d0533f1..24033f4876 100644 --- a/lib/Transforms/Utils/LowerInvoke.cpp +++ b/lib/Transforms/Utils/LowerInvoke.cpp @@ -42,7 +42,7 @@ using namespace llvm; namespace { Statistic<> NumLowered("lowerinvoke", "Number of invoke & unwinds replaced"); - cl::opt<bool> ExpensiveEHSupport("enable-correct-eh-support", + cl::opt<bool> ExpensiveEHSupport("enable-correct-eh-support", cl::desc("Make the -lowerinvoke pass insert expensive, but correct, EH code")); class LowerInvoke : public FunctionPass { |