[PATCH] D101178: [XCOFF][AIX] Add Global Variables Directly to TOC for 32 bit AIX

Sidharth Baveja via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Apr 23 09:23:39 PDT 2021


sidbav created this revision.
sidbav added reviewers: sfertile, hubert.reinterpretcast, daltenty, jasonliu.
Herald added subscribers: kbarton, hiraditya, nemanjai.
sidbav requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

This patch implements the backend implementation of adding global variables directly to the table of contents, rather than adding the address of the variable to the table of contents.

Currently, this patch will look for the "toc-data" attribute on symbols in LLVM IR, and then add those symbols to the toc. This patch assumes that the symbols which have the toc-data attribute can be added to the TOC with no issues (strictly aligned, pointer sized).

ATM, this is implemented for 32 bit AIX.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D101178

Files:
  llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp
  llvm/lib/MC/MCSectionXCOFF.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-2.ll
  llvm/test/CodeGen/PowerPC/basic-toc-data.ll
  llvm/test/CodeGen/PowerPC/toc-data.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D101178.340064.patch
Type: text/x-patch
Size: 11063 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210423/69314626/attachment.bin>


More information about the llvm-commits mailing list