[PATCH] D131392: [ARM] Emit local aliases (.Lfoo$local) for functions
Alexander Richardson via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Aug 9 02:54:49 PDT 2022
This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
Closed by commit rG9a2b14afa02e: [ARM] Emit local aliases (.Lfoo$local) for functions (authored by arichardson).
Changed prior to commit:
https://reviews.llvm.org/D131392?vs=450775&id=451077#toc
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D131392/new/
https://reviews.llvm.org/D131392
Files:
llvm/lib/Target/ARM/ARMAsmPrinter.cpp
llvm/test/CodeGen/ARM/dso-local-func.ll
llvm/utils/UpdateTestChecks/asm.py
Index: llvm/utils/UpdateTestChecks/asm.py
===================================================================
--- llvm/utils/UpdateTestChecks/asm.py
+++ llvm/utils/UpdateTestChecks/asm.py
@@ -24,6 +24,7 @@
ASM_FUNCTION_ARM_RE = re.compile(
r'^(?P<func>[0-9a-zA-Z_$]+):\n' # f: (name of function)
+ r'(?:\.L(?P=func)\$local:\n)?' # drop .L<func>$local:
r'\s+\.fnstart\n' # .fnstart
r'(?P<body>.*?)' # (body of the function)
r'^.Lfunc_end[0-9]+:', # .Lfunc_end0: or # -- End function
Index: llvm/test/CodeGen/ARM/dso-local-func.ll
===================================================================
--- llvm/test/CodeGen/ARM/dso-local-func.ll
+++ llvm/test/CodeGen/ARM/dso-local-func.ll
@@ -10,8 +10,7 @@
; CHECK-NEXT: .type dsolocal_func,%function
; CHECK-NEXT: .code 32
; CHECK-NEXT: dsolocal_func:
-; TODO: PIC codegen should emit a $local alias here
-; PIC-TODO-NEXT: .Ldsolocal_func$local:
+; PIC-NEXT: .Ldsolocal_func$local:
; CHECK-NEXT: .fnstart
; CHECK-NEXT: @ %bb.0:
; STATIC-NEXT: movw r0, :lower16:dsolocal_func
Index: llvm/lib/Target/ARM/ARMAsmPrinter.cpp
===================================================================
--- llvm/lib/Target/ARM/ARMAsmPrinter.cpp
+++ llvm/lib/Target/ARM/ARMAsmPrinter.cpp
@@ -82,8 +82,7 @@
OutStreamer->emitSymbolAttribute(S, MCSA_ELF_TypeFunction);
OutStreamer->emitLabel(S);
}
-
- OutStreamer->emitLabel(CurrentFnSym);
+ AsmPrinter::emitFunctionEntryLabel();
}
void ARMAsmPrinter::emitXXStructor(const DataLayout &DL, const Constant *CV) {
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D131392.451077.patch
Type: text/x-patch
Size: 1545 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220809/3dee3916/attachment.bin>
More information about the llvm-commits
mailing list