[PATCH] D147161: [AIX][CodeGen] Renaming mroptr to xcoff-mroptr

Qiongsi Wu via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Mar 31 07:12:25 PDT 2023


This revision was automatically updated to reflect the committed changes.
Closed by commit rGf624372ccb74: [AIX][CodeGen] Renaming mroptr to xcoff-mroptr (authored by qiongsiwu1).

Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D147161/new/

https://reviews.llvm.org/D147161

Files:
  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: llvm/tools/llc/llc.cpp
===================================================================
--- llvm/tools/llc/llc.cpp
+++ llvm/tools/llc/llc.cpp
@@ -499,7 +499,8 @@
 
     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 @@
       // 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);
     }
 
Index: llvm/test/CodeGen/PowerPC/aix64-xcoff-roptr.ll
===================================================================
--- llvm/test/CodeGen/PowerPC/aix64-xcoff-roptr.ll
+++ llvm/test/CodeGen/PowerPC/aix64-xcoff-roptr.ll
@@ -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: llvm/test/CodeGen/PowerPC/aix-xcoff-roptr.ll
===================================================================
--- llvm/test/CodeGen/PowerPC/aix-xcoff-roptr.ll
+++ llvm/test/CodeGen/PowerPC/aix-xcoff-roptr.ll
@@ -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: llvm/lib/CodeGen/CommandFlags.cpp
===================================================================
--- llvm/lib/CodeGen/CommandFlags.cpp
+++ llvm/lib/CodeGen/CommandFlags.cpp
@@ -480,7 +480,7 @@
   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: llvm/docs/ReleaseNotes.rst
===================================================================
--- llvm/docs/ReleaseNotes.rst
+++ llvm/docs/ReleaseNotes.rst
@@ -122,9 +122,9 @@
 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


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D147161.510024.patch
Type: text/x-patch
Size: 4764 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230331/b6a7a48a/attachment.bin>


More information about the llvm-commits mailing list