Add per-instruction source locations to the Cretonne IR.

Source locations are opaque 32-bit entities that can be used to
represent WebAssembly byte-code positions or some other source
identifier.
This commit is contained in:
Jakob Stoklund Olesen
2017-09-20 16:42:30 -07:00
parent 16eb689dd1
commit b2a314a229
8 changed files with 156 additions and 24 deletions

View File

@@ -17,6 +17,7 @@ mod globalvar;
mod heap;
mod memflags;
mod progpoint;
mod sourceloc;
mod trapcode;
mod valueloc;
@@ -34,6 +35,7 @@ pub use ir::jumptable::JumpTableData;
pub use ir::layout::{Layout, CursorBase, Cursor};
pub use ir::memflags::MemFlags;
pub use ir::progpoint::{ProgramPoint, ProgramOrder, ExpandedProgramPoint};
pub use ir::sourceloc::SourceLoc;
pub use ir::stackslot::{StackSlots, StackSlotKind, StackSlotData};
pub use ir::trapcode::TrapCode;
pub use ir::types::Type;
@@ -54,3 +56,6 @@ pub type InstEncodings = EntityMap<Inst, isa::Encoding>;
/// Code offsets for EBBs.
pub type EbbOffsets = EntityMap<Ebb, binemit::CodeOffset>;
/// Source locations for instructions.
pub type SourceLocs = EntityMap<Inst, SourceLoc>;