diff options
| author | Duncan Sands <baldrick@free.fr> | 2009-05-06 06:49:50 +0000 |
|---|---|---|
| committer | Duncan Sands <baldrick@free.fr> | 2009-05-06 06:49:50 +0000 |
| commit | 1efabaaa2ad2a90bb2fe7f79461353b5f1ea63e8 (patch) | |
| tree | 719834c43dbeab5fa7413c1e2a259167fc6307b0 /llvm/lib/Transforms/Scalar/TailRecursionElimination.cpp | |
| parent | 51f57a419581f772fb06e4c27128e702373177d9 (diff) | |
| download | llvm-1efabaaa2ad2a90bb2fe7f79461353b5f1ea63e8.zip llvm-1efabaaa2ad2a90bb2fe7f79461353b5f1ea63e8.tar.gz llvm-1efabaaa2ad2a90bb2fe7f79461353b5f1ea63e8.tar.bz2 | |
Allow readonly functions to unwind exceptions. Teach
the optimizers about this. For example, a readonly
function with no uses cannot be removed unless it is
also marked nounwind.
llvm-svn: 71071
Diffstat (limited to 'llvm/lib/Transforms/Scalar/TailRecursionElimination.cpp')
| -rw-r--r-- | llvm/lib/Transforms/Scalar/TailRecursionElimination.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Transforms/Scalar/TailRecursionElimination.cpp b/llvm/lib/Transforms/Scalar/TailRecursionElimination.cpp index e1234ef..682d069 100644 --- a/llvm/lib/Transforms/Scalar/TailRecursionElimination.cpp +++ b/llvm/lib/Transforms/Scalar/TailRecursionElimination.cpp @@ -201,7 +201,7 @@ bool TailCallElim::runOnFunction(Function &F) { bool TailCallElim::CanMoveAboveCall(Instruction *I, CallInst *CI) { // FIXME: We can move load/store/call/free instructions above the call if the // call does not mod/ref the memory location being processed. - if (I->mayWriteToMemory() || isa<LoadInst>(I)) + if (I->mayHaveSideEffects() || isa<LoadInst>(I)) return false; // Otherwise, if this is a side-effect free instruction, check to make sure |
