[PATCH] D94996: [GVN] do not repeat PRE on failure to split critical edge

Nick Desaulniers via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jan 20 20:27:04 PST 2021


nickdesaulniers added inline comments.


================
Comment at: llvm/lib/Transforms/Scalar/GVN.cpp:2699
+  if (Changed) {
+    if (MD)
+      MD->invalidateCachedPredecessors();
----------------
nickdesaulniers wrote:
> fhahn wrote:
> > This code seems redundant, right, because it is already done by `splitCriticalEdges`?
> Different code paths; the method `GVN::splitCriticalEdges` that accepts arguments is called from different places at different points during GVN.
> 
> That method is used to splitting individual edges eagerly, then invalidating cached predecessors.
> 
> This method is for splitting a list of edges that were deferred, then invalidating cached predecessors.
The other method probably shouldn't be plural. s/splitCriticalEdges/splitCriticalEdge/


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D94996



More information about the llvm-commits mailing list