[PATCH] D74486: [PowerPC][Future] Add initial support for PC Relative addressing for constant pool loads

Stefan Pintilie via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Feb 12 07:00:26 PST 2020


stefanp created this revision.
stefanp added reviewers: PowerPC, power-llvm-team, nemanjai, lei, hfinkel.
Herald added subscribers: steven.zhang, shchenz, jsji, kbarton, hiraditya.
Herald added a project: LLVM.

Add initial support for PC Relative addressing for constant pool loads.
This includes adding a new relocation for @pcrel and adding a new PowerPC flag to identify PC relative addressing.

Note that Hexagon had already defined `VK_Hexagon_PCREL` so I modified the Hexagon code to use a non target specific `VK_PCREL`. The change with respect to Hexagon should be NFC.


https://reviews.llvm.org/D74486

Files:
  llvm/include/llvm/BinaryFormat/ELFRelocs/PowerPC64.def
  llvm/include/llvm/MC/MCExpr.h
  llvm/lib/MC/MCExpr.cpp
  llvm/lib/Target/Hexagon/HexagonMCInstLower.cpp
  llvm/lib/Target/Hexagon/MCTargetDesc/HexagonELFObjectWriter.cpp
  llvm/lib/Target/Hexagon/MCTargetDesc/HexagonMCCodeEmitter.cpp
  llvm/lib/Target/PowerPC/MCTargetDesc/PPCAsmBackend.cpp
  llvm/lib/Target/PowerPC/MCTargetDesc/PPCELFObjectWriter.cpp
  llvm/lib/Target/PowerPC/MCTargetDesc/PPCFixupKinds.h
  llvm/lib/Target/PowerPC/MCTargetDesc/PPCInstPrinter.cpp
  llvm/lib/Target/PowerPC/MCTargetDesc/PPCMCCodeEmitter.cpp
  llvm/lib/Target/PowerPC/MCTargetDesc/PPCMCCodeEmitter.h
  llvm/lib/Target/PowerPC/MCTargetDesc/PPCMachObjectWriter.cpp
  llvm/lib/Target/PowerPC/PPC.h
  llvm/lib/Target/PowerPC/PPCISelDAGToDAG.cpp
  llvm/lib/Target/PowerPC/PPCISelLowering.cpp
  llvm/lib/Target/PowerPC/PPCISelLowering.h
  llvm/lib/Target/PowerPC/PPCInstrInfo.cpp
  llvm/lib/Target/PowerPC/PPCInstrInfo.td
  llvm/lib/Target/PowerPC/PPCInstrPrefix.td
  llvm/lib/Target/PowerPC/PPCMCInstLower.cpp
  llvm/test/CodeGen/PowerPC/constant-pool.ll
  llvm/test/CodeGen/PowerPC/csr-split.ll
  llvm/test/CodeGen/PowerPC/pcrel.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D74486.244158.patch
Type: text/x-patch
Size: 30182 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200212/b96e62c3/attachment.bin>


More information about the llvm-commits mailing list