Loop analysis of the IL

* Implemented in two passes
* First pass discovers the loops headers (they dominate one of their predecessors)
* Second pass traverses the blocks of each loop
* Discovers the loop tree structure
* Offers a new LoopAnalysis data structure queried from outside the module
This commit is contained in:
Denis Merigoux
2017-06-02 15:00:29 -07:00
committed by Jakob Stoklund Olesen
parent cb35869803
commit 7d6113e479
6 changed files with 360 additions and 5 deletions

View File

@@ -8,7 +8,6 @@ use ir::layout::Cursor;
use ir::types;
use ir::{Ebb, Inst, Value, Type, SigRef, Signature, FuncRef, ValueList, ValueListPool};
use write::write_operands;
use std::fmt;
use std::iter;
use std::ops::{Index, IndexMut};