[PATCH] D28742: [InstCombine] Don't DSE across readnone functions that may throw

Sanjoy Das via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Jan 15 11:41:04 PST 2017


sanjoy added a comment.

In https://reviews.llvm.org/D28742#646705, @majnemer wrote:

> Instead of using `I->mayReadFromMemoryOrThrow() || I->mayWriteToMemory()`, I'd recommend using `I->mayReadFromMemory() || I->mayHaveSideEffects()`


What do you think about `I->mayReadFromMemory() || I->mayWriteToMemory() || I->mayThrow()`?  I don't particularly like that we club may-throw with has-side-effects.


https://reviews.llvm.org/D28742





More information about the llvm-commits mailing list