[all-commits] [llvm/llvm-project] 8bdbee: [AIX][TLS] Add target attribute for -maix-small-lo...
Amy Kwan via All-commits
all-commits at lists.llvm.org
Thu Sep 7 18:06:09 PDT 2023
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 8bdbee8aaa76960c54cd0071455b92e9d60d8966
https://github.com/llvm/llvm-project/commit/8bdbee8aaa76960c54cd0071455b92e9d60d8966
Author: Amy Kwan <amy.kwan1 at ibm.com>
Date: 2023-09-07 (Thu, 07 Sep 2023)
Changed paths:
M llvm/lib/Target/PowerPC/PPC.td
M llvm/lib/Target/PowerPC/PPCSubtarget.cpp
A llvm/test/CodeGen/PowerPC/check-aix-small-local-exec-tls-opt-IRattribute.ll
A llvm/test/CodeGen/PowerPC/check-aix-small-local-exec-tls-opt.ll
Log Message:
-----------
[AIX][TLS] Add target attribute for -maix-small-local-exec-tls option.
This patch adds a target attribute for an AIX-specific option that
informs the compiler that it can use a faster access sequence for the
local-exec TLS model (formally named aix-small-local-exec-tls).
The Clang portion of this option is in D155544.
The initial implementation to generate the faster access sequence is in
D155600.
Differential Revision: https://reviews.llvm.org/D156203
Commit: 3f46e5453d9310b15d974e876f6132e3cf50c4b1
https://github.com/llvm/llvm-project/commit/3f46e5453d9310b15d974e876f6132e3cf50c4b1
Author: Amy Kwan <amy.kwan1 at ibm.com>
Date: 2023-09-07 (Thu, 07 Sep 2023)
Changed paths:
M llvm/lib/Target/PowerPC/MCTargetDesc/PPCXCOFFObjectWriter.cpp
M llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp
M llvm/lib/Target/PowerPC/PPCISelDAGToDAG.cpp
M llvm/lib/Target/PowerPC/PPCISelLowering.cpp
M llvm/lib/Target/PowerPC/PPCMCInstLower.cpp
A llvm/test/CodeGen/PowerPC/aix-small-local-exec-tls-char.ll
A llvm/test/CodeGen/PowerPC/aix-small-local-exec-tls-double.ll
A llvm/test/CodeGen/PowerPC/aix-small-local-exec-tls-float.ll
A llvm/test/CodeGen/PowerPC/aix-small-local-exec-tls-int.ll
A llvm/test/CodeGen/PowerPC/aix-small-local-exec-tls-largeaccess.ll
A llvm/test/CodeGen/PowerPC/aix-small-local-exec-tls-longlong.ll
A llvm/test/CodeGen/PowerPC/aix-small-local-exec-tls-short.ll
M llvm/test/CodeGen/PowerPC/aix-tls-le-ldst-O0.ll
M llvm/test/CodeGen/PowerPC/ppc64-nonfunc-calls.ll
Log Message:
-----------
[AIX][TLS] Produce a faster local-exec access sequence with -maix-small-local-exec-tls (And optimize when load/store offsets are 0)
This patch utilizes the -maix-small-local-exec-tls option added in
D155544 to produce a faster access sequence for the local-exec TLS
model, where loading from the TOC can be avoided.
The patch either produces an addi/la with a displacement off of r13
(the thread pointer) when the address is calculated, or it produces an
addi/la followed by a load/store when the address is calculated and
used for further accesses.
This patch also optimizes this sequence a bit more where we can remove
the addi/la when the load/store offset is 0. A follow up patch will
be posted to account for when the load/store offset is non-zero, and
currently in these situations we keep the addi/la that precedes the
load/store.
Furthermore, this access sequence is only performed for TLS variables
that are less than ~32KB in size.
Differential Revision: https://reviews.llvm.org/D155600
Commit: b1922e55ab3b35dff99238fd0b74be00df0472e7
https://github.com/llvm/llvm-project/commit/b1922e55ab3b35dff99238fd0b74be00df0472e7
Author: Amy Kwan <amy.kwan1 at ibm.com>
Date: 2023-09-07 (Thu, 07 Sep 2023)
Changed paths:
M clang/docs/ReleaseNotes.rst
M clang/include/clang/Driver/Options.td
M clang/lib/Basic/Targets/PPC.cpp
M clang/lib/Basic/Targets/PPC.h
A clang/test/Driver/aix-small-local-exec-tls.c
Log Message:
-----------
[AIX][TLS][clang] Add -maix-small-local-exec-tls clang option.
This patch adds the clang portion of an AIX-specific option to inform
the compiler that it can use a faster access sequence for the local-exec
TLS model (formally named aix-small-local-exec-tls).
This patch only adds the frontend portion of the option, building upon:
Backend portion of the option (D156203)
Backend patch that utilizes this option to actually produce the faster access sequence (D155600)
Differential Revision: https://reviews.llvm.org/D155544
Compare: https://github.com/llvm/llvm-project/compare/7e31b45d6a25...b1922e55ab3b
More information about the All-commits
mailing list