This is an archive of the discontinued LLVM Phabricator instance.

MachineDominators: Define MachineDomTree type alias
ClosedPublic

Authored by sameerds on Oct 27 2021, 11:23 PM.

Details

Summary

This is a (very) small move towards making the machine dominators more
aligned with the IR dominators:

  • DominatorTree / MachineDomTree is the class holding the dominator tree
  • DominatorTreeWrapperPass / MachineDominatorTree is the corresponding (machine) function pass

This alignment will be used by analyses that are designed as templates
that work with LLVM IR as well as Machine IR.

Diff Detail

Event Timeline

sameerds created this revision.Oct 27 2021, 11:23 PM
sameerds requested review of this revision.Oct 27 2021, 11:23 PM
Herald added a project: Restricted Project. · View Herald TranscriptOct 27 2021, 11:23 PM
critson accepted this revision.Oct 28 2021, 1:25 AM

LGTM, seems like a straightforward refactoring.
Probably wait in case anyone else has comments.

This revision is now accepted and ready to land.Oct 28 2021, 1:25 AM
foad added a comment.Oct 28 2021, 2:20 AM

No objection to this patch, but the names are still pretty bad:

DominatorTree / MachineDomTree is the class holding the dominator tree
DominatorTreeWrapperPass / MachineDominatorTree is the corresponding (machine) function pass

It seems far too easy to confuse DominatorTree with MachineDominatorTree (only one is a pass) and MachineDomTree with MachineDominatorTree (which one is the pass?).

sameerds updated this revision to Diff 383021.Oct 28 2021, 6:35 AM

Fixed clang-format failures.

This revision was landed with ongoing or failed builds.Oct 28 2021, 10:01 AM
This revision was automatically updated to reflect the committed changes.