This is an archive of the discontinued LLVM Phabricator instance.

Add new constructors for LoopInfo/DominatorTree/BFI/BPI
ClosedPublic

Authored by congh on Jul 16 2015, 12:53 PM.

Details

Summary

Those new constructors make it more natural to construct an object for a function. For example, previously to build a LoopInfo for a function, we need four statements:

DominatorTree DT;
LoopInfo LI;
DT.recalculate(F);
LI.analyze(DT);

Now we only need one statement:

LoopInfo LI(DominatorTree(F));

Diff Detail

Event Timeline

congh updated this revision to Diff 29937.Jul 16 2015, 12:53 PM
congh retitled this revision from to Add new constructors for LoopInfo/DominatorTree/BFI/BPI.
congh updated this object.
congh added a reviewer: dexonsmith.
congh added subscribers: llvm-commits, davidxl.
hfinkel accepted this revision.Jul 25 2015, 5:06 PM
hfinkel added a reviewer: hfinkel.
hfinkel added a subscriber: hfinkel.

LGTM.

This revision is now accepted and ready to land.Jul 25 2015, 5:06 PM
congh closed this revision.Jul 29 2015, 3:38 PM

This patch is already merged into the trunk.