Move most Cursor methods into a CursorBase trait.
The Cursor navigation methods all just depend on the cursor's position and layout reference. Make a CursorBase trait that provides access to this information with methods and implement the navigation methods on top of that. This makes it possible to have multiple types implement the cursor interface.
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
//! A Loop Invariant Code Motion optimization pass
|
||||
|
||||
use ir::{Function, Ebb, Inst, Value, Cursor, Type, InstBuilder, Layout};
|
||||
use ir::{Function, Ebb, Inst, Value, Cursor, CursorBase, Type, InstBuilder, Layout};
|
||||
use flowgraph::ControlFlowGraph;
|
||||
use std::collections::HashSet;
|
||||
use dominator_tree::DominatorTree;
|
||||
|
||||
Reference in New Issue
Block a user