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

@@ -28,9 +28,8 @@
//! ```
use binemit::CodeOffset;
use entity_map::EntityMap;
use ir::{Function, DataFlowGraph, Cursor, Inst, InstructionData, Opcode};
use isa::{TargetIsa, EncInfo, Encoding};
use ir::{Function, DataFlowGraph, Cursor, InstructionData, Opcode, InstEncodings};
use isa::{TargetIsa, EncInfo};
use iterators::IteratorExtras;
/// Relax branches and compute the final layout of EBB headers in `func`.
@@ -127,7 +126,7 @@ fn fallthroughs(func: &mut Function) {
/// Return the size of the replacement instructions up to and including the location where `pos` is
/// left.
fn relax_branch(dfg: &mut DataFlowGraph,
encodings: &mut EntityMap<Inst, Encoding>,
encodings: &mut InstEncodings,
encinfo: &EncInfo,
pos: &mut Cursor,
offset: CodeOffset,