1mod atomic_rmw_op;
4mod builder;
5pub mod condcodes;
6pub mod constant;
7mod debug_tags;
8pub mod dfg;
9pub mod dynamic_type;
10pub mod entities;
11mod exception_table;
12mod extfunc;
13mod extname;
14pub mod function;
15mod globalvalue;
16pub mod immediates;
17pub mod instructions;
18pub mod jumptable;
19pub(crate) mod known_symbol;
20pub mod layout;
21pub(crate) mod libcall;
22mod memflags;
23mod memtype;
24pub mod pcc;
25mod progpoint;
26mod sourceloc;
27pub mod stackslot;
28mod trapcode;
29pub mod types;
30mod user_stack_maps;
31
32#[cfg(feature = "enable-serde")]
33use serde_derive::{Deserialize, Serialize};
34
35pub use crate::ir::atomic_rmw_op::AtomicRmwOp;
36pub use crate::ir::builder::{
37 InsertBuilder, InstBuilder, InstBuilderBase, InstInserterBase, ReplaceBuilder,
38};
39pub use crate::ir::constant::{ConstantData, ConstantPool};
40pub use crate::ir::debug_tags::{DebugTag, DebugTags};
41pub use crate::ir::dfg::{BlockData, DataFlowGraph, ValueDef};
42pub use crate::ir::dynamic_type::{DynamicTypeData, DynamicTypes, dynamic_to_fixed};
43pub use crate::ir::entities::{
44 Block, Constant, DynamicStackSlot, DynamicType, ExceptionTable, ExceptionTag, FuncRef,
45 GlobalValue, Immediate, Inst, JumpTable, MemoryType, SigRef, StackSlot, UserExternalNameRef,
46 Value,
47};
48pub use crate::ir::exception_table::{ExceptionTableData, ExceptionTableItem};
49pub use crate::ir::extfunc::{
50 AbiParam, ArgumentExtension, ArgumentPurpose, ExtFuncData, Signature,
51};
52pub use crate::ir::extname::{ExternalName, UserExternalName, UserFuncName};
53pub use crate::ir::function::Function;
54pub use crate::ir::globalvalue::GlobalValueData;
55pub use crate::ir::instructions::{
56 BlockArg, BlockCall, InstructionData, Opcode, ValueList, ValueListPool, VariableArgs,
57};
58pub use crate::ir::jumptable::JumpTableData;
59pub use crate::ir::known_symbol::KnownSymbol;
60pub use crate::ir::layout::Layout;
61pub use crate::ir::libcall::{LibCall, get_probestack_funcref};
62pub use crate::ir::memflags::{AliasRegion, Endianness, MemFlags};
63pub use crate::ir::memtype::{MemoryTypeData, MemoryTypeField};
64pub use crate::ir::pcc::{BaseExpr, Expr, Fact, FactContext, PccError, PccResult};
65pub use crate::ir::progpoint::ProgramPoint;
66pub use crate::ir::sourceloc::RelSourceLoc;
67pub use crate::ir::sourceloc::SourceLoc;
68pub use crate::ir::stackslot::{
69 DynamicStackSlotData, DynamicStackSlots, StackSlotData, StackSlotKey, StackSlotKind, StackSlots,
70};
71pub use crate::ir::trapcode::TrapCode;
72pub use crate::ir::types::Type;
73pub(crate) use crate::ir::user_stack_maps::UserStackMapEntryVec;
74pub use crate::ir::user_stack_maps::{UserStackMap, UserStackMapEntry};
75
76use crate::entity::{PrimaryMap, SecondaryMap, entity_impl};
77
78pub type JumpTables = PrimaryMap<JumpTable, JumpTableData>;
80
81pub type ExceptionTables = PrimaryMap<ExceptionTable, ExceptionTableData>;
83
84pub(crate) type SourceLocs = SecondaryMap<Inst, RelSourceLoc>;
86
87#[derive(Copy, Clone, PartialEq, Eq, Hash)]
89#[cfg_attr(feature = "enable-serde", derive(Serialize, Deserialize))]
90pub struct ValueLabel(u32);
91entity_impl!(ValueLabel, "VL");
92
93#[derive(Debug, Clone, PartialEq, Hash)]
95#[cfg_attr(feature = "enable-serde", derive(Serialize, Deserialize))]
96pub struct ValueLabelStart {
97 pub from: RelSourceLoc,
99
100 pub label: ValueLabel,
102}
103
104#[derive(Debug, Clone, PartialEq, Hash)]
106#[cfg_attr(feature = "enable-serde", derive(Serialize, Deserialize))]
107pub enum ValueLabelAssignments {
108 Starts(alloc::vec::Vec<ValueLabelStart>),
110
111 Alias {
113 from: RelSourceLoc,
115
116 value: Value,
118 },
119}