mlir-hs-0.1.0.0
Safe HaskellNone
LanguageHaskell2010

MLIR.AST.Dialect.LLVM

Synopsis

Types

data Type Source #

Instances

Instances details
Eq Type Source # 
Instance details

Defined in MLIR.AST.Dialect.LLVM

Methods

(==) :: Type -> Type -> Bool #

(/=) :: Type -> Type -> Bool #

FromAST Type Type Source # 
Instance details

Defined in MLIR.AST.Dialect.LLVM

pattern Array :: Int -> Type -> Type Source #

pattern Void :: Type Source #

pattern LiteralStruct :: [Type] -> Type Source #

Operations

ashr

 

pattern AShr :: Location -> Type -> operand -> operand -> AbstractOperation operand Source #

A pattern for llvm.ashr.

ashr :: MonadBlockBuilder m => Value -> Value -> m Value Source #

A builder for llvm.ashr.

add

 

pattern Add :: Location -> Type -> operand -> operand -> AbstractOperation operand Source #

A pattern for llvm.add.

add :: MonadBlockBuilder m => Value -> Value -> m Value Source #

A builder for llvm.add.

addrspacecast

 

pattern AddrSpaceCast :: Location -> Type -> operand -> AbstractOperation operand Source #

A pattern for llvm.addrspacecast.

addrspacecast :: MonadBlockBuilder m => Type -> Value -> m Value Source #

A builder for llvm.addrspacecast.

mlir.addressof

Creates an SSA value containing a pointer to a global variable or constant defined by llvm.mlir.global. The global value can be defined after its first referenced. If the global value is a constant, storing into it is not allowed.

Examples:

func @foo() {
  // Get the address of a global variable.
  %0 = llvm.mlir.addressof @const : !llvm.ptr

  // Use it as a regular pointer.
  %1 = llvm.load %0 : !llvm.ptr -> i32

  // Get the address of a function.
  %2 = llvm.mlir.addressof @foo : !llvm.ptr

  // The function address can be used for indirect calls.
  llvm.call %2() : !llvm.ptr, () -> ()
}

// Define the global.
llvm.mlir.global @const(42 : i32) : i32

alloca

 

and

 

pattern And :: Location -> Type -> operand -> operand -> AbstractOperation operand Source #

A pattern for llvm.and.

and :: MonadBlockBuilder m => Value -> Value -> m Value Source #

A builder for llvm.and.

cmpxchg

 

atomicrmw

 

bitcast

 

pattern Bitcast :: Location -> Type -> operand -> AbstractOperation operand Source #

A pattern for llvm.bitcast.

bitcast :: MonadBlockBuilder m => Type -> Value -> m Value Source #

A builder for llvm.bitcast.

br

 

call_intrinsic

Call the specified llvm intrinsic. If the intrinsic is overloaded, use the MLIR function type of this op to determine which intrinsic to call.

call_intrinsic :: MonadBlockBuilder m => Maybe Type -> [Value] -> ByteString -> m Value Source #

A builder for llvm.call_intrinsic.

call

In LLVM IR, functions may return either 0 or 1 value. LLVM IR dialect implements this behavior by providing a variadic call operation for 0- and 1-result functions. Even though MLIR supports multi-result functions, LLVM IR dialect disallows them.

The call instruction supports both direct and indirect calls. Direct calls start with a function name (@-prefixed) and indirect calls start with an SSA value (%-prefixed). The direct callee, if present, is stored as a function attribute callee. For indirect calls, the callee is of !llvm.ptr type and is stored as the first value in callee_operands. If the callee is a variadic function, then the callee_type attribute must carry the function type. The trailing type list contains the optional indirect callee type and the MLIR function type, which differs from the LLVM function type that uses a explicit void type to model functions that do not return a value.

Examples:

// Direct call without arguments and with one result.
%0 = llvm.call @foo() : () -> (f32)

// Direct call with arguments and without a result.
llvm.call @bar(%0) : (f32) -> ()

// Indirect call with an argument and without a result.
%1 = llvm.mlir.addressof @foo : !llvm.ptr
llvm.call %1(%0) : !llvm.ptr, (f32) -> ()

// Direct variadic call.
llvm.call @printf(%0, %1) vararg(!llvm.func<i32 (ptr, ...)>) : (!llvm.ptr, i32) -> i32

// Indirect variadic call
llvm.call %1(%0) vararg(!llvm.func<void (...)>) : !llvm.ptr, (i32) -> ()

