Move ensure_domtree out of Context and into DominatorTree.
This also moves the calls to it out of Context and into the passes that actually need it, so that Context's functions don't have any logic of their own.
This commit is contained in:
@@ -58,8 +58,11 @@ impl Context {
|
||||
isa: &TargetIsa,
|
||||
func: &mut Function,
|
||||
cfg: &ControlFlowGraph,
|
||||
domtree: &DominatorTree,
|
||||
domtree: &mut DominatorTree,
|
||||
) -> CtonResult {
|
||||
// Ensure that a valid domtree exists.
|
||||
domtree.ensure(func, cfg);
|
||||
|
||||
// `Liveness` and `Coloring` are self-clearing.
|
||||
self.virtregs.clear();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user