[PATCH] D130466: [LICM] - Add option to allow data races
Shubham Narlawar via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sun Sep 11 00:36:22 PDT 2022
gsocshubham marked an inline comment as done.
gsocshubham added inline comments.
================
Comment at: llvm/lib/Transforms/Scalar/LICM.cpp:2150
Value *Object = getUnderlyingObject(SomePtr);
- if (isWritableObject(Object) && isThreadLocalObject(Object, CurLoop, DT))
+ bool SafeToInsertStore = TTI->isSingleThreaded() || SingleThread;
+ if ((isWritableObject(Object) &&
----------------
nikic wrote:
> These checks should be in isThreadLocalObject(). If there is only a single thread, then the object is always thread-local. Your current code incorrectly skips the writability check.
Done. Thanks!
Please check it.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D130466/new/
https://reviews.llvm.org/D130466
More information about the llvm-commits
mailing list