call :: MonadBlockBuilder m => Maybe Type -> [Value] -> Maybe [Int] -> m Value Source #

A builder for llvm.call.

comdat

Provides access to object file COMDAT section/group functionality.

Examples: llvm.comdat @__llvm_comdat { llvm.comdat_selector @any any } llvm.mlir.global internal constant @has_any_comdat(1 : i64) comdat(@__llvm_comdat::@any) : i64

comdat_selector

Provides access to object file COMDAT section/group functionality.

Examples: llvm.comdat @__llvm_comdat { llvm.comdat_selector @any any } llvm.mlir.global internal constant @has_any_comdat(1 : i64) comdat(@__llvm_comdat::@any) : i64

cond_br

 

mlir.constant

Unlike LLVM IR, MLIR does not have first-class constant values. Therefore, all constants must be created as SSA values before being used in other operations. llvm.mlir.constant creates such values for scalars and vectors. It has a mandatory value attribute, which may be an integer, floating point attribute; dense or sparse attribute containing integers or floats. The type of the attribute is one of the corresponding MLIR builtin types. It may be omitted for i64 and f64 types that are implied. The operation produces a new SSA value of the specified LLVM IR dialect type. The type of that value _must_ correspond to the attribute type converted to LLVM IR.

Examples:

// Integer constant, internal i32 is mandatory
%0 = llvm.mlir.constant(42 : i32) : i32

// It's okay to omit i64.
%1 = llvm.mlir.constant(42) : i64

// Floating point constant.
%2 = llvm.mlir.constant(42.0 : f32) : f32

// Splat dense vector constant.
%3 = llvm.mlir.constant(dense<1.0> : vector<4xf32>) : vector<4xf32>

pattern Constant :: Location -> Type -> Attribute -> AbstractOperation operand Source #

A pattern for llvm.mlir.constant.

mlir_constant :: MonadBlockBuilder m => Type -> Attribute -> m Value Source #

A builder for llvm.mlir.constant.

extractelement

 

pattern ExtractElement :: Location -> Type -> operand -> operand -> AbstractOperation operand Source #

A pattern for llvm.extractelement.

extractelement :: MonadBlockBuilder m => Type -> Value -> Value -> m Value Source #

A builder for llvm.extractelement.

extractvalue

 

fadd

 

pattern FAdd :: Location -> Type -> operand -> operand -> AbstractOperation operand Source #

A pattern for llvm.fadd.

fadd :: MonadBlockBuilder m => Value -> Value -> m Value Source #

A builder for llvm.fadd.

fcmp

 

fdiv

 

pattern FDiv :: Location -> Type -> operand -> operand -> AbstractOperation operand Source #

A pattern for llvm.fdiv.

fdiv :: MonadBlockBuilder m => Value -> Value -> m Value Source #

A builder for llvm.fdiv.

fmul

 

pattern FMul :: Location -> Type -> operand -> operand -> AbstractOperation operand Source #

A pattern for llvm.fmul.

fmul :: MonadBlockBuilder m => Value -> Value -> m Value Source #

A builder for llvm.fmul.

fneg

 

pattern FNeg :: Location -> Type -> operand -> AbstractOperation operand Source #

A pattern for llvm.fneg.

fneg :: MonadBlockBuilder m => Value -> m Value Source #

A builder for llvm.fneg.

fpext

 

pattern FPExt :: Location -> Type -> operand -> AbstractOperation operand Source #

A pattern for llvm.fpext.

fpext :: MonadBlockBuilder m => Type -> Value -> m Value Source #

A builder for llvm.fpext.

fptosi

 

pattern FPToSI :: Location -> Type -> operand -> AbstractOperation operand Source #

A pattern for llvm.fptosi.

fptosi :: MonadBlockBuilder m => Type -> Value -> m Value Source #

A builder for llvm.fptosi.

fptoui

 

pattern FPToUI :: Location -> Type -> operand -> AbstractOperation operand Source #

A pattern for llvm.fptoui.

fptoui :: MonadBlockBuilder m => Type -> Value -> m Value Source #

A builder for llvm.fptoui.

fptrunc

 

pattern FPTrunc :: Location -> Type -> operand -> AbstractOperation operand Source #

A pattern for llvm.fptrunc.

fptrunc :: MonadBlockBuilder m => Type -> Value -> m Value Source #

A builder for llvm.fptrunc.

frem

 

pattern FRem :: Location -> Type -> operand -> operand -> AbstractOperation operand Source #

A pattern for llvm.frem.

