[PATCH] D101875: [RISCV] Prefer to lower MC_GlobalAddress operands to .Lfoo$local
Luís Marques via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon May 10 14:09:36 PDT 2021
luismarques accepted this revision.
luismarques added a subscriber: aymanmus.
luismarques added a comment.
This revision is now accepted and ready to land.
LGTM.
I assume the update_llc_test_checks.py issue that @aymanmus mentioned in D73228 <https://reviews.llvm.org/D73228> was fixed a long while ago?
================
Comment at: llvm/test/CodeGen/RISCV/elf-preemption.ll:1-3
+; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
+; RUN: llc -mtriple=riscv64 -relocation-model=static < %s | FileCheck %s --check-prefix=STATIC
+; RUN: llc -mtriple=riscv64 -relocation-model=pic < %s | FileCheck %s --check-prefix=PIC
----------------
Nit: we generally add both riscv32 and riscv64 (if applicable, generally naming the prefix appropriately). I'm not quite sure where to draw the line to ensure that doesn't become silly (@jrtc27 opinions?), but in this case it looks like the codegen might be the same for both subarchs, so it might not even require any additional clutter.
Also, split the long RUN lines, like in other tests.
================
Comment at: llvm/test/CodeGen/RISCV/elf-preemption.ll:138-139
+
+;; bl .Ldsolocal_func$local either resolves to a constant at assembly time
+;; or produces a relocation which can potentially cause a veneer.
+define dso_local void @call_dsolocal_func() nounwind {
----------------
Is a veneer the same thing as a thunk?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D101875/new/
https://reviews.llvm.org/D101875
More information about the llvm-commits
mailing list