[PATCH] D144476: [GlobalOpt] Extend logic in SRA heuristic to skip stores of initializer.

Florian Hahn via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Mar 6 04:27:15 PST 2023


fhahn marked an inline comment as done.
fhahn added inline comments.


================
Comment at: llvm/lib/Transforms/IPO/GlobalOpt.cpp:408
+        Value *BasePtr = StoreAddr->stripAndAccumulateConstantOffsets(
+            DL, Offset, /* AllowNonInbounds */ true);
+        if (BasePtr != GV)
----------------
nikic wrote:
> Why can't this reuse the offset calculation from above?
Missed that, should be updated now, thanks!


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D144476



More information about the llvm-commits mailing list