Skip to main content

CallOpInterface

Trait CallOpInterface 

Source
pub trait CallOpInterface: Op {
    // Required methods
    fn callee(&self, ctx: &Context) -> CallOpCallable;
    fn arg_range(&self, ctx: &Context) -> Range<usize> ⓘ;

    // Provided methods
    fn args(&self, ctx: &Context) -> Vec<Value> { ... }
    fn callee_type(&self, ctx: &Context) -> TypeHandle { ... }
    fn set_callee_type(&self, ctx: &mut Context, callee_ty: TypeHandle) { ... }
}
Expand description

A call-like op: Transfers control from one function to another. See MLIR’s CallOpInterface.

§Attribute(s):

NameStatic Name IdentifierType
builtin_callee_typeATTR_KEY_CALLEE_TYPETypeAttr

Required Methods§

Source

fn callee(&self, ctx: &Context) -> CallOpCallable

Get the function that this call op is calling

  • A symbol if this is a direct call
  • A value if this is an indirect call
Source

fn arg_range(&self, ctx: &Context) -> Range<usize> ⓘ

Return the index range of operands forwarded to the callee. The ith returned index identifies the operand for the target callee’s ith argument.

Provided Methods§

Source

fn args(&self, ctx: &Context) -> Vec<Value>

Get arguments passed to callee

Source

fn callee_type(&self, ctx: &Context) -> TypeHandle

Type of the callee

Source

fn set_callee_type(&self, ctx: &mut Context, callee_ty: TypeHandle)

Set callee type

Trait Implementations§

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§