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

Eli Friedman via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Aug 26 11:15:10 PDT 2022


efriedma added a comment.

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.

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.)


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

https://reviews.llvm.org/D130466



More information about the llvm-commits mailing list