[PATCH] D86816: [LoopDelete][Assume] Allow deleting loops with assumes

Johannes Doerfert via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Aug 28 15:06:01 PDT 2020


jdoerfert added a comment.

In D86816#2245517 <https://reviews.llvm.org/D86816#2245517>, @Tyker wrote:

> In D86816#2245470 <https://reviews.llvm.org/D86816#2245470>, @jdoerfert wrote:
>
>> I'd almost say `mayHaveSideEffects` could have a boolean parameter to ignore droppable uses. Either way, this is right now the best we can do, teach the things that query `mayHaveSideEffects` and friends about droppable uses. If we have them as flags to all of them that might be easier to do.
>
> mayHaveSideEffects isn't the only place where this is visible, assume also prevent function/arguments from being treated as readonly or readnone.

Similar solution, we need to have a readXXXX_and_droppable as an attribute and the query functions, like `mayHaveSideEffects` will return no if droppable should be ignored.
I might actually propose a new way to specify side effect attributes soon, the current one has obvious limitations ;) Till then, I'm fine with this patch FWIW.
Let's wait a bit to see if there are other opinions.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D86816/new/

https://reviews.llvm.org/D86816



More information about the llvm-commits mailing list