[PATCH] D153907: [AIX] [TOC] Add -mtocdata/-mno-tocdata options on AIX

Alex Gatea via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jun 27 11:58:14 PDT 2023


alexgatea created this revision.
alexgatea added reviewers: sfertile, cebowleratibm.
Herald added subscribers: mgrang, nemanjai.
Herald added a project: All.
alexgatea requested review of this revision.
Herald added subscribers: llvm-commits, MaskRay.
Herald added a project: LLVM.

This patch enables support that the XL compiler had for AIX under -qdatalocal/-qdataimported.

We implement the -mtocdata/-mno-tocdata options on AIX for marking which global variables to assign/not assign the "toc-data" attribute. Global variables may be specified explicitly to be or not to be "toc-data" in comma-separated lists following -mtocdata=/-mno-tocdata=. All remaining global variables will follow the generic -mtocdata/-mno-tocdata option if present, or otherwise will follow the default -mno-tocdata behaviour. We filter unsupported types for toc-data and emit diagnostics if the corresponding global is explicitly user-specified as toc-data.


https://reviews.llvm.org/D153907

Files:
  clang/include/clang/Basic/CodeGenOptions.h
  clang/include/clang/Basic/DiagnosticFrontendKinds.td
  clang/include/clang/Driver/Options.td
  clang/lib/CodeGen/TargetInfo.cpp
  clang/lib/Driver/ToolChains/Clang.cpp
  clang/lib/Frontend/CompilerInstance.cpp
  clang/test/CodeGen/PowerPC/toc-data-attribute.c
  clang/test/CodeGen/PowerPC/toc-data-diagnostics.c
  clang/test/CodeGen/PowerPC/toc-data-structs-arrays.cpp
  clang/test/CodeGen/toc-data.c
  clang/test/Driver/toc-conf.c
  llvm/include/llvm/ADT/STLExtras.h

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D153907.535088.patch
Type: text/x-patch
Size: 22576 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230627/40463822/attachment-0001.bin>


More information about the llvm-commits mailing list