From 2f50083a5a30363d5e6e7ae34f7b0615d419860d Mon Sep 17 00:00:00 2001 From: Duncan Sands Date: Wed, 6 May 2009 06:49:50 +0000 Subject: 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 --- lib/Transforms/Scalar/LoopIndexSplit.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/Transforms/Scalar/LoopIndexSplit.cpp') diff --git a/lib/Transforms/Scalar/LoopIndexSplit.cpp b/lib/Transforms/Scalar/LoopIndexSplit.cpp index ffa1d902b7..40d2e4a9d8 100644 --- a/lib/Transforms/Scalar/LoopIndexSplit.cpp +++ b/lib/Transforms/Scalar/LoopIndexSplit.cpp @@ -1148,7 +1148,7 @@ bool LoopIndexSplit::cleanBlock(BasicBlock *BB) { || isa(I)) continue; - if (I->mayWriteToMemory()) + if (I->mayHaveSideEffects()) return false; // I is used only inside this block then it is OK. -- cgit v1.2.3