Add typedefs for the common entity maps.

The various entity maps in a function end up being referenced in
multiple places, so create typedefs for them.
This commit is contained in:
Jakob Stoklund Olesen
2017-06-16 13:08:13 -07:00
parent 605bda2925
commit ddbf46bef4
5 changed files with 45 additions and 32 deletions

View File

@@ -31,3 +31,19 @@ pub use ir::function::Function;
pub use ir::builder::InstBuilder;
pub use ir::progpoint::{ProgramPoint, ProgramOrder, ExpandedProgramPoint};
pub use ir::memflags::MemFlags;
use binemit;
use entity_map::EntityMap;
use isa;
/// Map of value locations.
pub type ValueLocations = EntityMap<Value, ValueLoc>;
/// Map of jump tables.
pub type JumpTables = EntityMap<JumpTable, JumpTableData>;
/// Map of instruction encodings.
pub type InstEncodings = EntityMap<Inst, isa::Encoding>;
/// Code offsets for EBBs.
pub type EbbOffsets = EntityMap<Ebb, binemit::CodeOffset>;