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

Florian Hahn via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Sep 2 05:05:48 PDT 2022


fhahn added a comment.

I added a reduced test case from https://github.com/llvm/llvm-project/issues/56762 which has a single store to the global which makes the logic here not trigger unfortunately: https://github.com/llvm/llvm-project/commit/91e67c074922cc667fa1c43fc1f01acb96faa0f9

To solve this in general, we could probably track which fields of a global are never modified and then ignore such loads from the count. I'm still wondering if we should re-introduce the previous logic until we are able to completely address this properly to avoid regressions.


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

https://reviews.llvm.org/D129857



More information about the llvm-commits mailing list