[PATCH] D113304: [NewPM] Only invalidate modified functions' analyses in CGSCC passes + turn on eagerly invalidate analyses

Nikita Popov via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Nov 5 14:58:43 PDT 2021


nikic added a comment.

I don't think I fully understand the interaction this has with eager invalidation. I would have expected that if we eagerly invalidate, then this fine-grained invalidation wouldn't make much of a difference, because we invalidate anyway after processing a function.



================
Comment at: llvm/lib/Transforms/IPO/ArgumentPromotion.cpp:1051
+      for (auto *U : NewF->users()) {
+        auto *UserF = cast<CallBase>(U)->getParent()->getParent();
+        FAM.invalidate(*UserF, FuncPA);
----------------



================
Comment at: llvm/lib/Transforms/IPO/FunctionAttrs.cpp:1845
+      if (auto *Call = dyn_cast<CallBase>(U))
+        FAM.invalidate(*Call->getParent()->getParent(), FuncPA);
+    }
----------------
Do we need to worry about indirect references here, like a call through a bitcast? For the ArgPromotion case that's not possible, but I'm not so sure here.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D113304



More information about the cfe-commits mailing list