[PATCH] D130466: [LICM] - Add option to allow data races
Eli Friedman via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Aug 31 10:49:34 PDT 2022
efriedma added a comment.
> Prohibit this transformation if store points to constant memory using bool PointToConstantMemory.
You can't use pointsToConstantMemory to prove the property you need. The problem is that it doesn't do what you want if it can't prove anything. You need a function that says the memory isn't writable unless it can prove the memory is writable (maybe call it something like "pointsToWritableMemory").
Getting the proof requirements wrong is a common trap for newcomers to writing compiler optimizations; please watch out for it in the future.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D130466/new/
https://reviews.llvm.org/D130466
More information about the llvm-commits
mailing list