[PATCH] D108421: Mark openmp internal global dso_local

kamlesh kumar via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Sep 1 09:16:28 PDT 2021


kamleshbhalui added a comment.

In D108421#2958848 <https://reviews.llvm.org/D108421#2958848>, @MaskRay wrote:

> If you read the comment in TargetMachine::shouldAssumeDSOLocal: this is the wrong direction. dso_local is assumed to be marked by the frontend.
>
> Direct accesses and GOT accesses are trade-offs. Direct accesses are not always preferred. The MachO special case is an unfortunate case for their xnu kernel, not a good example here.

@MaskRay I would like to know more about these trade-offs details, any supporting documents will do.
Considering below testcase, can you shed some light how code generated by llc-12 is better than llc-11 for given testcase?
https://godbolt.org/z/x9xojWb58
And FYI this testcase does not work when build as Linux Kernel Module. LKM loader throw error("Unknown rela relocation: 42")?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D108421



More information about the llvm-commits mailing list