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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@71071 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Duncan Sands
2009-05-06 06:49:50 +00:00
parent e031e4bcb9
commit 7af1c78b98
13 changed files with 53 additions and 39 deletions
+1 -1
View File
@@ -1148,7 +1148,7 @@ bool LoopIndexSplit::cleanBlock(BasicBlock *BB) {
|| isa<DbgInfoIntrinsic>(I))
continue;
if (I->mayWriteToMemory())
if (I->mayHaveSideEffects())
return false;
// I is used only inside this block then it is OK.