[PATCH] D57450: [RISCV] Set MaxAtomicInlineWidth and MaxAtomicPromoteWidth for RV32/RV64 targets with atomics

Alex Bradbury via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Feb 19 04:14:40 PST 2019


asb added a comment.

In D57450#1402153 <https://reviews.llvm.org/D57450#1402153>, @rogfer01 wrote:

> Looks sensible to me.
>
> I'm just curious why we want to prevent emission of atomic LLVM instructions at this point. Won't LLVM's AtomicExpand perform a similar lowering already? Perhaps the goal is to save that pass some work?


There was some discussion about whether the frontend should lower to libcalls or not here https://bugs.llvm.org/show_bug.cgi?id=31620 and it seems the decided path was that it's better for the frontend to lower, even if AtomicExpandPass does have some support for introducing these libcalls. Additionally, setting the max atomic inline width should mean that `__atomic_is_lock_free` is evaluated correctly.


Repository:
  rC Clang

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

https://reviews.llvm.org/D57450





More information about the cfe-commits mailing list