[PATCH] D130466: [LICM] - Add option to allow data races

Eli Friedman via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Aug 12 11:27:02 PDT 2022


efriedma added a comment.

The clang changes are sort of right, in the sense that it's getting value of the right flag to the right place, but it's not how we pass around that sort of information.

Usually, we do one of two things:

- Treat it as a property of the target, and add a method to TargetTransformInfo to retrieve it from the target.
- Encode the information directly in the IR, as a function attribute or something like that.



================
Comment at: llvm/lib/Transforms/Scalar/LICM.cpp:112
 
+static cl::opt<bool> ThreadModelSingle("thread-model-single", cl::Hidden,
+                                    cl::init(false),
----------------
Since this is specifically for LICM, maybe call it licm-force-thread-model-single


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

https://reviews.llvm.org/D130466



More information about the llvm-commits mailing list