[AIX][CodeGen] Storage Locations for Constant Pointers
authorQiongsi Wu <qwu@ibm.com>
Thu, 23 Mar 2023 13:16:18 +0000 (09:16 -0400)
committerQiongsi Wu <qwu@ibm.com>
Thu, 23 Mar 2023 13:44:47 +0000 (09:44 -0400)
commit4f9929add5369490c9607fc9203761483d2bc916
tree1f3e3d4cf0d953c308fa89f93f5d452e82c2fb86
parentfd4aeba307ca30da00a8db21a200cc9afcef63c6
[AIX][CodeGen] Storage Locations for Constant Pointers

This patch adds an `llc` option `-mroptr` to specify storage locations for constant pointers on AIX.

When the `-mroptr` option is specified, constant pointers, virtual function tables, and virtual type tables are placed in read-only storage. Otherwise, by default, pointers, virtual function tables, and virtual type tables are placed are placed in read/write storage.

https://reviews.llvm.org/D144190 enables the `-mroptr` option for `clang`.

Reviewed By: hubert.reinterpretcast, stephenpeckham, myhsu, MaskRay, serge-sans-paille

Differential Revision: https://reviews.llvm.org/D144189
llvm/docs/ReleaseNotes.rst
llvm/include/llvm/CodeGen/CommandFlags.h
llvm/include/llvm/Target/TargetOptions.h
llvm/lib/CodeGen/CommandFlags.cpp
llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp
llvm/test/CodeGen/PowerPC/aix-xcoff-roptr.ll [new file with mode: 0644]
llvm/test/CodeGen/PowerPC/aix64-xcoff-roptr.ll [new file with mode: 0644]
llvm/tools/llc/llc.cpp