[llvm-commits] CVS: llvm/lib/Transforms/Scalar/LowerInvoke.cpp TailDuplication.cpp
Chris Lattner
lattner at cs.uiuc.edu
Sun Feb 29 19:13:02 PST 2004
Changes in directory llvm/lib/Transforms/Scalar:
LowerInvoke.cpp updated: 1.12 -> 1.13
TailDuplication.cpp updated: 1.14 -> 1.15
---
Log message:
Disable tail duplication in a case that breaks on Olden/tsp
---
Diffs of the changes: (+5 -1)
Index: llvm/lib/Transforms/Scalar/LowerInvoke.cpp
diff -u llvm/lib/Transforms/Scalar/LowerInvoke.cpp:1.12 llvm/lib/Transforms/Scalar/LowerInvoke.cpp:1.13
--- llvm/lib/Transforms/Scalar/LowerInvoke.cpp:1.12 Sun Feb 15 16:24:27 2004
+++ llvm/lib/Transforms/Scalar/LowerInvoke.cpp Sun Feb 29 19:12:13 2004
@@ -42,7 +42,7 @@
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 {
Index: llvm/lib/Transforms/Scalar/TailDuplication.cpp
diff -u llvm/lib/Transforms/Scalar/TailDuplication.cpp:1.14 llvm/lib/Transforms/Scalar/TailDuplication.cpp:1.15
--- llvm/lib/Transforms/Scalar/TailDuplication.cpp:1.14 Sun Feb 29 00:41:20 2004
+++ llvm/lib/Transforms/Scalar/TailDuplication.cpp Sun Feb 29 19:12:13 2004
@@ -135,6 +135,10 @@
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;
}
More information about the llvm-commits
mailing list