[XCOFF][AIX] Add Global Variables Directly to TOC for 32 bit AIX
authorSidharth Baveja <sidharth.baveja@ibm.com>
Fri, 30 Apr 2021 14:48:02 +0000 (14:48 +0000)
committerSidharth Baveja <sidharth.baveja@ibm.com>
Fri, 30 Apr 2021 14:48:02 +0000 (14:48 +0000)
commit70c433a184a54819835e54c62c3e6891e7069861
tree5d0297c2fdf8b4e5452a6f24af2904854a664d5a
parentfbfcfdbf6828b8d36f4ec0ff5f4eac11fb1411a5
[XCOFF][AIX] Add Global Variables Directly to TOC for 32 bit AIX

Summary:
This patch implements the backend implementation of adding global variables
directly to the table of contents (TOC), rather than adding the address of the
variable to the TOC.
Currently, this patch will look for the "toc-data" attribute on symbols in the
IR, and then add those symbols to the TOC.
ATM, this is implemented for 32 bit AIX.

Reviewers: sfertile
Differential Revision: https://reviews.llvm.org/D101178
llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp
llvm/lib/MC/MCSectionXCOFF.cpp
llvm/lib/MC/XCOFFObjectWriter.cpp
llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp
llvm/lib/Target/PowerPC/PPCISelDAGToDAG.cpp
llvm/lib/Target/PowerPC/PPCInstrInfo.td
llvm/test/CodeGen/PowerPC/basic-toc-data-def.ll [new file with mode: 0644]
llvm/test/CodeGen/PowerPC/basic-toc-data-extern.ll [new file with mode: 0644]
llvm/test/CodeGen/PowerPC/basic-toc-data-local-linkage.ll [new file with mode: 0644]
llvm/test/CodeGen/PowerPC/toc-data.ll [new file with mode: 0644]