mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-14 00:32:55 +00:00
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:
parent
201ff603a7
commit
99cca7d3aa
@ -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;
|
||||
}
|
||||
|
@ -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 {
|
||||
|
Loading…
x
Reference in New Issue
Block a user