pub enum IrNode {
Show 42 variants
Constant(ConstantValue),
Parameter(usize),
Undef,
BinaryOp(BinaryOp, ValueId, ValueId),
UnaryOp(UnaryOp, ValueId),
Compare(CompareOp, ValueId, ValueId),
Cast(CastKind, ValueId, IrType),
Load(ValueId),
Store(ValueId, ValueId),
GetElementPtr(ValueId, Vec<ValueId>),
Alloca(IrType),
SharedAlloc(IrType, usize),
ExtractField(ValueId, usize),
InsertField(ValueId, usize, ValueId),
ThreadId(Dimension),
BlockId(Dimension),
BlockDim(Dimension),
GridDim(Dimension),
GlobalThreadId(Dimension),
WarpId,
LaneId,
Barrier,
MemoryFence(MemoryScope),
GridSync,
Atomic(AtomicOp, ValueId, ValueId),
AtomicCas(ValueId, ValueId, ValueId),
WarpVote(WarpVoteOp, ValueId),
WarpShuffle(WarpShuffleOp, ValueId, ValueId),
WarpReduce(WarpReduceOp, ValueId),
Math(MathOp, Vec<ValueId>),
Select(ValueId, ValueId, ValueId),
Phi(Vec<(BlockId, ValueId)>),
K2HEnqueue(ValueId),
H2KDequeue,
H2KIsEmpty,
K2KSend(ValueId, ValueId),
K2KRecv,
K2KTryRecv,
HlcNow,
HlcTick,
HlcUpdate(ValueId),
Call(String, Vec<ValueId>),
}Expand description
IR node representing an operation.
Variants§
Constant(ConstantValue)
Constant value.
Parameter(usize)
Parameter reference.
Undef
Undefined value (for phi nodes without all predecessors).
BinaryOp(BinaryOp, ValueId, ValueId)
Binary operation.
UnaryOp(UnaryOp, ValueId)
Unary operation.
Compare(CompareOp, ValueId, ValueId)
Comparison operation.
Cast(CastKind, ValueId, IrType)
Cast to a different type.
Load(ValueId)
Load from pointer.
Store(ValueId, ValueId)
Store to pointer (no result value).
GetElementPtr(ValueId, Vec<ValueId>)
Get element pointer.
Alloca(IrType)
Allocate local variable.
Allocate shared memory.
ExtractField(ValueId, usize)
Extract struct field.
InsertField(ValueId, usize, ValueId)
Insert struct field.
ThreadId(Dimension)
Get thread ID.
BlockId(Dimension)
Get block ID.
BlockDim(Dimension)
Get block dimension.
GridDim(Dimension)
Get grid dimension.
GlobalThreadId(Dimension)
Get global thread ID (block_id * block_dim + thread_id).
WarpId
Get warp/wavefront ID.
LaneId
Get lane ID within warp.
Barrier
Threadgroup/block barrier.
MemoryFence(MemoryScope)
Memory fence.
GridSync
Grid-wide sync (cooperative groups).
Atomic(AtomicOp, ValueId, ValueId)
Atomic operation.
AtomicCas(ValueId, ValueId, ValueId)
Atomic compare-and-swap.
WarpVote(WarpVoteOp, ValueId)
Warp vote (all, any, ballot).
WarpShuffle(WarpShuffleOp, ValueId, ValueId)
Warp shuffle.
WarpReduce(WarpReduceOp, ValueId)
Warp reduce.
Math(MathOp, Vec<ValueId>)
Math function.
Select(ValueId, ValueId, ValueId)
Select (ternary operator).
Phi(Vec<(BlockId, ValueId)>)
Phi node for SSA.
K2HEnqueue(ValueId)
Enqueue to output queue.
H2KDequeue
Dequeue from input queue.
H2KIsEmpty
Check if input queue is empty.
K2KSend(ValueId, ValueId)
Send K2K message.
K2KRecv
Receive K2K message.
K2KTryRecv
Try receive K2K message (non-blocking).
HlcNow
Get current HLC time.
HlcTick
Tick HLC.
HlcUpdate(ValueId)
Update HLC from incoming timestamp.
Call(String, Vec<ValueId>)
Call a function.