This is an archive of the discontinued LLVM Phabricator instance.

[CFGDiff] Refactor Succ/Pred maps.
ClosedPublic

Authored by asbirlea on Jul 24 2020, 4:33 PM.

Details

Summary

Refactor Succ/Pred maps to have a single map lookup when constructing
children. The preivous desing made sense when used by GraphTraits.
This more closely matches the previous approach in DomTree.

Diff Detail

Event Timeline

asbirlea created this revision.Jul 24 2020, 4:33 PM
Herald added a project: Restricted Project. · View Herald TranscriptJul 24 2020, 4:33 PM
dblaikie added inline comments.Jul 24 2020, 6:50 PM
llvm/include/llvm/Support/CFGDiff.h
81

Should this 0 be IsInsert?

122–131

1 - IsInsert might be more clearly written as !IsInsert or IsInsert == false? (I'd tend towards the ! notation myself, but I understand the == false notation might be a bit more legible/clear/harder-to-miss)

148–150

I think we've probably got a utility for erase+remove in STLExtras.h?

asbirlea updated this revision to Diff 281078.Jul 27 2020, 4:26 PM
asbirlea marked 3 inline comments as done.

Address comments.

dblaikie accepted this revision.Jul 27 2020, 4:32 PM

Looks good!

This revision is now accepted and ready to land.Jul 27 2020, 4:32 PM
This revision was automatically updated to reflect the committed changes.