[PATCH] D60958: [PPC64] toc-indirect to toc-relative relaxation

Sean Fertile via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Apr 30 08:04:14 PDT 2019


sfertile accepted this revision.
sfertile added a comment.
This revision is now accepted and ready to land.

LGTM.



================
Comment at: test/ELF/ppc64-toc-relax-constants.s:47
+# After toc-indirection to toc-relative relaxation, it is loaded using an
+# offset relative to r2: 8*2 - 0x8000 = -32752
+# CHECK: nop
----------------
remove the `: 8*2 - 0x8000 = -32752`  part of the comment.


================
Comment at: test/ELF/ppc64-toc-relax.s:44
+# RELOCS-NEXT:      0x0 R_PPC64_ADDR64 hidden 0x0
+# RELOCS-NEXT:      0x8 R_PPC64_ADDR64 hidden2 0x0
+# RELOCS:           0x18 R_PPC64_ADDR64 default 0x0
----------------
minor nit: why not check for the relocation for `shared 0x0` as well.


================
Comment at: test/ELF/ppc64-toc-relax.s:69
+
+# `shared` is not defined in an object file. The ld instruction cannot be relaxed.
+# The first addis can still be relaxed to nop, though.
----------------
Maybe, "The definition of 'shared' used is determined at loadtime (by the dynamic linker) so the extra indirection cannot be relaxed."


Repository:
  rLLD LLVM Linker

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

https://reviews.llvm.org/D60958





More information about the llvm-commits mailing list