[GlobalOpt] Ignore only loaded / only stored global parts in global SRA heuristic
authorNikita Popov <npopov@redhat.com>
Wed, 22 Feb 2023 15:35:51 +0000 (16:35 +0100)
committerNikita Popov <npopov@redhat.com>
Mon, 27 Feb 2023 13:58:08 +0000 (14:58 +0100)
commit49aa3777f891bebdde295853f2b0f4a0b78ab311
tree67654c6f4d8199afb2f12d7912d204f6ff5aa432
parenta8ead9194cfb18922408404c8cabfa83c276944f
[GlobalOpt] Ignore only loaded / only stored global parts in global SRA heuristic

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

Differential Revision: https://reviews.llvm.org/D129857
llvm/lib/Transforms/IPO/GlobalOpt.cpp
llvm/test/Transforms/GlobalOpt/sra-many-stores.ll