[PATCH] D93585: [AArch64] Enable out-of-line atomics by default.

Tim Northover via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jan 19 10:55:08 PST 2021


t.p.northover added inline comments.


================
Comment at: llvm/lib/Target/AArch64/AArch64.td:1087
                      FeatureNEON,
+                     FeatureOutlineAtomics,
                      FeaturePerfMon,
----------------
ilinpv wrote:
> t.p.northover wrote:
> > I think this still enables it more widely than we want. Clang overrides it with `-outline-atomics`, but other front-ends don't.
> Could I ask you to clarify what front-ends you meant (to check outline atomics suport for them)?
Any front-end that generates LLVM IR. Generally important ones are Swift and Rust, but there are many more and I kind of doubt it's feasible to ensure they all will. It's unfortunate, and maybe at some point we can put logic in LLVM to approximate Clang's decision-making and get the benefit without any opt-in, but I kind of think it's a bit early yet. We'd risk breaking too many people's builds.

Also, putting it in the generic CPU model here means that if a front-end allows something like `-mcpu=cortex-a57` it will suddenly disable outlined atomics. Whether they're good or bad, that's just plain weird behaviour. A CPU-level feature isn't the right place for this.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D93585



More information about the llvm-commits mailing list