[llvm] e63ea9d - [CommandFlags] Rename option -relax-elf-relocations to -x86-relax-relocations
Fangrui Song via llvm-commits
llvm-commits at lists.llvm.org
Wed Mar 6 23:03:16 PST 2024
Author: Fangrui Song
Date: 2024-03-06T23:03:11-08:00
New Revision: e63ea9d6f7b1d15f4819e6af8ee9452046e1548c
URL: https://github.com/llvm/llvm-project/commit/e63ea9d6f7b1d15f4819e6af8ee9452046e1548c
DIFF: https://github.com/llvm/llvm-project/commit/e63ea9d6f7b1d15f4819e6af8ee9452046e1548c.diff
LOG: [CommandFlags] Rename option -relax-elf-relocations to -x86-relax-relocations
relax-elf-relocations is misleading and there were AMDGPU/SystemZ tests
misusing this x86-specific option.
Added:
Modified:
llvm/lib/CodeGen/CommandFlags.cpp
llvm/test/CodeGen/X86/tailjmp_gotpcrel_relax_relocation.ll
llvm/test/CodeGen/X86/tls-no-plt.ll
llvm/test/ThinLTO/X86/cache-config.ll
Removed:
################################################################################
diff --git a/llvm/lib/CodeGen/CommandFlags.cpp b/llvm/lib/CodeGen/CommandFlags.cpp
index d82b2a85016c2b..d61b7082cb225f 100644
--- a/llvm/lib/CodeGen/CommandFlags.cpp
+++ b/llvm/lib/CodeGen/CommandFlags.cpp
@@ -363,7 +363,7 @@ codegen::RegisterCodeGenFlags::RegisterCodeGenFlags() {
CGBINDOPT(UseCtors);
static cl::opt<bool> RelaxELFRelocations(
- "relax-elf-relocations",
+ "x86-relax-relocations",
cl::desc(
"Emit GOTPCRELX/REX_GOTPCRELX instead of GOTPCREL on x86-64 ELF"),
cl::init(true));
diff --git a/llvm/test/CodeGen/X86/tailjmp_gotpcrel_relax_relocation.ll b/llvm/test/CodeGen/X86/tailjmp_gotpcrel_relax_relocation.ll
index 3fb161cc2cbaaf..cc8fd07a488c1a 100644
--- a/llvm/test/CodeGen/X86/tailjmp_gotpcrel_relax_relocation.ll
+++ b/llvm/test/CodeGen/X86/tailjmp_gotpcrel_relax_relocation.ll
@@ -1,4 +1,4 @@
-; RUN: llc -filetype=obj -relax-elf-relocations=true -mtriple=x86_64-linux-gnu -o - %s | llvm-objdump - -d -r | FileCheck %s
+; RUN: llc -filetype=obj -x86-relax-relocations=true -mtriple=x86_64-linux-gnu -o - %s | llvm-objdump - -d -r | FileCheck %s
; CHECK: jmpq *(%rip)
; CHECK-NEXT: R_X86_64_GOTPCRELX
diff --git a/llvm/test/CodeGen/X86/tls-no-plt.ll b/llvm/test/CodeGen/X86/tls-no-plt.ll
index b076a77e8adb9d..c555d7f0e4cc7e 100644
--- a/llvm/test/CodeGen/X86/tls-no-plt.ll
+++ b/llvm/test/CodeGen/X86/tls-no-plt.ll
@@ -1,10 +1,10 @@
-; RUN: llc < %s -mtriple=i386-linux-musl -relocation-model=pic -relax-elf-relocations=true | FileCheck --check-prefixes=CHECK,X86 %s
-; RUN: llc < %s -mtriple=x86_64-linux-musl -relocation-model=pic -relax-elf-relocations=true | FileCheck --check-prefixes=CHECK,X64 %s
+; RUN: llc < %s -mtriple=i386-linux-musl -relocation-model=pic -x86-relax-relocations=true | FileCheck --check-prefixes=CHECK,X86 %s
+; RUN: llc < %s -mtriple=x86_64-linux-musl -relocation-model=pic -x86-relax-relocations=true | FileCheck --check-prefixes=CHECK,X64 %s
;; If GOTPCRELX is disabled, don't use GOT for __tls_get_addr to work around
;; a ld.bfd bug (binutils PR24784).
-; RUN: llc < %s -mtriple=i386-linux-musl -relocation-model=pic -relax-elf-relocations=false | FileCheck --check-prefixes=CHECK,X86-PLT %s
-; RUN: llc < %s -mtriple=x86_64-linux-musl -relocation-model=pic -relax-elf-relocations=false | FileCheck --check-prefixes=CHECK,X64-PLT %s
+; RUN: llc < %s -mtriple=i386-linux-musl -relocation-model=pic -x86-relax-relocations=false | FileCheck --check-prefixes=CHECK,X86-PLT %s
+; RUN: llc < %s -mtriple=x86_64-linux-musl -relocation-model=pic -x86-relax-relocations=false | FileCheck --check-prefixes=CHECK,X64-PLT %s
@gd = thread_local global i32 0
@ld = internal thread_local global i32 0
diff --git a/llvm/test/ThinLTO/X86/cache-config.ll b/llvm/test/ThinLTO/X86/cache-config.ll
index b261ead077b07d..cef9338aa3ffe0 100644
--- a/llvm/test/ThinLTO/X86/cache-config.ll
+++ b/llvm/test/ThinLTO/X86/cache-config.ll
@@ -3,7 +3,7 @@
; RUN: llvm-lto2 run -o %t.o %t.bc -cache-dir %t.cache -r=%t.bc,globalfunc,plx
; RUN: llvm-lto2 run -o %t.o %t.bc -cache-dir %t.cache -r=%t.bc,globalfunc,plx -mcpu=core2
-; RUN: llvm-lto2 run -o %t.o %t.bc -cache-dir %t.cache -r=%t.bc,globalfunc,plx -relax-elf-relocations=0
+; RUN: llvm-lto2 run -o %t.o %t.bc -cache-dir %t.cache -r=%t.bc,globalfunc,plx -x86-relax-relocations=0
; RUN: llvm-lto2 run -o %t.o %t.bc -cache-dir %t.cache -r=%t.bc,globalfunc,plx -function-sections
; RUN: llvm-lto2 run -o %t.o %t.bc -cache-dir %t.cache -r=%t.bc,globalfunc,plx -data-sections
; RUN: llvm-lto2 run -o %t.o %t.bc -cache-dir %t.cache -r=%t.bc,globalfunc,plx -debugger-tune=sce
More information about the llvm-commits
mailing list