[PATCH] D130466: [LICM] - Add option to allow data races
Shubham Narlawar via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Aug 31 04:22:19 PDT 2022
gsocshubham added a comment.
In D130466#3752338 <https://reviews.llvm.org/D130466#3752338>, @efriedma wrote:
> I think that instead of "ThreadModel::Model getThreadModel()" as the TTI API, we should just make the API something like "bool isSingleThreaded()". Which is basically, can any other thread run at the "same" time. I don't really want to include TargetOptions.h everywhere, and it makes the reason we're exposing it on TargetTransformInfo a bit more clear.
Understood. Updated as above.
Thanks!
> I don't think you ever addressed my comment about constants. The case where that would come up as a practical issue is if you have an argument marked "deferenceable"; we know it's legal to load from an arbitrary dereferenceable pointer, but it's not legal to store to one. We can only store to locations we know are modifiable (allocas, non-constant global variables, etc.)
I have added a check to avoid this transformation if store points to constant memory. Let me know WDYT on it. Have I addressed all your comments now? @eli.friedman
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D130466/new/
https://reviews.llvm.org/D130466
More information about the llvm-commits
mailing list