[all-commits] [llvm/llvm-project] 706b54: [AIX][TLS] Relax front end diagnostics to accept t...

Amy Kwan via All-commits all-commits at lists.llvm.org
Mon Jun 19 10:17:50 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 706b5472d897ca75ebd210e4109637793288bcf2
      https://github.com/llvm/llvm-project/commit/706b5472d897ca75ebd210e4109637793288bcf2
  Author: Amy Kwan <amy.kwan1 at ibm.com>
  Date:   2023-06-19 (Mon, 19 Jun 2023)

  Changed paths:
    M clang/lib/Frontend/CompilerInvocation.cpp
    M clang/lib/Sema/SemaDeclAttr.cpp
    M clang/test/CodeGen/PowerPC/aix-tls-model.cpp
    M clang/test/Sema/aix-attr-tls_model.c

  Log Message:
  -----------
  [AIX][TLS] Relax front end diagnostics to accept the local-exec TLS model

This patch relaxes the front end AIX diagnostics added in D102070 to accept the
local-exec TLS model, as we plan to support this model in a series of future patches.

The diagnostics are relaxed when local-exec is used as a compiler option to
`-ftls-model=*` and in the `__attribute__((tls_model("local-exec")))` attribute.

Differential Revision: https://reviews.llvm.org/D149596


  Commit: d5659808b2fabadd2fff4f19d7aed2e2ff3435f5
      https://github.com/llvm/llvm-project/commit/d5659808b2fabadd2fff4f19d7aed2e2ff3435f5
  Author: Amy Kwan <amy.kwan1 at ibm.com>
  Date:   2023-06-19 (Mon, 19 Jun 2023)

  Changed paths:
    M llvm/include/llvm/MC/MCExpr.h
    M llvm/lib/MC/MCExpr.cpp
    M llvm/lib/Target/PowerPC/MCTargetDesc/PPCMCTargetDesc.cpp
    M llvm/lib/Target/PowerPC/MCTargetDesc/PPCXCOFFObjectWriter.cpp
    M llvm/lib/Target/PowerPC/PPC.h
    M llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp
    M llvm/lib/Target/PowerPC/PPCISelLowering.cpp
    M llvm/lib/Target/PowerPC/PPCISelLowering.h
    M llvm/lib/Target/PowerPC/PPCInstr64Bit.td
    A llvm/test/CodeGen/PowerPC/aix-tls-le-ldst-double.ll
    A llvm/test/CodeGen/PowerPC/aix-tls-le-ldst-float.ll
    A llvm/test/CodeGen/PowerPC/aix-tls-le-ldst-int.ll
    A llvm/test/CodeGen/PowerPC/aix-tls-le-ldst-longlong.ll
    A llvm/test/CodeGen/PowerPC/aix-tls-le-xcoff-reloc-large.ll
    A llvm/test/CodeGen/PowerPC/aix-tls-le-xcoff-reloc.ll

  Log Message:
  -----------
  [AIX][TLS] Generate 64-bit local-exec access code sequence

This patch adds support for the TLS local-exec access model on AIX to allow
for the ability to generate the 64-bit (specifically, non-optimized) code sequence.

For this patch in particular, the sequence that is generated involves a load of the
variable offset, followed by an add of the loaded variable offset to r13 (which is
thread pointer, respectively). This code sequence looks like the following:
```
ld reg1,var[TC](2)
add reg2, reg1, r13     // r13 contains the thread pointer
```
The TOC (.tc pseudo-op) entries generated in the assembly files are also
changed where we add the @le relocation for the variable offset.

Differential Revision: https://reviews.llvm.org/D149722


Compare: https://github.com/llvm/llvm-project/compare/aeb99dc48a58...d5659808b2fa


More information about the All-commits mailing list