This is an archive of the discontinued LLVM Phabricator instance.

[PM] Port BreakCriticalEdges to the new PM
ClosedPublic

Authored by wmi on Jul 22 2016, 9:53 AM.

Diff Detail

Repository
rL LLVM

Event Timeline

wmi updated this revision to Diff 65091.Jul 22 2016, 9:53 AM
wmi retitled this revision from to [PM] Port BreakCriticalEdges to the new PM.
wmi updated this object.
wmi added reviewers: davidxl, davide, silvas.
wmi set the repository for this revision to rL LLVM.
wmi added a subscriber: llvm-commits.
davide edited edge metadata.Jul 22 2016, 10:02 AM

The structure is OK (modulo nit), but I have a comment about the tests.

lib/Transforms/Utils/BreakCriticalEdges.cpp
49

This line is unchanged, right? If yes, you can remove that to improve the commit readability.

test/Analysis/Dominators/2006-10-02-BreakCritEdges.ll
2

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).

wmi added inline comments.Jul 22 2016, 10:13 AM
lib/Transforms/Utils/BreakCriticalEdges.cpp
49

Ok.

test/Analysis/Dominators/2006-10-02-BreakCritEdges.ll
2

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?

LGTM. David?

davidxl accepted this revision.Jul 22 2016, 11:01 AM
davidxl edited edge metadata.

lgtm

This revision is now accepted and ready to land.Jul 22 2016, 11:01 AM
This revision was automatically updated to reflect the committed changes.