Page MenuHomePhabricator

[DominatorTree] Simplify ChildrenGetter.
ClosedPublic

Authored by asbirlea on Mon, Jul 27, 4:43 PM.

Details

Summary

Simplify ChildrenGetter to a simple wrapper around a GraphDiff call.
GraphDiff already handles nullptr in children, so the special casing in
clang can also be removed.

Diff Detail

Event Timeline

asbirlea created this revision.Mon, Jul 27, 4:43 PM
Herald added projects: Restricted Project, Restricted Project. · View Herald TranscriptMon, Jul 27, 4:43 PM
Herald added a subscriber: cfe-commits. · View Herald Transcript
kuhar accepted this revision.Mon, Jul 27, 5:28 PM

LGTM.

One tiny nit: the function name ChildrenGet sounds kind of backwards to me, but it seems like the other direction is already taken.

This revision is now accepted and ready to land.Mon, Jul 27, 5:28 PM

LGTM.

One tiny nit: the function name ChildrenGet sounds kind of backwards to me, but it seems like the other direction is already taken.

If there are both "ChildrenGet" and "GetChildren" in the same scope, seems like we probably should address that rather than having one awkwardly named & the ensuing lack of clarity.

asbirlea updated this revision to Diff 281382.Tue, Jul 28, 3:33 PM

Renamed ChildrenGet to getChildren. The same name only exists in GraphDiff, it's ok to keep a consistent naming.

kuhar accepted this revision.Tue, Jul 28, 3:34 PM
This revision was landed with ongoing or failed builds.Tue, Jul 28, 3:45 PM
This revision was automatically updated to reflect the committed changes.

I'm looking into it. If needed this can be reverted as it's not blocking the work for DomTree updates with a CFGView.