frem :: MonadBlockBuilder m => Value -> Value -> m Value Source #

A builder for llvm.frem.

fsub

 

pattern FSub :: Location -> Type -> operand -> operand -> AbstractOperation operand Source #

A pattern for llvm.fsub.

fsub :: MonadBlockBuilder m => Value -> Value -> m Value Source #

A builder for llvm.fsub.

fence

 

freeze

 

pattern Freeze :: Location -> Type -> operand -> AbstractOperation operand Source #

A pattern for llvm.freeze.

freeze :: MonadBlockBuilder m => Value -> m Value Source #

A builder for llvm.freeze.

getelementptr

This operation mirrors LLVM IRs 'getelementptr' operation that is used to perform pointer arithmetic.

Like in LLVM IR, it is possible to use both constants as well as SSA values as indices. In the case of indexing within a structure, it is required to either use constant indices directly, or supply a constant SSA value.

An optional 'inbounds' attribute specifies the low-level pointer arithmetic overflow behavior that LLVM uses after lowering the operation to LLVM IR.

Examples:

// GEP with an SSA value offset
%0 = llvm.getelementptr %1[%2] : (!llvm.ptr, i64) -> !llvm.ptr, f32

// GEP with a constant offset and the inbounds attribute set
%0 = llvm.getelementptr inbounds %1[3] : (!llvm.ptr) -> !llvm.ptr, f32

// GEP with constant offsets into a structure
%0 = llvm.getelementptr %1[0, 1]
   : (!llvm.ptr) -> !llvm.ptr, !llvm.struct<(i32, f32)>

mlir.global_ctors

Specifies a list of constructor functions and priorities. The functions referenced by this array will be called in ascending order of priority (i.e. lowest first) when the module is loaded. The order of functions with the same priority is not defined. This operation is translated to LLVM's global_ctors global variable. The initializer functions are run at load time. The data field present in LLVM's global_ctors variable is not modeled here.

Examples:

llvm.mlir.global_ctors {@ctor}

llvm.func @ctor() {
  ...
  llvm.return
}

mlir.global_dtors

Specifies a list of destructor functions and priorities. The functions referenced by this array will be called in descending order of priority (i.e. highest first) when the module is unloaded. The order of functions with the same priority is not defined. This operation is translated to LLVM's global_dtors global variable. The data field present in LLVM's global_dtors variable is not modeled here.

Examples:

llvm.func @dtor() {
  llvm.return
}
llvm.mlir.global_dtors {@dtor}

mlir.global

Since MLIR allows for arbitrary operations to be present at the top level, global variables are defined using the llvm.mlir.global operation. Both global constants and variables can be defined, and the value may also be initialized in both cases.

There are two forms of initialization syntax. Simple constants that can be represented as MLIR attributes can be given in-line:

llvm.mlir.global @variable(32.0 : f32) : f32

This initialization and type syntax is similar to llvm.mlir.constant and may use two types: one for MLIR attribute and another for the LLVM value. These types must be compatible.

More complex constants that cannot be represented as MLIR attributes can be given in an initializer region:

// This global is initialized with the equivalent of:
//   i32* getelementptr (i32* @g2, i32 2)
llvm.mlir.global constant @int_gep() : !llvm.ptr {
  %0 = llvm.mlir.addressof @g2 : !llvm.ptr
  %1 = llvm.mlir.constant(2 : i32) : i32
  %2 = llvm.getelementptr %0[%1]
     : (!llvm.ptr, i32) -> !llvm.ptr, i32
  // The initializer region must end with llvm.return.
  llvm.return %2 : !llvm.ptr
}

Only one of the initializer attribute or initializer region may be provided.

llvm.mlir.global must appear at top-level of the enclosing module. It uses an @-identifier for its value, which will be uniqued by the module with respect to other @-identifiers in it.

Examples:

// Global values use @-identifiers.
llvm.mlir.global constant @cst(42 : i32) : i32

// Non-constant values must also be initialized.
llvm.mlir.global @variable(32.0 : f32) : f32

// Strings are expected to be of wrapped LLVM i8 array type and do not
// automatically include the trailing zero.
llvm.mlir.global @string("abc") : !llvm.array<3 x i8>

// For strings globals, the trailing type may be omitted.
llvm.mlir.global constant @no_trailing_type("foo bar")

