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
This commit is contained in:
Chris Lattner 2004-03-01 01:12:13 +00:00
parent 201ff603a7
commit 99cca7d3aa
2 changed files with 5 additions and 1 deletions

View File

@ -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;
}

View File

@ -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 {