[PATCH] D79864: [PowerPC] Add new linker optimization for PowerPC

Eli Friedman via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed May 27 14:10:15 PDT 2020


efriedma added a comment.

> Which will eventually turn it into this by the linker (if we don't actually need to go through the GOT):
> 
>   plwa 3, vec at got@pcrel+4(0), 1
>   nop

Which instruction gets replaced by a nop, the pld or the lwa?



================
Comment at: llvm/lib/Target/PowerPC/PPCMIPeephole.cpp:401
+        // optimization.
+        if (!hasPCRelativeForm(Use))
+          break;
----------------
I think the hasPCRelativeForm check subsumes a bunch of the other checks: for example, if an instruction has one of the listed opcodes, it can't be a call.


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

https://reviews.llvm.org/D79864





More information about the llvm-commits mailing list