// A complex initializer is constructed with an initializer region.
llvm.mlir.global constant @int_gep() : !llvm.ptr {
  %0 = llvm.mlir.addressof @g2 : !llvm.ptr
  %1 = llvm.mlir.constant(2 : i32) : i32
  %2 = llvm.getelementptr %0[%1]
     : (!llvm.ptr, i32) -> !llvm.ptr, i32
  llvm.return %2 : !llvm.ptr
}

Similarly to functions, globals have a linkage attribute. In the custom syntax, this attribute is placed between llvm.mlir.global and the optional constant keyword. If the attribute is omitted, external linkage is assumed by default.

Examples:

// A constant with internal linkage will not participate in linking.
llvm.mlir.global internal constant @cst(42 : i32) : i32

// By default, "external" linkage is assumed and the global participates in
// symbol resolution at link-time.
llvm.mlir.global @glob(0 : f32) : f32

// Alignment is optional
llvm.mlir.global private constant @y(dense<1.0> : tensor<8xf32>) : !llvm.array<8 x f32>

Like global variables in LLVM IR, globals can have an (optional) alignment attribute using keyword alignment. The integer value of the alignment must be a positive integer that is a power of 2.

Examples:

// Alignment is optional
llvm.mlir.global private constant @y(dense<1.0> : tensor<8xf32>) { alignment = 32 : i64 } : !llvm.array<8 x f32>

icmp

 

inline_asm

The InlineAsmOp mirrors the underlying LLVM semantics with a notable exception: the embedded asm_string is not allowed to define or reference any symbol or any global variable: only the operands of the op may be read, written, or referenced. Attempting to define or reference any symbol or any global behavior is considered undefined behavior at this time.

inline_asm :: MonadBlockBuilder m => Maybe Type -> [Value] -> ByteString -> ByteString -> Maybe [Attribute] -> m Value Source #

A builder for llvm.inline_asm.

insertelement

 

pattern InsertElement :: Location -> Type -> operand -> operand -> operand -> AbstractOperation operand Source #

A pattern for llvm.insertelement.

insertelement :: MonadBlockBuilder m => Type -> Value -> Value -> Value -> m Value Source #

A builder for llvm.insertelement.

insertvalue

 

inttoptr

 

pattern IntToPtr :: Location -> Type -> operand -> AbstractOperation operand Source #

A pattern for llvm.inttoptr.

inttoptr :: MonadBlockBuilder m => Type -> Value -> m Value Source #

A builder for llvm.inttoptr.

invoke

 

func

MLIR functions are defined by an operation that is not built into the IR itself. The LLVM dialect provides an llvm.func operation to define functions compatible with LLVM IR. These functions have LLVM dialect function type but use MLIR syntax to express it. They are required to have exactly one result type. LLVM function operation is intended to capture additional properties of LLVM functions, such as linkage and calling convention, that may be modeled differently by the built-in MLIR function.

// The type of @bar is !llvm<"i64 (i64)">
llvm.func @bar(%arg0: i64) -> i64 {
  llvm.return %arg0 : i64
}

// Type type of @foo is !llvm<"void (i64)">
// !llvm.void type is omitted
llvm.func @foo(%arg0: i64) {
  llvm.return
}

// A function with internal linkage.
llvm.func internal @internal_func() {
  llvm.return
}

lshr

 

pattern LShr :: Location -> Type -> operand -> operand -> AbstractOperation operand Source #

A pattern for llvm.lshr.

lshr :: MonadBlockBuilder m => Value -> Value -> m Value Source #

A builder for llvm.lshr.

landingpad

 

pattern Landingpad :: Location -> Type -> [operand] -> AbstractOperation operand Source #

A pattern for llvm.landingpad.

landingpad :: MonadBlockBuilder m => Type -> [Value] -> m Value Source #

A builder for llvm.landingpad.

linker_options

Pass the given options to the linker when the resulting object file is linked. This is used extensively on Windows to determine the C runtime that the object files should link against.

Examples: @ // Link against the MSVC static threaded CRT. llvm.linker_options ["/DEFAULTLIB:", "libcmt"]

// Link against aarch64 compiler-rt builtins llvm.linker_options ["-l", "clang_rt.builtins-aarch64"] @

load

The load operation is used to read from memory. A load may be marked as atomic, volatile, and/or nontemporal, and takes a number of optional attributes that specify aliasing information.

An atomic load only supports a limited set of pointer, integer, and floating point types, and requires an explicit alignment.

Examples: @ // A volatile load of a float variable. %0 = llvm.load volatile %ptr : !llvm.ptr -> f32

// A nontemporal load of a float variable. %0 = llvm.load %ptr {nontemporal} : !llvm.ptr -> f32

