[PATCH] D156476: [IR] Mark `llvm.trap` as `memory(inaccessiblemem: write)`

Johannes Doerfert via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jul 27 13:18:04 PDT 2023


jdoerfert added a comment.

In D156476#4540161 <https://reviews.llvm.org/D156476#4540161>, @nikic wrote:

> In that case memory(inaccessiblemem: write) does seem like the best we can do.

I'll prepare the test changes.

> FWIW, I don't think I've ever encountered an optimization failure that was caused by the inaccessiblemem effect on assume (well, apart from the fact that it has any at all -- code that only checks mayWriteToMemory without going though AA does cause problems sometimes). Not opposed to making it more precise, but I'm not sure whether the added precision will really bring much practical value.

I am really more thinking towards the deletion of stray llvm.assumes that came up the other day. I don't have a use case either right now.
This patch is needed though as we get unfortunate initial deductions for the GPU runtime (pre linking). We also need D153311 <https://reviews.llvm.org/D153311> but that is a different story.


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

https://reviews.llvm.org/D156476



More information about the llvm-commits mailing list