[PATCH] D77967: [Dominators] Facilitate updates to MachineDominator trees
Nicolai Hähnle via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Apr 14 02:37:09 PDT 2020
nhaehnle added a comment.
Couldn't whichever user of MachineDominatorTree needs this just access the underlying dominator tree structures via the `getBase()` accessor method and call the relevant functions on there?
The reason I'm concerned about this is that the current MachineDominatorTree falls out of the more common pattern for analyses that has been established for the new pass manager. If you'll look at the dominator tree on IR, for example, you'll see that there's a `DominatorTree` class that is not a pass in any way, and then DominatorTreeWrapperPass (old pass manager) and DominatorTreeAnalysis (new pass manager) wrapper passes that will return the `DominatorTree` object.
I think it would be better if the MachineDominatorTree usage would be better aligned with that pattern, rather than moving further away from it. (Currently, MachineDominatorTree has the custom critical-edge-split handling which should arguably be refactored into a use of the general dominator tree-updater mechanism as well...)
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D77967/new/
https://reviews.llvm.org/D77967
More information about the llvm-commits
mailing list