// An atomic load of an integer variable. %0 = llvm.load %ptr atomic monotonic {alignment = 8 : i64} : !llvm.ptr -> i64 @

See the following link for more details: https://llvm.org/docs/LangRef.html\#load-instruction

pattern Load :: Location -> Type -> operand -> Maybe Int -> Maybe ByteString -> AbstractOperation operand Source #

A pattern for llvm.load.

load :: MonadBlockBuilder m => Type -> Value -> Maybe Int -> Maybe ByteString -> m Value Source #

A builder for llvm.load.

mul

 

pattern Mul :: Location -> Type -> operand -> operand -> AbstractOperation operand Source #

A pattern for llvm.mul.

mul :: MonadBlockBuilder m => Value -> Value -> m Value Source #

A builder for llvm.mul.

mlir.none

Unlike LLVM IR, MLIR does not have first-class token values. They must be explicitly created as SSA values using llvm.mlir.none. This operation has no operands or attributes, and returns a none token value of a wrapped LLVM IR pointer type.

Examples:

%0 = llvm.mlir.none : !llvm.token

pattern NoneToken :: Location -> Type -> AbstractOperation operand Source #

A pattern for llvm.mlir.none.

mlir_none :: MonadBlockBuilder m => Type -> m Value Source #

A builder for llvm.mlir.none.

or

 

pattern Or :: Location -> Type -> operand -> operand -> AbstractOperation operand Source #

A pattern for llvm.or.

or :: MonadBlockBuilder m => Value -> Value -> m Value Source #

A builder for llvm.or.

mlir.poison

Unlike LLVM IR, MLIR does not have first-class poison values. Such values must be created as SSA values using llvm.mlir.poison. This operation has no operands or attributes. It creates a poison value of the specified LLVM IR dialect type.

Example:

// Create a poison value for a structure with a 32-bit integer followed
// by a float.
%0 = llvm.mlir.poison : !llvm.struct<(i32, f32)>

pattern Poison :: Location -> Type -> AbstractOperation operand Source #

A pattern for llvm.mlir.poison.

mlir_poison :: MonadBlockBuilder m => Type -> m Value Source #

A builder for llvm.mlir.poison.

ptrtoint

 

pattern PtrToInt :: Location -> Type -> operand -> AbstractOperation operand Source #

A pattern for llvm.ptrtoint.

ptrtoint :: MonadBlockBuilder m => Type -> Value -> m Value Source #

A builder for llvm.ptrtoint.

resume

 

pattern Resume :: Location -> operand -> AbstractOperation operand Source #

A pattern for llvm.resume.

resume :: MonadBlockBuilder m => Value -> m EndOfBlock Source #

A builder for llvm.resume.

return

 

return :: MonadBlockBuilder m => Maybe Value -> m EndOfBlock Source #

A builder for llvm.return.

sdiv

 

pattern SDiv :: Location -> Type -> operand -> operand -> AbstractOperation operand Source #

A pattern for llvm.sdiv.

sdiv :: MonadBlockBuilder m => Value -> Value -> m Value Source #

A builder for llvm.sdiv.

sext

 

pattern SExt :: Location -> Type -> operand -> AbstractOperation operand Source #

A pattern for llvm.sext.

sext :: MonadBlockBuilder m => Type -> Value -> m Value Source #

A builder for llvm.sext.

sitofp

 

pattern SIToFP :: Location -> Type -> operand -> AbstractOperation operand Source #

A pattern for llvm.sitofp.

sitofp :: MonadBlockBuilder m => Type -> Value -> m Value Source #

A builder for llvm.sitofp.

srem

 

pattern SRem :: Location -> Type -> operand -> operand -> AbstractOperation operand Source #

A pattern for llvm.srem.

srem :: MonadBlockBuilder m => Value -> Value -> m Value Source #

A builder for llvm.srem.

select

 

pattern Select :: Location -> Type -> operand -> operand -> operand -> AbstractOperation operand Source #

A pattern for llvm.select.

select :: MonadBlockBuilder m => Type -> Value -> Value -> Value -> m Value Source #

A builder for llvm.select.

shl

 

pattern Shl :: Location -> Type -> operand -> operand -> AbstractOperation operand Source #

A pattern for llvm.shl.

shl :: MonadBlockBuilder m => Value -> Value -> m Value Source #

A builder for llvm.shl.

shufflevector

 

pattern ShuffleVector :: Location -> Type -> operand -> operand -> [Int] -> AbstractOperation operand Source #

