[PATCH] D128128: [GlobalOpt] Perform store->dominated load forwarding for stored once globals

Nikita Popov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Jun 19 01:49:41 PDT 2022


nikic accepted this revision.
nikic added a comment.
This revision is now accepted and ready to land.

LGTM

I noticed that currently GlobalOpt invalidates //all// analyses if it makes any change. Can't we preserve at least all the CFG analyses, such as the domtree computed here?



================
Comment at: llvm/lib/Transforms/IPO/GlobalOpt.cpp:1447
+    function_ref<DominatorTree &(Function &)> LookupDomTree) {
+  Value *StoredOnceValue = StoredOnceStore->getOperand(0);
+  SmallVector<LoadInst *> Loads;
----------------
getValueOperand


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D128128



More information about the llvm-commits mailing list