[PATCH] D76160: [PowerPC][Future] Add offsets to PC Relative relocations.
Stefan Pintilie via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Mar 13 14:01:37 PDT 2020
stefanp created this revision.
stefanp added reviewers: nemanjai, lei, PowerPC, hfinkel.
Herald added subscribers: shchenz, kbarton, hiraditya.
This is an optimization that applies to global addresses and allows for the following transformation:
Convert this:
paddi r3, 0, symbol at PCREL, 1
ld r4, 8(r3)
To this:
pld r4, symbol at PCREL+8(0), 1
An instruction is saved and the linker can do the addition when the symbol is resolved.
https://reviews.llvm.org/D76160
Files:
llvm/lib/Target/PowerPC/MCTargetDesc/PPCMCCodeEmitter.cpp
llvm/lib/Target/PowerPC/PPCISelLowering.cpp
llvm/test/CodeGen/PowerPC/global-address-non-got-indirect-access.ll
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D76160.250295.patch
Type: text/x-patch
Size: 11112 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200313/22b84aaf/attachment.bin>
More information about the llvm-commits
mailing list