A pattern for llvm.shufflevector.

shufflevector :: MonadBlockBuilder m => Type -> Value -> Value -> [Int] -> m Value Source #

A builder for llvm.shufflevector.

store

The store operation is used to write to memory. A store may be marked as atomic, volatile, and/or nontemporal, and takes a number of optional attributes that specify aliasing information.

An atomic store only supports a limited set of pointer, integer, and floating point types, and requires an explicit alignment.

Examples: @ // A volatile store of a float variable. llvm.store volatile %val, %ptr : f32, !llvm.ptr

// A nontemporal store of a float variable. llvm.store %val, %ptr {nontemporal} : f32, !llvm.ptr

// An atomic store of an integer variable. llvm.store %val, %ptr atomic monotonic {alignment = 8 : i64} : i64, !llvm.ptr @

See the following link for more details: https://llvm.org/docs/LangRef.html\#store-instruction

pattern Store :: Location -> operand -> operand -> Maybe Int -> Maybe ByteString -> AbstractOperation operand Source #

A pattern for llvm.store.

store :: MonadBlockBuilder m => Value -> Value -> Maybe Int -> Maybe ByteString -> m () Source #

A builder for llvm.store.

sub

 

pattern Sub :: Location -> Type -> operand -> operand -> AbstractOperation operand Source #

A pattern for llvm.sub.

sub :: MonadBlockBuilder m => Value -> Value -> m Value Source #

A builder for llvm.sub.

switch

 

trunc

 

pattern Trunc :: Location -> Type -> operand -> AbstractOperation operand Source #

A pattern for llvm.trunc.

trunc :: MonadBlockBuilder m => Type -> Value -> m Value Source #

A builder for llvm.trunc.

udiv

 

pattern UDiv :: Location -> Type -> operand -> operand -> AbstractOperation operand Source #

A pattern for llvm.udiv.

udiv :: MonadBlockBuilder m => Value -> Value -> m Value Source #

A builder for llvm.udiv.

uitofp

 

pattern UIToFP :: Location -> Type -> operand -> AbstractOperation operand Source #

A pattern for llvm.uitofp.

uitofp :: MonadBlockBuilder m => Type -> Value -> m Value Source #

A builder for llvm.uitofp.

urem

 

pattern URem :: Location -> Type -> operand -> operand -> AbstractOperation operand Source #

A pattern for llvm.urem.

urem :: MonadBlockBuilder m => Value -> Value -> m Value Source #

A builder for llvm.urem.

mlir.undef

Unlike LLVM IR, MLIR does not have first-class undefined values. Such values must be created as SSA values using llvm.mlir.undef. This operation has no operands or attributes. It creates an undefined value of the specified LLVM IR dialect type.

Example:

// Create a structure with a 32-bit integer followed by a float.
%0 = llvm.mlir.undef : !llvm.struct<(i32, f32)>

pattern Undef :: Location -> Type -> AbstractOperation operand Source #

A pattern for llvm.mlir.undef.

mlir_undef :: MonadBlockBuilder m => Type -> m Value Source #

A builder for llvm.mlir.undef.

unreachable

 

pattern Unreachable :: Location -> AbstractOperation operand Source #

A pattern for llvm.unreachable.

unreachable :: MonadBlockBuilder m => m EndOfBlock Source #

A builder for llvm.unreachable.

xor

 

pattern XOr :: Location -> Type -> operand -> operand -> AbstractOperation operand Source #

A pattern for llvm.xor.

xor :: MonadBlockBuilder m => Value -> Value -> m Value Source #

A builder for llvm.xor.

zext

 

pattern ZExt :: Location -> Type -> operand -> AbstractOperation operand Source #

A pattern for llvm.zext.

zext :: MonadBlockBuilder m => Type -> Value -> m Value Source #

A builder for llvm.zext.

mlir.zero

Unlike LLVM IR, MLIR does not have first-class zero-initialized values. Such values must be created as SSA values using llvm.mlir.zero. This operation has no operands or attributes. It creates a zero-initialized value of the specified LLVM IR dialect type.

Example:

// Create a zero-initialized value for a structure with a 32-bit integer
// followed by a float.
%0 = llvm.mlir.zero : !llvm.struct<(i32, f32)>

pattern Zero :: Location -> Type -> AbstractOperation operand Source #

A pattern for llvm.mlir.zero.

mlir_zero :: MonadBlockBuilder m => Type -> m Value Source #

A builder for llvm.mlir.zero.