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

Tim Northover via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Jan 11 05:55:18 PST 2021


t.p.northover added inline comments.


================
Comment at: clang/include/clang/Driver/ToolChain.h:460
+  /// Test whether this toolchain supports outline atomics by default.
+  virtual bool IsOADefault(const llvm::opt::ArgList &Args) const {
+    return false;
----------------
This is a pretty niche feature, so it might be better to spell out the full name. Maybe even throw "AArch64" in there so more people know they can ignore it.


================
Comment at: clang/lib/Driver/ToolChains/Linux.cpp:840
+bool Linux::IsOADefault(const ArgList &Args) const {
+  if (!getTriple().isAndroid() && !getTriple().isOSLinux()) {
+    return false;
----------------
Can this be an assertion? How does a non-Linux triple end up in `Linux::IsOADefault`? Also, I think the `isAndroid` check is redundant: Android is Linux (both in reality and in valid `llvm::Triple`s).


================
Comment at: llvm/lib/Target/AArch64/AArch64.td:1087
                      FeatureNEON,
+                     FeatureOutlineAtomics,
                      FeaturePerfMon,
----------------
I think this still enables it more widely than we want. Clang overrides it with `-outline-atomics`, but other front-ends don't.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D93585



More information about the cfe-commits mailing list