This is an archive of the discontinued LLVM Phabricator instance.

Correct IDF calculator for ReverseIDF
ClosedPublic

Authored by dberlin on Apr 5 2016, 10:13 AM.

Details

Summary

Need to use predecessors for reverse graph, successors for forward graph.
succ_iterator/pred_iterator are not compatible, this patch is all the work necessary to work around that (which is what everywhere else does). Not sure if there is a better way, so cc'ing some random folks to take a gander :)

Diff Detail

Repository
rL LLVM

Event Timeline

dberlin retitled this revision from to Correct IDF calculator for ReverseIDF.
dberlin updated this object.
dberlin added a subscriber: llvm-commits.
qcolombet accepted this revision.Apr 11 2016, 2:39 PM
qcolombet edited edge metadata.

Hi Daniel,

Looks reasonable to me.
Maybe a typedef to add a bit of syntactic sugar.

Cheers,
-Quentin

lib/Analysis/IteratedDominanceFrontier.cpp
103 ↗(On Diff #52709)

Perhaps typedef those so that clients explicitly use forward or reverse IDF?

This revision is now accepted and ready to land.Apr 11 2016, 2:39 PM
dberlin edited edge metadata.

Update with typedefs

This revision was automatically updated to reflect the committed changes.