If all stores only store the initializer value of a global, consider it
as not stored in the heuristic. GlobalOpt will remove such stores later
on.
Depends on D129857.
Paths
| Differential D144476
[GlobalOpt] Extend logic in SRA heuristic to skip stores of initializer. ClosedPublic Authored by fhahn on Feb 21 2023, 5:23 AM.
Details Summary If all stores only store the initializer value of a global, consider it Depends on D129857.
Diff Detail
Event Timelinefhahn added a child revision: D144477: [GlobalOpt] Handle stored-once in collectSRATypes (WIP)..Feb 21 2023, 5:31 AM Comment Actions Update to use ConstantFoldLoadFromConst to check the initializer value in the specifi field. fhahn added inline comments.
Comment Actions LGTM, though I think it might be cleaner if we collected the initializer part during the construction of GlobalPart, rather than calculating it twice, here and during the SRA split. This revision is now accepted and ready to land.Mar 6 2023, 7:18 AM This revision was landed with ongoing or failed builds.Mar 7 2023, 2:08 AM Closed by commit rG226778e1b2d1: [GlobalOpt] Extend logic in SRA heuristic to skip stores of initializer. (authored by fhahn). · Explain Why This revision was automatically updated to reflect the committed changes. fhahn marked an inline comment as done. Comment Actions
Posted D145490 as follow-up
Revision Contents
Diff 502961 llvm/lib/Transforms/IPO/GlobalOpt.cpp
llvm/test/Transforms/GlobalOpt/sra-many-stores-initializers.ll
|
Rebase over https://github.com/llvm/llvm-project/commit/0ecef88cb167dbd19023a932e7abac09059c3e4e?