Skip to main content

IrNode

Enum IrNode 

Source
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.

§

SharedAlloc(IrType, usize)

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.

Trait Implementations§

Source§

impl Clone for IrNode

Source§

fn clone(&self) -> IrNode

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for IrNode

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl Freeze for IrNode

§

impl RefUnwindSafe for IrNode

§

impl Send for IrNode

§

impl Sync for IrNode

§

impl Unpin for IrNode

§

impl UnwindSafe for IrNode

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.