Skip to main content

CallOpInterface

Trait CallOpInterface 

Source
pub trait CallOpInterface: Op {
    // Required methods
    fn callee(&self, ctx: &Context) -> CallOpCallable;
    fn args(&self, ctx: &Context) -> Vec<Value>;

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

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

§Attribute(s):

NameStatic Name IdentifierType
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 args(&self, ctx: &Context) -> Vec<Value>

Get arguments passed to callee

Provided Methods§

Source

fn callee_type(&self, ctx: &Context) -> Ptr<TypeObj>

Type of the callee

Source

fn set_callee_type(&self, ctx: &mut Context, callee_ty: Ptr<TypeObj>)

Set callee type

Trait Implementations§

Implementors§