Move logic out of cton-util wasm.
Give LoopAnalysis `is_valid` and `ensure` functions similar to DominatorTree and others, so that it can be computed on demand in the same way. This removes the last need for src/wasm.rs to have embedded knowledge of the dependencies of the passes it's running.
This commit is contained in:
@@ -18,7 +18,7 @@ pub fn do_licm(
|
||||
) {
|
||||
cfg.ensure(func);
|
||||
domtree.ensure(func, cfg);
|
||||
loop_analysis.compute(func, cfg, domtree);
|
||||
loop_analysis.ensure(func, cfg, domtree);
|
||||
for lp in loop_analysis.loops() {
|
||||
// For each loop that we want to optimize we determine the set of loop-invariant
|
||||
// instructions
|
||||
|
||||
Reference in New Issue
Block a user