[PATCH] D129857: [GlobalOpt] Ignore never loaded global parts in global SRA heuristic

Nikita Popov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jul 15 07:45:25 PDT 2022


nikic created this revision.
nikic added reviewers: fhahn, aeubanks.
Herald added subscribers: ormris, hiraditya.
Herald added a project: All.
nikic requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

When limiting the number of parts we split a global into, ignore any parts that are never loaded, because we expect these to be optimized away after SRA.

This is intended as an alternative to D129525 <https://reviews.llvm.org/D129525>.

This is based on top of https://gist.github.com/nikic/a041b6739417fd0267a4d9bd58ffb9f2, and NFC patch to add the GlobalPart struct.


https://reviews.llvm.org/D129857

Files:
  llvm/lib/Transforms/IPO/GlobalOpt.cpp
  llvm/test/Transforms/GlobalOpt/sra-many-stores.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D129857.444981.patch
Type: text/x-patch
Size: 9211 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220715/9a3cbc18/attachment.bin>


More information about the llvm-commits mailing list