[PATCH] D76127: [TableGen] Do not set ReadOnly attribute on intrinsics with side effects
Danila Malyutin via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Nov 27 03:12:56 PST 2020
danilaml added a comment.
I've meant the surrounding context for the diff (https://llvm.org/docs/Phabricator.html#phabricator-request-review-web),
i.e. `git show HEAD -U999999`
> As far I can tell most targets simply mark it with side-effects and rely on the backend to do optimization, since it might be able to model the side-effects and have a clearer view of what is really accessed.
The problem is that is that it looks like the info is lost.
It is also unclear what is the effect of `IntrNoMem/IntrReadMem, IntrHasSideEffects` now. From documentation/patch it seems the original intent was to mark intrinsics that don't modify/use memory (so optimizations that rely on mayWriteMemory will work for them), but have some non memory related side-effects (so the wouldn't be CSE's/DCE'd and etc.).
But after this and D64414 <https://reviews.llvm.org/D64414> patches such intrinsics would return `mayWriteMemory`, which feels counter-intuitive and against the initial intent. I don't know how to properly fix this (and at what level this problem lies).
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
More information about the llvm-commits