[PATCH] D116088: [compiler-rt] Implement ARM atomic operations for architectures without SMP support

Eli Friedman via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Feb 16 23:38:56 PST 2022


efriedma added a comment.

I'm concerned providing these is going to cause issues.  The provided implementation are not atomic.  Blindly assuming that the user is compiling for a target that doesn't have pre-emptible threads seems like a bad idea.

How do you expect users to use these methods, anyway?  clang shouldn't be generating calls to these methods.  (It looks like it actually does in some cases on ARM, but that's not intended behavior.)

For users who want to pretend threads don't exist, we should provide a compiler flag. -mthread-model doesn't quite work right for this at the moment, but it would make sense to fix it, I think.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D116088



More information about the llvm-commits mailing list