[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 5 03:59:15 PST 2021


t.p.northover added a comment.

> Nice! So iOS will benefit outline atomics too.

It potentially could if someone ported the compiler-rt feature detection code, but that has to be done on a platform-by-platform basis and should be a prerequisite for enabling the feature there. As it stands iOS will always use the fallback path because the check is based on a glibc function.

You said Android is planning to adopt this. Do you know how? I thought they had their own libc; does it also implement `getauxval`, or do they have a separate `compiler-rt`, or something entirely different?

> Do you mean implementing in Clang Driver something like

  Detect runtime library used: 
    if ToolChain::RLT_CompilerRT 
      leave outline atomics enabled
    if ToolChain::RLT_Libgcc 
      run "gcc -dumpfullversion" to get version and disable outline atomics if version < 9.3.1 
    else disable outline atomics

There would need to be more checks in the CompilerRT case because most platforms won't benefit. There's already Clang logic to discover GCC installations (search for `GCCInstallationDetector`); I hope you'll be able to use that instead of trying to redo it.


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