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

Nikita Popov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Mar 6 03:53:31 PST 2023


nikic added inline comments.


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


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