[llvm] 8c8cfaa - Revert "[ARM] Use getSymbolPreferLocal() in GetARMGVSymbol"
Alan Zhao via llvm-commits
llvm-commits at lists.llvm.org
Mon Aug 22 13:18:10 PDT 2022
Author: Alan Zhao
Date: 2022-08-22T16:16:37-04:00
New Revision: 8c8cfaaf0a1d7727259e1fa7754f1876314d5693
URL: https://github.com/llvm/llvm-project/commit/8c8cfaaf0a1d7727259e1fa7754f1876314d5693
DIFF: https://github.com/llvm/llvm-project/commit/8c8cfaaf0a1d7727259e1fa7754f1876314d5693.diff
LOG: Revert "[ARM] Use getSymbolPreferLocal() in GetARMGVSymbol"
This reverts commit 6db15a82cc0966458c2b7d84b39f42ef09d2ac20.
Reverted because this breaks offical Chrome builds targeting Android on
arm: https://crbug.com/1354305
Repro: https://drive.google.com/file/d/1pgQI2adwx3DJJqIYvMY4i249ouHU0rmu/view?usp=sharing
Added:
Modified:
llvm/lib/Target/ARM/ARMAsmPrinter.cpp
llvm/test/CodeGen/ARM/dso-local-func.ll
llvm/test/CodeGen/ARM/elf-preemption.ll
llvm/test/CodeGen/ARM/thumb-function-section-reloc.ll
Removed:
################################################################################
diff --git a/llvm/lib/Target/ARM/ARMAsmPrinter.cpp b/llvm/lib/Target/ARM/ARMAsmPrinter.cpp
index 6c8952414388f..e8a9176190c87 100644
--- a/llvm/lib/Target/ARM/ARMAsmPrinter.cpp
+++ b/llvm/lib/Target/ARM/ARMAsmPrinter.cpp
@@ -891,7 +891,7 @@ MCSymbol *ARMAsmPrinter::GetARMGVSymbol(const GlobalValue *GV,
return MCSym;
} else if (Subtarget->isTargetELF()) {
- return getSymbolPreferLocal(*GV);
+ return getSymbol(GV);
}
llvm_unreachable("unexpected target");
}
diff --git a/llvm/test/CodeGen/ARM/dso-local-func.ll b/llvm/test/CodeGen/ARM/dso-local-func.ll
index e189addce8e61..ae57bbe527cb3 100644
--- a/llvm/test/CodeGen/ARM/dso-local-func.ll
+++ b/llvm/test/CodeGen/ARM/dso-local-func.ll
@@ -23,7 +23,7 @@ define dso_local ptr @dsolocal_func() nounwind {
; PIC-NEXT: .p2align 2
; PIC-NEXT: @ %bb.1:
; PIC-NEXT: .LCPI0_0:
-; PIC-NEXT: .long .Ldsolocal_func$local-(.LPC0_0+8)
+; PIC-NEXT: .long dsolocal_func-(.LPC0_0+8)
; CHECK-NEXT: .Lfunc_end0:
; CHECK-NEXT: .size dsolocal_func, .Lfunc_end0-dsolocal_func
; CHECK-NEXT: .cantunwind
diff --git a/llvm/test/CodeGen/ARM/elf-preemption.ll b/llvm/test/CodeGen/ARM/elf-preemption.ll
index efb1c6aa26817..0aaf78dae32b1 100644
--- a/llvm/test/CodeGen/ARM/elf-preemption.ll
+++ b/llvm/test/CodeGen/ARM/elf-preemption.ll
@@ -43,7 +43,7 @@ define ptr @get_dsolocal_var() nounwind {
; PIC-NEXT: .p2align 2
; PIC-NEXT: @ %bb.1:
; PIC-NEXT: .LCPI1_0:
-; PIC-NEXT: .long .Ldsolocal_var$local-(.LPC1_0+8)
+; PIC-NEXT: .long dsolocal_var-(.LPC1_0+8)
ret ptr @dsolocal_var
}
@@ -147,7 +147,7 @@ define dso_local ptr @dsolocal_func() nounwind {
; PIC-NEXT: .p2align 2
; PIC-NEXT: @ %bb.1:
; PIC-NEXT: .LCPI6_0:
-; PIC-NEXT: .long .Ldsolocal_func$local-(.LPC6_0+8)
+; PIC-NEXT: .long dsolocal_func-(.LPC6_0+8)
ret ptr @dsolocal_func
}
@@ -185,7 +185,7 @@ define dso_local void @call_dsolocal_func() nounwind {
; PIC: @ %bb.0:
; PIC-NEXT: .save {r11, lr}
; PIC-NEXT: push {r11, lr}
-; PIC-NEXT: bl .Ldsolocal_func$local
+; PIC-NEXT: bl dsolocal_func
; PIC-NEXT: pop {r11, pc}
call ptr @dsolocal_func()
ret void
diff --git a/llvm/test/CodeGen/ARM/thumb-function-section-reloc.ll b/llvm/test/CodeGen/ARM/thumb-function-section-reloc.ll
index fa0cb2fca1f80..31f6ae2dc58cb 100644
--- a/llvm/test/CodeGen/ARM/thumb-function-section-reloc.ll
+++ b/llvm/test/CodeGen/ARM/thumb-function-section-reloc.ll
@@ -17,11 +17,11 @@
; RELOCS-NEXT: 0x0 R_ARM_PREL31 .text._ZdlPv
; RELOCS-NEXT: }
; RELOCS-NEXT: Section (7) .rel.text.test {
-; RELOCS-NEXT: 0x4 R_ARM_CALL .L_ZdlPv$local
+; RELOCS-NEXT: 0x4 R_ARM_CALL _ZdlPv
; FIXME: these two relocation should not be against the section!
; RELOCS-NEXT: 0xC R_ARM_ABS32 .text._ZdlPv
; RELOCS-NEXT: 0x10 R_ARM_ABS32 .text._ZdlPv
-; RELOCS-NEXT: 0x1C R_ARM_REL32 .L_ZdlPv$local
+; RELOCS-NEXT: 0x1C R_ARM_REL32 _ZdlPv
; RELOCS-NEXT: }
; RELOCS-NEXT: Section (9) .rel.ARM.exidx.text.test {
; RELOCS-NEXT: 0x0 R_ARM_PREL31 .text.test
@@ -32,18 +32,17 @@
; RELOCS-NEXT: ]
; RELOCS-LABEL: Symbols [
-; RELOCS: Symbol {
-; RELOCS: Name: .L_ZdlPv$local
+; RELOCS: Symbol {
+; FIXME: we should include the symbol in the symbol table!
+; RELOCS-NOT: Name: .L_ZdlPv$local
+; RELOCS-TODO: Name: .L_ZdlPv$local
; RELOCS-TODO: Value: 0x1
-; RELOCS-NEXT: Value: 0x0
; RELOCS-TODO: Size: 2
-; RELOCS-NEXT: Size: 0
-; RELOCS-NEXT: Binding: Local (0x0)
+; RELOCS-TODO: Binding: Local (0x0)
; RELOCS-TODO: Type: Function (0x2)
-; RELOCS-NEXT: Type: None (0x0)
-; RELOCS-NEXT: Other: 0
-; RELOCS-NEXT: Section: .text._ZdlPv (
-; RELOCS-NEXT: }
+; RELOCS-TODO: Other: 0
+; RELOCS-TODO: Section: .text._ZdlPv (
+; RELOCS-TODO: }
define dso_local void @_ZdlPv(ptr %ptr) local_unnamed_addr nounwind "target-features"="+armv7-a,+thumb-mode" {
; CHECK-LABEL: .section .text._ZdlPv,"ax",%progbits
@@ -69,7 +68,7 @@ define ptr @test(ptr %ptr) nounwind {
; CHECK: @ %bb.0: @ %entry
; CHECK-NEXT: .save {r11, lr}
; CHECK-NEXT: push {r11, lr}
-; CHECK-NEXT: bl .L_ZdlPv$local
+; CHECK-NEXT: bl _ZdlPv{{$}}
; CHECK-NEXT: ldr r0, .LCPI1_0
; CHECK-NEXT: @APP
; CHECK-NEXT: .long .L_ZdlPv$local
@@ -85,7 +84,7 @@ define ptr @test(ptr %ptr) nounwind {
; CHECK-NEXT: .p2align 2
; CHECK-NEXT: @ %bb.1:
; CHECK-NEXT: .LCPI1_0:
-; CHECK-NEXT: .long .L_ZdlPv$local-(.LPC1_0+8)
+; CHECK-NEXT: .long _ZdlPv-(.LPC1_0+8)
entry:
call void @_ZdlPv(ptr %ptr)
; This inline assembly is needed to highlight the missing Thumb LSB since
More information about the llvm-commits
mailing list