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

Fangrui Song via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Apr 23 23:05:49 PDT 2019


MaskRay marked an inline comment as done.
MaskRay added inline comments.


================
Comment at: ELF/Arch/PPC64.cpp:122-125
+// Loading a symbol address from .toc (e.g. "addis r,2,foo at toc@ha;
+// ld r,foo at toc@l(r)") can be relaxed to compute the address using an offset
+// relative to the toc pointer (e.g. "addis r,2,offset; addi r,r,offset" or
+// "nop; addi r,2,offset").
----------------
ruiu wrote:
> I'm not familiar with the PPC64 instruction set, and I'm wondering why the relaxed instructions are faster than the original form. Can you add that to the comment?
Elaborated the comments.


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