This is an archive of the discontinued LLVM Phabricator instance.

[Dominators] Move number to node mapping out of DominatorTreeBase
ClosedPublic

Authored by kuhar on Jun 16 2017, 2:41 PM.

Details

Summary

Number to node mapping in DominatorTreeBase is used only during calculation, so there is no point keeping is as a member variable. This patch moves this mapping to Calculate function and passes it to helper functions. It also makes the name more descriptive.

Diff Detail

Event Timeline

kuhar created this revision.Jun 16 2017, 2:41 PM
kuhar updated this revision to Diff 102924.Jun 16 2017, 6:26 PM

Update patch to apply cleanly.

dberlin edited edge metadata.Jun 16 2017, 9:58 PM

This is fine, but at the end of all these patches, can you please make it so there is only one structure storing state for building?

(i don't care whether this is by making genericdomtreebuilder a real class, or passing a single struct around)
I'm okay if the SNCAInfo is a pointer in that struct :)

dberlin accepted this revision.Jun 16 2017, 10:14 PM
This revision is now accepted and ready to land.Jun 16 2017, 10:14 PM
kuhar updated this revision to Diff 104445.Jun 28 2017, 9:48 AM

Update the diff to apply cleanly.

This revision was automatically updated to reflect the committed changes.