[PATCH] D129857: [GlobalOpt] Ignore only loaded / only stored global parts in global SRA heuristic

Florian Hahn via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Feb 21 05:35:33 PST 2023


fhahn added a comment.
Herald added a subscriber: StephenFan.

In D129857#3852044 <https://reviews.llvm.org/D129857#3852044>, @nikic wrote:

> I've updated the patch to treat loads and stores symmetrically: We only count the part if it is both loaded and stored. In other cases, we expect it to be optimized away.

Thanks, I finally had some time to track down the cases missed by the current version of the heuristic for the larger reproducer. I added a set of test case, rebased the change here (https://github.com/fhahn/llvm-project/commit/1053ab2c24811bfc2bdf4b8b0bf5da15c2772de3) and put up  D144468 <https://reviews.llvm.org/D144468>, D144476 <https://reviews.llvm.org/D144476>, D144477 <https://reviews.llvm.org/D144477>. With those, we get the expected optimizations without D129525 <https://reviews.llvm.org/D129525>. So I think we should move ahead with this patch and the follow-ups.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D129857/new/

https://reviews.llvm.org/D129857



More information about the llvm-commits mailing list