[PATCH] D129178: [RISCV] Enable the GlobalMerge pass for RISC-V

Alex Bradbury via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jul 6 02:19:17 PDT 2022


asb created this revision.
asb added reviewers: craig.topper, reames, kito-cheng, luismarques.
Herald added subscribers: wingo, sunshaoce, pmatos, VincentWu, luke957, StephenFan, vkmr, frasercrmck, evandro, apazos, sameer.abuasal, s.egerton, Jim, benna, psnobl, jocewei, PkmX, the_o, brucehoult, MartinMosbeck, rogfer01, edward-jones, zzheng, jrtc27, shiva0217, niosHD, sabuasal, simoncook, johnrusso, rbar, hiraditya, kristof.beyls, arichardson.
Herald added a project: All.
asb requested review of this revision.
Herald added subscribers: pcwang-thead, eopXD, MaskRay.
Herald added a project: LLVM.

Posting in order to reduce duplicated effort, as this pass was mentioned in this issue <https://github.com/llvm/llvm-project/issues/56392> and I've been in the process of kicking the tires on it and seeing if we need any heuristic tweaks.

I've copied the command-line interface and semantics (making it a boolOrDefault option) from Arm and AArch64. I've optimistically enabled MergeExternalByDefault for everything, though that can be evaluated as we do broader testing if it turns out that it causes some regressions (AArch64TargetMachine.cpp notes it does for that target).

This should be ready for review of the patch contents in terms of code style, test coverage and so on, but won't be ready to merge until we do some more testing. @craig.topper you've been doing lots of work around related optimisations, so I'd be interested how this pass does on the kind of code inputs you've been targeting.


https://reviews.llvm.org/D129178

Files:
  llvm/lib/Target/RISCV/RISCVTargetMachine.cpp
  llvm/test/CodeGen/RISCV/O3-pipeline.ll
  llvm/test/CodeGen/RISCV/global-merge-minsize.ll
  llvm/test/CodeGen/RISCV/global-merge-offset.ll
  llvm/test/CodeGen/RISCV/global-merge.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D129178.442476.patch
Type: text/x-patch
Size: 7112 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220706/6265cd07/attachment.bin>


More information about the llvm-commits mailing list