[AIX][CodeGen] Renaming mroptr to xcoff-mroptr
authorQiongsi Wu <qwu@ibm.com>
Fri, 31 Mar 2023 13:47:07 +0000 (09:47 -0400)
committerQiongsi Wu <qwu@ibm.com>
Fri, 31 Mar 2023 14:09:48 +0000 (10:09 -0400)
This patch renames the `mroptr` option to `mxcoff-roptr` to indicate in the option itself that it is xcoff specific.

Reviewed By: hubert.reinterpretcast

Differential Revision: https://reviews.llvm.org/D147161

llvm/docs/ReleaseNotes.rst
llvm/lib/CodeGen/CommandFlags.cpp
llvm/test/CodeGen/PowerPC/aix-xcoff-roptr.ll
llvm/test/CodeGen/PowerPC/aix64-xcoff-roptr.ll
llvm/tools/llc/llc.cpp

index 1c29ce2..4acb69f 100644 (file)
@@ -122,9 +122,9 @@ Changes to the MIPS Backend
 Changes to the PowerPC Backend
 ------------------------------
 
-* A new option ``-mroptr`` is added to ``clang`` and ``llc``. When this option
-  is present, constant objects with relocatable address values are put into the
-  RO data section. This option should be used with the ``-fdata-sections``
+* A new option ``-mxcoff-roptr`` is added to ``clang`` and ``llc``. When this
+  option is present, constant objects with relocatable address values are put
+  into the RO data section. This option should be used with the ``-fdata-sections``
   option, and is not supported with ``-fno-data-sections``. The option is
   only supported on AIX.
 * On AIX, teach the profile runtime to check for a build-id string; such string
index 5ef6507..c58547d 100644 (file)
@@ -480,7 +480,7 @@ codegen::RegisterCodeGenFlags::RegisterCodeGenFlags() {
   CGBINDOPT(JMCInstrument);
 
   static cl::opt<bool> XCOFFReadOnlyPointers(
-      "mroptr",
+      "mxcoff-roptr",
       cl::desc("When set to true, const objects with relocatable address "
                "values are put into the RO data section."),
       cl::init(false));
index 532d17e..6365b3a 100644 (file)
@@ -1,11 +1,11 @@
-; RUN: llc -mtriple powerpc-ibm-aix-xcoff -mroptr < %s | FileCheck %s
-; RUN: llc -mtriple powerpc-ibm-aix-xcoff -mroptr -filetype=obj -o %t.o < %s
+; RUN: llc -mtriple powerpc-ibm-aix-xcoff -mxcoff-roptr < %s | FileCheck %s
+; RUN: llc -mtriple powerpc-ibm-aix-xcoff -mxcoff-roptr -filetype=obj -o %t.o < %s
 ; RUN: llvm-objdump -t --symbol-description %t.o | FileCheck %s --check-prefix=OBJ
 
-; RUN: not llc -mtriple powerpc-ibm-aix-xcoff -mroptr -data-sections=false \
+; RUN: not llc -mtriple powerpc-ibm-aix-xcoff -mxcoff-roptr -data-sections=false \
 ; RUN: < %s 2>&1 | FileCheck %s --check-prefix=DS_ERR
 
-; DS_ERR: -mroptr option must be used with -data-sections
+; DS_ERR: -mxcoff-roptr option must be used with -data-sections
 
 %union.U = type { %"struct.U::A" }
 %"struct.U::A" = type { ptr }
index aff7536..ef937ea 100644 (file)
@@ -1,14 +1,14 @@
-; RUN: llc -mtriple powerpc64-ibm-aix-xcoff -mroptr < %s | FileCheck %s
-; RUN: llc -mtriple powerpc64-ibm-aix-xcoff -mroptr -filetype=obj -o %t.o < %s
+; RUN: llc -mtriple powerpc64-ibm-aix-xcoff -mxcoff-roptr < %s | FileCheck %s
+; RUN: llc -mtriple powerpc64-ibm-aix-xcoff -mxcoff-roptr -filetype=obj -o %t.o < %s
 ; RUN: llvm-objdump -t --symbol-description %t.o | FileCheck %s --check-prefix=OBJ
 
-; RUN: not llc -mtriple powerpc64-ibm-aix-xcoff -mroptr -data-sections=false \
+; RUN: not llc -mtriple powerpc64-ibm-aix-xcoff -mxcoff-roptr -data-sections=false \
 ; RUN: < %s 2>&1 | FileCheck %s --check-prefix=DS_ERR
-; RUN: not llc -mtriple powerpc64le-unknown-linux-gnu -mroptr \
+; RUN: not llc -mtriple powerpc64le-unknown-linux-gnu -mxcoff-roptr \
 ; RUN: < %s 2>&1 | FileCheck %s --check-prefix=OS_ERR
 
-; DS_ERR: -mroptr option must be used with -data-sections
-; OS_ERR: -mroptr option is only supported on AIX
+; DS_ERR: -mxcoff-roptr option must be used with -data-sections
+; OS_ERR: -mxcoff-roptr option is only supported on AIX
 
 %union.U = type { %"struct.U::A" }
 %"struct.U::A" = type { ptr }
index 860fa39..0764968 100644 (file)
@@ -499,7 +499,8 @@ static int compileModule(char **argv, LLVMContext &Context) {
 
     if (Options.XCOFFReadOnlyPointers) {
       if (!TheTriple.isOSAIX())
-        reportError("-mroptr option is only supported on AIX", InputFilename);
+        reportError("-mxcoff-roptr option is only supported on AIX",
+                    InputFilename);
 
       // Since the storage mapping class is specified per csect,
       // without using data sections, it is less effective to use read-only
@@ -510,7 +511,7 @@ static int compileModule(char **argv, LLVMContext &Context) {
       // since we have not found reasons to do otherwise that overcome the user
       // surprise of not respecting the setting.
       if (!Options.DataSections)
-        reportError("-mroptr option must be used with -data-sections",
+        reportError("-mxcoff-roptr option must be used with -data-sections",
                     InputFilename);
     }