[PATCH] D22688: [PM] Port BreakCriticalEdges to the new PM

Wei Mi via llvm-commits llvm-commits at lists.llvm.org
Fri Jul 22 10:14:00 PDT 2016


wmi added inline comments.

================
Comment at: lib/Transforms/Utils/BreakCriticalEdges.cpp:49
@@ +48,3 @@
+    auto *LI = LIWP ? &LIWP->getLoopInfo() : nullptr;
+    unsigned N = SplitAllCriticalEdges(F, CriticalEdgeSplittingOptions(DT, LI));
+    NumBroken += N;
----------------
davide wrote:
> This line is unchanged, right? If yes, you can remove that to improve the commit readability.
Ok.

================
Comment at: test/Analysis/Dominators/2006-10-02-BreakCritEdges.ll:2
@@ -1,2 +1,3 @@
 ; RUN: opt < %s -domtree -break-crit-edges -analyze -domtree | FileCheck %s
+; RUN: opt < %s -passes='require<domtree>,break-crit-edges,print<domtree>' -disable-output 2>&1| FileCheck %s
 ; PR932
----------------
davide wrote:
> Here you have `-domtree -break-critical-egdes -domtree` which in the new PM becomes `require<domtree>,break-crit-edges,print<domtree>`.
> In the next test you have (almost) the same line which instead becomes 
> `require<domtree>,break-crit-edges,require<domtree>`.
> What is the reason of this difference? (maybe I'm missing the obvious here).
I could be wrong. Here I guess print<domtree> will imply domtree analysis?  I used test/Analysis/Dominators/basic.ll as a reference:

; RUN: opt < %s -domtree -analyze | FileCheck %s -check-prefix=CHECK -check-prefix=CHECK-OLDPM
; RUN: opt < %s -disable-output -passes='print<domtree>' 2>&1 | FileCheck %s -check-prefix=CHECK -check-prefix=CHECK-NEWPM

basic.ll uses print<domtree> so it doesn't have to specify require<domtree> again?


Repository:
  rL LLVM

https://reviews.llvm.org/D22688





More information about the llvm-commits mailing list