[PATCH] D47857: [RISCV] Add machine function pass to merge base + offset

Sameer AbuAsal via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jun 6 16:55:49 PDT 2018


sabuasal created this revision.
sabuasal added reviewers: asb, apazos, mgrang.
Herald added subscribers: edward-jones, zzheng, shiva0217, kito-cheng, niosHD, simoncook, johnrusso, rbar, mgorny.

  In r333455 we added a peephole to fix the corner cases that result
  from separating base + offset lowering of global address.The
  peephole didn't handle some of the cases because it only has a basic
  block view instead of a function level view.
  
  This patch replaces that logic with a machine function pass. In
  addition to handling the original cases it handles uses of the global
  address across blocks in function and folding an offset from LW\SW
  instruction.


https://reviews.llvm.org/D47857

Files:
  lib/Target/RISCV/CMakeLists.txt
  lib/Target/RISCV/RISCV.h
  lib/Target/RISCV/RISCVISelDAGToDAG.cpp
  lib/Target/RISCV/RISCVMergeBaseOffset.cpp
  lib/Target/RISCV/RISCVTargetMachine.cpp
  test/CodeGen/RISCV/hoist-global-addr-base.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D47857.150229.patch
Type: text/x-patch
Size: 27583 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180606/33c2239c/attachment.bin>


More information about the llvm-commits mailing list