diff --git a/.nojekyll b/.nojekyll new file mode 100644 index 0000000000..e69de29bb2 diff --git a/404.html b/404.html new file mode 100644 index 0000000000..64307aa8fe --- /dev/null +++ b/404.html @@ -0,0 +1,880 @@ + + + +
+ + + + + + + + + + + + + +First, thanks for your interest in contributing to VAST! We welcome and +appreciate all contributions, including bug reports, feature suggestions, +tutorials/blog posts, and code improvements.
+If you're unsure where to start, we recommend our good first issue
issue label.
Bug reports and feature suggestions can be submitted to our issue tracker.
+When reporting a bug please provide a minimal example with steps to reproduce the issue +if possible. It helps us a lot, as we can get to the bottom of the issue much faster and can +even use it as a test case to catch future regressions.
+Questions can be submitted to the discussion page.
+For legal reasons, we require contributors to sign our Contributor License +Agreement. This will be +automatically checked as part of our CI.
+VAST uses the pull request contribution model. Please make an account on +Github, fork this repo, and submit code contributions via pull request. For +more documentation, look here.
+Since VAST does not squash commits in a pull request, it is important to uphold +some culture when it comes to commits.
+component: Simple sentence with a dot.
with maximum of 80 chars and optional longer
+ message.git log
on the modified file(s).Some pull request guidelines:
+VAST partially models ABI specifications for function types and therefore +callsites. While the specification goes into details regarding registers, for +now VAST only offers lowering similar to what clang codegen does - argument and +return types are coerced to types that will easily fit their respective +registers once that allocation takes place. There is nothing preventing +inclusion of information about registers as well (for example as metadata or +separate operations/dialect), however it is not yet implemented.
+Similar to other transformation in VAST, ABI modelling tries to be as modular as +possible and as such can be split into three distinct steps:
+Main goal for now is to lower function prototypes to match the types produced by +clang, so that VAST emitted LLVM can be used as drop-in replacement for clang +one.
+When reading this document please keep in mind that implementation of this +feature is still ongoing and therefore particular technical details could change +drastically (although we hope that overall design will remain the same).
+Mirrors what clang does, but instead of locking the computed information away,
+we expose the API. In ideal world we would like to keep the algorithm(s, as
+there may be multiple per different ABIs) generic. This can be achieved by
+requiring users to implement & provide interface that specifies various details
+about used types; algorithm will be same when talking about hl
or LLVM
types
+after all.
Once classification for a function is computed, we need to:
+sret
.To facilitate this, VAST contains abi
dialect, which operations encode
+"high-level" descriptions of type transformations that can occur during ABI
+lowering as operations. This is not very different from what clang does, but
+VAST does it over multiple steps.
For functions, type change itself is easy and to mark that function is
+transformed, abi.func
operation is used instead of original one to define the
+newly formed function. However, as arguments and return types are different, we
+introduce abi.prologue
and abi.epilogue
operations.
Consider following function we want to lower:
+Disclaimer: Since abi
dialect does not have nice formatting, therefore examples in
+this section contain some artistic liberty, but semantics (and operations) are
+preserved.
strut Point{ int; int; int; };
+
+int size( struct Point p ) { ... }
+
+After running the classification, we discover that type of size
should be
+( i64, i32 ) -> i32
- both arguments and
+returned value are passed directly. Therefore we encode it as follows:
abi.func size(i64 %arg0_0, i32 %arg0_1 ) -> i32
+{
+ %arg = abi.prologue -> hl.lvalue< hl.struct< "Point" > >
+ {
+ %0 = abi.direct %arg0_0, %arg0_1: (i64, i32) -> hl.struct< "Point" >
+ abi.yield %0
+ }
+
+ // Computation can continue as before, because %arg has a correct type
+
+ %ret = ... value that was previously returned ... -> i32
+ %out = abi.epilogue
+ {
+ %0 = abi.direct %ret: i32 -> i32
+ abi.yield %0
+ }
+ hl.return %out
+}
+
+In case, there were multiple function arguments, the abi.prologue
would return
+more values.
+%args = abi.prologue -> (hl.lvalue< hl.struct< "Point" > >, i32 )
+{
+ %0 = abi.direct %arg0_0, %arg0_1
+ %1 = abi.direct %arg1
+ abi.yield %0, %1
+}
+
+TODO: Add extra examples, at least memory
and sret
.
This design allows easy analysis and subsequent rewrite (as each function has a +prologue and epilogue and returned values are explicitly yielded).
+Callsites are transformed in the same manner (unfortunately, they look more +complicated due to nested regions):
+
+%x = hl.call< "size" > %arg: hl.struct< "Point" > -> i32
+
+%x = abi.call< "size" >: () -> i32
+{
+ %arg0_0, %arg0_1 = abi.call_args: () -> (i64, i32)
+ {
+ %0, %1 = abi.direct %arg
+ abi.yield %0, %1
+ }
+ %x' = hl.call< "size" > %arg0_0, &arg0_1 : (i64, i32) -> i32
+ %0 = abi.call_rets : () -> i32
+ {
+ %0 = abi.direct %x' : i32 -> i32
+ abi.yield %0
+ }
+ abi.yield %0
+}
+
+
+For now, same abi
operations are used to encode transformation in callsite and
+function (although they change the value in a "opposite direction"), this may be
+later revisited, but for now it is enough to look at the parent operation to
+determine whether the transformation lies in a function or callsite.
While abi
dialect provides us with all the information required to do the
+transformation, it does not "compute" anything. Rather this lowering is left to
+a next pass. We hope by splitting the transformation into 2,
+we achieve the following:
hl
, llvm
or totally
+ random dialect of user choice.The proposed way of parameter passing for next-gen c++ is to use declarative style:
+f( in X x) // x can be read from
+f( inout X x) // x can be used in read and write
+f( out X x) // x can be writen to
+f( move X x) // x will be moved from
+f(forward X x) // x will be passed along
+
+Similar holds for return values:
+auto f() move X { /* ... */ } // move X to caller
+auto f() X { /* ... */ } // possibly same
+auto f() forward X { /* ... */ } // pass along X to the caller
+
+Using the semantics aware vast dialects, we can design a method to automatically modernize code to use a declarative style of parameter passing.
++CPP + | ++CPP2 + | +
---|---|
+
+
+void f(const X& x) {
+ g(x);
+}
+
+ |
+
+
+
+void f(in X x) {
+ g(x);
+}
+
+ |
+
+VAST high-level dialect + | ++Transformed to parameter dialect + | +
+
+
+hl.func @f(%x: !hl.ref< !hl.lvalue< !hl.struct< "X" > >, const >) {
+ %0 = hl.call @g(%x) : (!hl.ref< !hl.lvalue< !hl.struct< "X" > >, const >) -> !hl.void
+}
+
+ |
+
+
+
+hl.func @f(%x: !par.in< !hl.lvalue< !hl.struct< "X" > > >) {
+ %0 = hl.call @g(%x) : (!par.in< !hl.lvalue< !hl.struct< "X" > > >) -> !hl.void
+}
+
+ |
+
The transformation will be probably overapproximating, in cases when the analysis cannot determine the precise category, i.e., inout
oveapproximates in
and out
parameters.
The dialect will define type adaptors for each parameter category:
+!par.in< T >
+!par.out< T >
+!par.inout< T >
+!par.move< T >
+!par.forward< T >
+
+Parameter categories can also be present as type attributes not to mess up the rest of the type trait system. +This needs further investigation.
+The advantage of the type adaptors we can enforce the correct usage of values. For example, we can forbid usage of out
parameter in other places than assignment.
Currently, it is necessary to use clang
(due to gcc
bug) to build VAST. On Linux it is also necessary to use lld
at the moment.
VAST uses llvm-17
which can be obtained from the repository provided by LLVM.
Before building (for Ubuntu) get all the necessary dependencies by running
+apt-get install build-essential cmake ninja-build libstdc++-12-dev llvm-17 libmlir-17 libmlir-17-dev mlir-17-tools libclang-17-dev
+
+or an equivalent command for your operating system of choice.
+To configure project run cmake
with following default options.
+In case clang
isn't your default compiler prefix the command with CC=clang CXX=clang++
.
+If you want to use system installed llvm
and mlir
(on Ubuntu) use:
cmake --preset ninja-multi-default \
+ --toolchain ./cmake/lld.toolchain.cmake \
+ -DCMAKE_PREFIX_PATH=/usr/lib/llvm-17/
+
+To use a specific llvm
provide -DCMAKE_PREFIX_PATH=<llvm & mlir instalation paths>
option, where CMAKE_PREFIX_PATH
points to directory containing LLVMConfig.cmake
and MLIRConfig.cmake
.
Note: vast requires LLVM with RTTI enabled. Use LLVM_ENABLE_RTTI=ON
if you build your own LLVM.
Finally, build the project:
+cmake --build --preset ninja-rel
+
+Use ninja-deb
preset for debug build.
To run mlir codegen of highlevel dialect use.
+./builds/ninja-multi-default/tools/vast-front/Release/vast-front -vast-emit-mlir=<dialect> <input.c> -o <output.mlir>
+
+Supported dialects are: hl
, ll
, llvm
ctest --preset ninja-deb
+
+
+
+
+
+
+
+ VAST makes use of the MLIR infrastructure to facilitate the reproduction of crashes within the pipeline. You can refer to the MLIR documentation on crash and failure reproduction for more details. We provide a similar set of options in vast-front to aid in debugging.
+To generate a minimal reproducer for a crashed pipeline of vast-front
, use the following option:
-vast-emit-crash-reproducer="reproducer.mlir"
+
+This option disables multithreading to ensure a comprehensive crash report. You can then load and examine the crash report using the following command:
+vast-opt -run-reproducer reproducer.mlir
+
+To obtain a detailed insight into the pipeline, you can use the following option of vast-front
:
-vast-print-pipeline
+
+This option dumps the pipeline string to the standard error stream. You can use this information for a more specific investigation of the pipeline. Execute the pipeline with the printed string using the following command:
+vast-opt --pass-pipeline="pipeline-string"
+
+With the -vast-debug
option, you get more detailed crash reports. It shows MLIR operations when there's an error and provides current stack traces.
VAST offers a handy script to generate a variety of MLIR primitives. You can find the script at scripts/templater.py. This tool is designed to help you create dialects, passes, operations, types, and attributes interactively.
+Just run the script. It has been designed to provide a guided process for generating the desired primitives. If you find anything confusing or unintuitive, please don't hesitate to open an issue so that we can address it.
+When you run the script, it will generate the basic skeleton for your chosen primitive. It will list the generated files which you can freely modify to provide desired functionality.
+ + + + + + +WIP vast-front
VAST provides an implementation of LSP language server in the form of the vast-lsp-server
tool. This tool interacts with the MLIR C++ API to support rich language queries, such as “Find Definition”.
The tool easily integrates with VSCode extension MLIR. The user needs to point the extension to mlir-lsp-server
. To do so, one can create a symbolic link named mlir-lsp-server
to point to built vast-lsp-server
.
To build vast-lsp-server
use:
cmake --build <build-dir> --target vast-lsp-server
+
+
+
+
+
+
+
+ After mlir
module from vast-cc
is produced, we can leverage our optimisation pipeline to transform module in various ways. The lowest level we can do is LLVM dialect, from which we can dump LLVM IR if desired.
Overall design philosophy is that passes try to be really modular, self-contained and doing one thing properly - all while trying to preserve provenance metadata. Sometimes this does not exactly hold (transformation from HL
into LL
is huge) but it is what we strive for. Passes will more often than not have some dependencies between themselves - always consult documentation if unsure and report an issue if wiki is out of date on this.
TODO: Improve once we have examples
+TL;DR: Vast provided passes always try to keep metadata (and they should do a good job), but for passes from other sources this does not hold and probably some heuristic will be used to re-compute them in best-effort.
+Passes we have implemented can be roughly grouped into several categories. We also note some of the native mlir passes that are needed to continue with transformations to reach LLVM dialect.
+A common prerequisite for other passes is to lower HL
types into standard types. This can be done in two steps:
+ * --vast-hl-lower-types
+ - Converts simple (non-struct) types according to provided data layout (embedded in the mlir module metadata).
+ * --vast-hl-structs-to-tuples
+ - Converts HL
struct types into standard tuples
While these should be commutative, the preferred order is --vast-hl-lower-types --vast-hl-structs-to-tuples
--vast-hl-to-scf
HL
control flow ops (currently only hl.if
and hl.while
) into their scf
equivalents. Since scf
requires i1
in their conditions, additional casts may be inserted to satisfy this requirement (currently they are emitted in HL
however this behaviour should customisable eventually.To produce an LLVM following addition passes must be run
+--convert-scf-to-std --convert-std-to-llvm
and possibly --vast-hl-to-ll
as well (or some equivalent, depending on how conditions are coerced)
--vast-hl-to-ll
HL
operation into their LLVM dialect equivalents - this is a rather huge pass, for details see its documentation.--vast-llvm-dump
llvm::errs()
in human readable form. Since passes can run in parallel, dump to file is non-trivial.Let's say we have file main.c
which we want to lower into some dialect. First let's have a look at some generic invocations we may find handy:
To get mlir module via vast-cc
vast-cc --ccopts -xc --from-source main.c
+
+A quick remainder
+ * --ccopts -xc
says we are doing C
not C++
+ * --from-source file
says that source code comes from the file
Once we have the module, we can invoke vast-opt
, with easiest way being a simple pipe
vast-cc --ccopts -xc --from-source main.c | vast-opt pass-we-want another-pass-we-want
+
+If we want, we can also chain pipes
+vast-cc --ccopts -xc --from-source main.c | vast-opt pass | vast-opt another-pass | ...
+
+Now, let's say we want to lower into LLVM bitcode, therefore the invocation will look as follows
+vast-cc --ccopts -xc --from-source main.c | vast-opt --vast-hl-lower-types --vast-hl-structs-to-tuples
+ --vast-hl-to-scf --convert-scf-to-std --convert-std-to-llvm
+ --vast-hl-to-ll
+
+
+
+
+
+
+
+ vast-query
is a command line tool to query symbols in the vast generated MLIR. Its primary purpose is to test symbols and their use edges in the produced MLIR. Example of usage:
vast-query [options] <input file>
+
+Options:
+ --scope=<function name> - Show values from scope of a given function
+ --show-symbols=<value> - Show MLIR symbols
+ =functions - show function symbols
+ =types - show type symbols
+ =records - show record symbols
+ =vars - show variable symbols
+ =globs - show global variable symbols
+ =all - show all symbols
+ --symbol-users=<symbol name> - Show users of a given symbol
+
+
+
+
+
+
+
+ WIP vast-repl
is an interactive MLIR query and modification tool.
Commands:
+exit - exits repl
+
+help - prints help
+load <filename> - loads source from file
+
+show <value> - displays queried value
+ =source - loaded source code
+ =ast - clang ast
+ =module - current VAST MLIR module
+ =symbols - present symbols in the module
+
+meta <action> - operates on metadata for given symbol
+ =add <symbol> <id> - adds <id> meta to <symbol>
+ =get <id> - gets symbol with <id> meta
+
+
+
+
+
+
+
+ A vast ABI dialect. +Dialect provides operations to describe how arguments and return values +are transformed to better model target abi.
+abi.call
(::vast::abi::CallOp)ABI call operation
+Syntax:
+operation ::= `abi.call` $callee `(` $args `)` attr-dict `:` functional-type( $args, $results )
+
+ABI call operation +Interfaces: CallOpInterface
+Attribute | +MLIR Type | +Description | +
---|---|---|
callee |
+::mlir::FlatSymbolRefAttr | +flat symbol reference attribute | +
Operand | +Description | +
---|---|
args |
+any type | +
Result | +Description | +
---|---|
results |
+any type | +
abi.call_args
(::vast::abi::CallArgsOp)Not implement yet.
+Syntax:
+operation ::= `abi.call_args` $body attr-dict `:` type($results)
+
+WIP
+Result | +Description | +
---|---|
results |
+any type | +
abi.call_exec
(::vast::abi::CallExecutionOp)WIP
+Syntax:
+operation ::= `abi.call_exec` $callee `(` $args `)` $body attr-dict `:` functional-type($args, $result)
+
+WIP +Interfaces: CallOpInterface
+Attribute | +MLIR Type | +Description | +
---|---|---|
callee |
+::mlir::FlatSymbolRefAttr | +flat symbol reference attribute | +
Operand | +Description | +
---|---|
args |
+any type | +
Result | +Description | +
---|---|
result |
+any type | +
abi.call_rets
(::vast::abi::CallRetsOp)Not implement yet.
+Syntax:
+operation ::= `abi.call_rets` $body attr-dict `:` type($results)
+
+WIP
+Result | +Description | +
---|---|
results |
+any type | +
abi.direct
(::vast::abi::DirectOp)Pass value directly - usually means by register
+Syntax:
+operation ::= `abi.direct` $value attr-dict `:` type($value) `->` type($result)
+
+Pass value directly - usually means by register.
+Operand | +Description | +
---|---|
value |
+any type | +
Result | +Description | +
---|---|
result |
+any type | +
abi.epilogue
(::vast::abi::EpilogueOp)WIP
+Syntax:
+operation ::= `abi.epilogue` $body attr-dict `:` type($results)
+
+WIP
+Result | +Description | +
---|---|
results |
+any type | +
abi.func
(::vast::abi::FuncOp)_ Function with transformed type. _
+Syntax:
+operation ::= `abi.func` $sym_name custom< FunctionSignatureAndBody >($function_type, attr-dict, $body)
+
+Placeholder.
+Traits: AutomaticAllocationScope, IsolatedFromAbove, NoTerminator
+Interfaces: CallableOpInterface, FunctionOpInterface, RegionKindInterface, Symbol
+Attribute | +MLIR Type | +Description | +
---|---|---|
sym_name |
+::mlir::StringAttr | +string attribute | +
function_type |
+::mlir::TypeAttr | +type attribute of function type | +
linkage |
+::vast::core::GlobalLinkageKindAttr | +global linkage kind | +
sym_visibility |
+::mlir::StringAttr | +string attribute | +
arg_attrs |
+::mlir::ArrayAttr | +Array of dictionary attributes | +
res_attrs |
+::mlir::ArrayAttr | +Array of dictionary attributes | +
abi.indirect
(::vast::abi::IndirectOp)Value is passed indirectly via memory
+Syntax:
+operation ::= `abi.indirect` $value attr-dict `:` type($value) `->` type($result)
+
+Value is passed indirectly via memory
+Operand | +Description | +
---|---|
value |
+any type | +
Result | +Description | +
---|---|
result |
+any type | +
abi.prologue
(::vast::abi::PrologueOp)WIP
+Syntax:
+operation ::= `abi.prologue` $body attr-dict `:` type($results)
+
+WIP
+Result | +Description | +
---|---|
results |
+any type | +
abi.ret_direct
(::vast::abi::RetDirectOp)Value is returned directly.
+Syntax:
+operation ::= `abi.ret_direct` $value attr-dict `:` type($value) `->` type($result)
+
+Value is returned directly.
+Operand | +Description | +
---|---|
value |
+any type | +
Result | +Description | +
---|---|
result |
+any type | +
abi.todo
(::vast::abi::TodoOp)Not implement yet.
+Syntax:
+operation ::= `abi.todo` $value attr-dict `:` type($value) `->` type($result)
+
+Not implemented yet
+Operand | +Description | +
---|---|
value |
+any type | +
Result | +Description | +
---|---|
result |
+any type | +
abi.wrap_fn
(::vast::abi::WrapFuncOp)_ Function that defines abi transformation of args. _
+Syntax:
+operation ::= `abi.wrap_fn` $sym_name custom< FunctionSignatureAndBody >($function_type, attr-dict, $body)
+
+Placeholder.
+Traits: AutomaticAllocationScope, IsolatedFromAbove, NoTerminator
+Interfaces: CallableOpInterface, FunctionOpInterface, RegionKindInterface, Symbol
+Attribute | +MLIR Type | +Description | +
---|---|---|
sym_name |
+::mlir::StringAttr | +string attribute | +
function_type |
+::mlir::TypeAttr | +type attribute of function type | +
linkage |
+::vast::core::GlobalLinkageKindAttr | +global linkage kind | +
sym_visibility |
+::mlir::StringAttr | +string attribute | +
arg_attrs |
+::mlir::ArrayAttr | +Array of dictionary attributes | +
res_attrs |
+::mlir::ArrayAttr | +Array of dictionary attributes | +
abi.yield
(::vast::abi::YieldOp)WIP
+Syntax:
+operation ::= `abi.yield` $values attr-dict `:` type($values) `->` type($result)
+
+WIP +Traits: Terminator
+Operand | +Description | +
---|---|
values |
+any type | +
Result | +Description | +
---|---|
result |
+any type | +
Utility dialect to provide common features for other dialects. +Dialect providing features that may be used by other dialects. +These features can be used by including "vast/Dialect/Core/Utils.td" +It also provides lazy.op for lazy evaluation of expressions and +binary logical operations that make use of it.
+core.bin.land
(::vast::core::BinLAndOp)VAST core dialect logical binary operation
+Syntax:
+operation ::= `core.bin.land` $lhs `,` $rhs attr-dict `:` functional-type(operands, results)
+
+Core dialect logical binary operation. This operation takes two operands +and returns one result, each of these is required to be of the same +type.
+The custom assembly form of the operation is as follows:
+%result =
Operand | +Description | +
---|---|
lhs |
+any type | +
rhs |
+any type | +
Result | +Description | +
---|---|
result |
+any type | +
core.bin.lor
(::vast::core::BinLOrOp)VAST core dialect logical binary operation
+Syntax:
+operation ::= `core.bin.lor` $lhs `,` $rhs attr-dict `:` functional-type(operands, results)
+
+Core dialect logical binary operation. This operation takes two operands +and returns one result, each of these is required to be of the same +type.
+The custom assembly form of the operation is as follows:
+%result =
Operand | +Description | +
---|---|
lhs |
+any type | +
rhs |
+any type | +
Result | +Description | +
---|---|
result |
+any type | +
core.implicit.return
(::vast::core::ImplicitReturnOp)VAST implicit return
+Syntax:
+operation ::= `core.implicit.return` $result `:` type($result) attr-dict
+
+Op representing return that wasn't explicitely written in the source (e.g. in void fun(){}).
+Traits: return_trait, soft_terminator
+Operand | +Description | +
---|---|
result |
+any type | +
core.lazy.op
(::vast::core::LazyOp)Lazily evaluate a region.
+Syntax:
+operation ::= `core.lazy.op` $lazy attr-dict `:` type(results)
+
+The operation serves to encapsulate delayed evaluation in its region.
+Traits: NoTerminator
+Result | +Description | +
---|---|
result |
+any type | +
core.scope
(::vast::core::ScopeOp)VAST scope declaration
+Syntax:
+operation ::= `core.scope` $body attr-dict
+
+Scope operation servers to represent explicitly high-level code scope. +Other control flow operations represent scopes implicitly. It is a +single-region operation.
+Traits: NoTerminator
+Interfaces: RegionKindInterface
+core.select
(::vast::core::SelectOp)Select a value based on condition.
+Syntax:
+operation ::= `core.select` $cond `,` $thenRegion `,` $elseRegion attr-dict `:` functional-type(operands, results)
+
+Usual select operation. First operand is selected if predicate is true, second +otherwise (to mirror how ternary works in C).
+%result =
Operand | +Description | +
---|---|
cond |
+any type | +
thenRegion |
+any type | +
elseRegion |
+any type | +
Result | +Description | +
---|---|
results |
+any type | +
An Attribute containing a boolean value
+Syntax:
+#core.bool<
+ ::mlir::Type, # type
+ bool # value
+>
+
+An boolean attribute is a literal attribute that represents a boolean value.
+Parameter | +C++ type | +Description | +
---|---|---|
type | +::mlir::Type |
++ |
value | +bool |
++ |
Linkage type/kind
+Syntax:
+#core.global_linkage_kind<
+ ::vast::core::GlobalLinkageKind # value
+>
+
+Parameter | +C++ type | +Description | +
---|---|---|
value | +::vast::core::GlobalLinkageKind |
+an enum of type GlobalLinkageKind | +
An Attribute containing a floating point value
+Syntax:
+#core.float<
+ ::mlir::Type, # type
+ ::llvm::APFloat # value
+>
+
+A float attribute is a literal attribute that represents a floating point +value of the specified floating point type.
+Parameter | +C++ type | +Description | +
---|---|---|
type | +::mlir::Type |
++ |
value | +::llvm::APFloat |
++ |
An Attribute containing a integer value
+Syntax:
+#core.integer<
+ ::mlir::Type, # type
+ ::llvm::APSInt # value
+>
+
+An integer attribute is a literal attribute that represents an integral +value of the specified integer type.
+Parameter | +C++ type | +Description | +
---|---|---|
type | +::mlir::Type |
++ |
value | +::llvm::APSInt |
++ |
Module source language
+Syntax:
+#core.lang<
+ ::vast::core::SourceLanguage # value
+>
+
+Represents the source language used to generate the module.
+Example:
+// Module compiled from C.
+module attributes {vast.core.lang = vast.core.lang<c>} {}
+// Module compiled from C++.
+module attributes {vast.core.lang = vast.core.lang<cxx>} {}
+
+Parameter | +C++ type | +Description | +
---|---|---|
value | +::vast::core::SourceLanguage |
+an enum of type SourceLanguage | +
Attribute to represent void value.
+Syntax:
+#core.void<
+ ::mlir::Type # type
+>
+
+The VoidAttr is used to return void from statements uniformly.
+Parameter | +C++ type | +Description | +
---|---|---|
type | +::mlir::Type |
++ |
Vast function type
+Syntax:
+!core.fn<
+ ::llvm::ArrayRef<Type>, # inputs
+ ::llvm::ArrayRef<Type>, # results
+ bool # varArg
+>
+
+The !core.fn
is a function type. It consists of a variadic return type,
+and list of parameter types and can optionally be variadic.
Example:
+!core.fn<!hl.bool ()>
+!core.fn<!hl.int (!hl.char, !hl.char)>
+!core.fn<!i32 (!i32, ...)>
+
+Parameter | +C++ type | +Description | +
---|---|---|
inputs | +::llvm::ArrayRef<Type> |
++ |
results | +::llvm::ArrayRef<Type> |
++ |
varArg | +bool |
++ |
A high-level verbose program analysis MLIR dialect. +This dialect intends capture highevel constructs of C/C++ +for further program analysis.
+hl.access
(::vast::hl::AccessSpecifierOp)VAST C++ access specifier declaration
+Syntax:
+operation ::= `hl.access` attr-dict $spec
+
+VAST C++ access specifier declaration
+Attribute | +MLIR Type | +Description | +
---|---|---|
spec |
+::vast::hl::AccessSpecifierAttr | +Access specifier | +
hl.add
(::vast::hl::AddIOp)VAST arithmetic binary operation
+Syntax:
+operation ::= `hl.add` $lhs `,` $rhs attr-dict `:` functional-type(operands, results)
+
+High-level arithmetic binary operation. This operation takes two operands +and returns one result, each of these is required to be of the same +type.
+The custom assembly form of the operation is as follows:
+%result =
Traits: Commutative
+Operand | +Description | +
---|---|
lhs |
+any type | +
rhs |
+any type | +
Result | +Description | +
---|---|
result |
+any type | +
hl.addressof
(::vast::hl::AddressOf)VAST addressof operation
+Syntax:
+operation ::= `hl.addressof` $value attr-dict `:` type($value) `->` type($result)
+
+VAST addressof operation
+Operand | +Description | +
---|---|
value |
+lvalue to any type | +
Result | +Description | +
---|---|
result |
+any type | +
hl.alignof.expr
(::vast::hl::AlignOfExprOp)VAST expr alignof operator
+Syntax:
+operation ::= `hl.alignof.expr` attr-dict `->` type($result) $expr
+
+VAST expr alignof operator
+Result | +Description | +
---|---|
result |
+integer like type | +
hl.alignof.type
(::vast::hl::AlignOfTypeOp)VAST type alignof operator
+Syntax:
+operation ::= `hl.alignof.type` $arg attr-dict `->` type($result)
+
+VAST type alignof operator
+Attribute | +MLIR Type | +Description | +
---|---|---|
arg |
+::mlir::TypeAttr | +any type attribute | +
Result | +Description | +
---|---|
result |
+integer like type | +
hl.asm
(::vast::hl::AsmOp)VAST operation for inline assembly
+Syntax:
+operation ::= `hl.asm` attr-dict $asm_template `(`($output_names $asm_outputs^ `:` $output_constraints)? `)` `(` (`ins` `:`$input_names $asm_inputs^ `:` $input_constraints)? `)` `(`( $clobbers^)?`)` `(`( $labels^)?`)` `:` functional-type(operands, results)
+
+VAST operation mirroring the GCCAsmStmt in clang AST. It prints + a name for every operand (either its id or user-supplied string). +Traits: AttrSizedOperandSegments
+Attribute | +MLIR Type | +Description | +
---|---|---|
asm_template |
+::mlir::StringAttr | +string attribute | +
is_volatile |
+::mlir::UnitAttr | +unit attribute | +
has_goto |
+::mlir::UnitAttr | +unit attribute | +
output_names |
+::mlir::ArrayAttr | +array attribute | +
input_names |
+::mlir::ArrayAttr | +array attribute | +
output_constraints |
+::mlir::ArrayAttr | +array attribute | +
input_constraints |
+::mlir::ArrayAttr | +array attribute | +
clobbers |
+::mlir::ArrayAttr | +array attribute | +
Operand | +Description | +
---|---|
asm_outputs |
+any type | +
asm_inputs |
+any type | +
labels |
+any type | +
hl.assign
(::vast::hl::AssignOp)VAST compound assign operation
+Syntax:
+operation ::= `hl.assign` $src `to` $dst attr-dict `:` type(operands) `->` type(results)
+
+A compound assign operation represents an assignment operation joined +with an arithmetic operation. It requires the same types for both source +and destination arguments.
+The custom assembly form of the operation is as follows:
+%result =
It represents C compound assignment statement:
+dst =
Interfaces: InferTypeOpInterface
+Operand | +Description | +
---|---|
src |
+lvalue to any type | +
dst |
+any type | +
Result | +Description | +
---|---|
result |
+any type | +
hl.assign.add
(::vast::hl::AddIAssignOp)VAST compound assign operation
+Syntax:
+operation ::= `hl.assign.add` $src `to` $dst attr-dict `:` type(operands) `->` type(results)
+
+A compound assign operation represents an assignment operation joined +with an arithmetic operation. It requires the same types for both source +and destination arguments.
+The custom assembly form of the operation is as follows:
+%result =
It represents C compound assignment statement:
+dst =
Interfaces: InferTypeOpInterface
+Operand | +Description | +
---|---|
src |
+lvalue to any type | +
dst |
+any type | +
Result | +Description | +
---|---|
result |
+any type | +
hl.assign.bin.and
(::vast::hl::BinAndAssignOp)VAST compound assign operation
+Syntax:
+operation ::= `hl.assign.bin.and` $src `to` $dst attr-dict `:` type(operands) `->` type(results)
+
+A compound assign operation represents an assignment operation joined +with an arithmetic operation. It requires the same types for both source +and destination arguments.
+The custom assembly form of the operation is as follows:
+%result =
It represents C compound assignment statement:
+dst =
Interfaces: InferTypeOpInterface
+Operand | +Description | +
---|---|
src |
+lvalue to any type | +
dst |
+any type | +
Result | +Description | +
---|---|
result |
+any type | +
hl.assign.bin.ashr
(::vast::hl::BinAShrAssignOp)VAST compound assign operation
+Syntax:
+operation ::= `hl.assign.bin.ashr` $src `to` $dst attr-dict `:` type(operands) `->` type(results)
+
+A compound assign operation represents an assignment operation joined +with an arithmetic operation. It requires the same types for both source +and destination arguments.
+The custom assembly form of the operation is as follows:
+%result =
It represents C compound assignment statement:
+dst =
Interfaces: InferTypeOpInterface
+Operand | +Description | +
---|---|
src |
+lvalue to integer like type | +
dst |
+any type | +
Result | +Description | +
---|---|
result |
+integer like type | +
hl.assign.bin.lshr
(::vast::hl::BinLShrAssignOp)VAST compound assign operation
+Syntax:
+operation ::= `hl.assign.bin.lshr` $src `to` $dst attr-dict `:` type(operands) `->` type(results)
+
+A compound assign operation represents an assignment operation joined +with an arithmetic operation. It requires the same types for both source +and destination arguments.
+The custom assembly form of the operation is as follows:
+%result =
It represents C compound assignment statement:
+dst =
Interfaces: InferTypeOpInterface
+Operand | +Description | +
---|---|
src |
+lvalue to integer like type | +
dst |
+any type | +
Result | +Description | +
---|---|
result |
+integer like type | +
hl.assign.bin.or
(::vast::hl::BinOrAssignOp)VAST compound assign operation
+Syntax:
+operation ::= `hl.assign.bin.or` $src `to` $dst attr-dict `:` type(operands) `->` type(results)
+
+A compound assign operation represents an assignment operation joined +with an arithmetic operation. It requires the same types for both source +and destination arguments.
+The custom assembly form of the operation is as follows:
+%result =
It represents C compound assignment statement:
+dst =
Interfaces: InferTypeOpInterface
+Operand | +Description | +
---|---|
src |
+lvalue to any type | +
dst |
+any type | +
Result | +Description | +
---|---|
result |
+any type | +
hl.assign.bin.shl
(::vast::hl::BinShlAssignOp)VAST compound assign operation
+Syntax:
+operation ::= `hl.assign.bin.shl` $src `to` $dst attr-dict `:` type(operands) `->` type(results)
+
+A compound assign operation represents an assignment operation joined +with an arithmetic operation. It requires the same types for both source +and destination arguments.
+The custom assembly form of the operation is as follows:
+%result =
It represents C compound assignment statement:
+dst =
Interfaces: InferTypeOpInterface
+Operand | +Description | +
---|---|
src |
+lvalue to integer like type | +
dst |
+any type | +
Result | +Description | +
---|---|
result |
+integer like type | +
hl.assign.bin.xor
(::vast::hl::BinXorAssignOp)VAST compound assign operation
+Syntax:
+operation ::= `hl.assign.bin.xor` $src `to` $dst attr-dict `:` type(operands) `->` type(results)
+
+A compound assign operation represents an assignment operation joined +with an arithmetic operation. It requires the same types for both source +and destination arguments.
+The custom assembly form of the operation is as follows:
+%result =
It represents C compound assignment statement:
+dst =
Interfaces: InferTypeOpInterface
+Operand | +Description | +
---|---|
src |
+lvalue to any type | +
dst |
+any type | +
Result | +Description | +
---|---|
result |
+any type | +
hl.assign.fadd
(::vast::hl::AddFAssignOp)VAST compound assign operation
+Syntax:
+operation ::= `hl.assign.fadd` $src `to` $dst attr-dict `:` type(operands) `->` type(results)
+
+A compound assign operation represents an assignment operation joined +with an arithmetic operation. It requires the same types for both source +and destination arguments.
+The custom assembly form of the operation is as follows:
+%result =
It represents C compound assignment statement:
+dst =
Interfaces: InferTypeOpInterface
+Operand | +Description | +
---|---|
src |
+lvalue to any type | +
dst |
+any type | +
Result | +Description | +
---|---|
result |
+any type | +
hl.assign.fdiv
(::vast::hl::DivFAssignOp)VAST compound assign operation
+Syntax:
+operation ::= `hl.assign.fdiv` $src `to` $dst attr-dict `:` type(operands) `->` type(results)
+
+A compound assign operation represents an assignment operation joined +with an arithmetic operation. It requires the same types for both source +and destination arguments.
+The custom assembly form of the operation is as follows:
+%result =
It represents C compound assignment statement:
+dst =
Interfaces: InferTypeOpInterface
+Operand | +Description | +
---|---|
src |
+lvalue to any type | +
dst |
+any type | +
Result | +Description | +
---|---|
result |
+any type | +
hl.assign.fmul
(::vast::hl::MulFAssignOp)VAST compound assign operation
+Syntax:
+operation ::= `hl.assign.fmul` $src `to` $dst attr-dict `:` type(operands) `->` type(results)
+
+A compound assign operation represents an assignment operation joined +with an arithmetic operation. It requires the same types for both source +and destination arguments.
+The custom assembly form of the operation is as follows:
+%result =
It represents C compound assignment statement:
+dst =
Interfaces: InferTypeOpInterface
+Operand | +Description | +
---|---|
src |
+lvalue to any type | +
dst |
+any type | +
Result | +Description | +
---|---|
result |
+any type | +
hl.assign.frem
(::vast::hl::RemFAssignOp)VAST compound assign operation
+Syntax:
+operation ::= `hl.assign.frem` $src `to` $dst attr-dict `:` type(operands) `->` type(results)
+
+A compound assign operation represents an assignment operation joined +with an arithmetic operation. It requires the same types for both source +and destination arguments.
+The custom assembly form of the operation is as follows:
+%result =
It represents C compound assignment statement:
+dst =
Interfaces: InferTypeOpInterface
+Operand | +Description | +
---|---|
src |
+lvalue to any type | +
dst |
+any type | +
Result | +Description | +
---|---|
result |
+any type | +
hl.assign.fsub
(::vast::hl::SubFAssignOp)VAST compound assign operation
+Syntax:
+operation ::= `hl.assign.fsub` $src `to` $dst attr-dict `:` type(operands) `->` type(results)
+
+A compound assign operation represents an assignment operation joined +with an arithmetic operation. It requires the same types for both source +and destination arguments.
+The custom assembly form of the operation is as follows:
+%result =
It represents C compound assignment statement:
+dst =
Interfaces: InferTypeOpInterface
+Operand | +Description | +
---|---|
src |
+lvalue to any type | +
dst |
+any type | +
Result | +Description | +
---|---|
result |
+any type | +
hl.assign.mul
(::vast::hl::MulIAssignOp)VAST compound assign operation
+Syntax:
+operation ::= `hl.assign.mul` $src `to` $dst attr-dict `:` type(operands) `->` type(results)
+
+A compound assign operation represents an assignment operation joined +with an arithmetic operation. It requires the same types for both source +and destination arguments.
+The custom assembly form of the operation is as follows:
+%result =
It represents C compound assignment statement:
+dst =
Interfaces: InferTypeOpInterface
+Operand | +Description | +
---|---|
src |
+lvalue to any type | +
dst |
+any type | +
Result | +Description | +
---|---|
result |
+any type | +
hl.assign.sdiv
(::vast::hl::DivSAssignOp)VAST compound assign operation
+Syntax:
+operation ::= `hl.assign.sdiv` $src `to` $dst attr-dict `:` type(operands) `->` type(results)
+
+A compound assign operation represents an assignment operation joined +with an arithmetic operation. It requires the same types for both source +and destination arguments.
+The custom assembly form of the operation is as follows:
+%result =
It represents C compound assignment statement:
+dst =
Interfaces: InferTypeOpInterface
+Operand | +Description | +
---|---|
src |
+lvalue to any type | +
dst |
+any type | +
Result | +Description | +
---|---|
result |
+any type | +
hl.assign.srem
(::vast::hl::RemSAssignOp)VAST compound assign operation
+Syntax:
+operation ::= `hl.assign.srem` $src `to` $dst attr-dict `:` type(operands) `->` type(results)
+
+A compound assign operation represents an assignment operation joined +with an arithmetic operation. It requires the same types for both source +and destination arguments.
+The custom assembly form of the operation is as follows:
+%result =
It represents C compound assignment statement:
+dst =
Interfaces: InferTypeOpInterface
+Operand | +Description | +
---|---|
src |
+lvalue to any type | +
dst |
+any type | +
Result | +Description | +
---|---|
result |
+any type | +
hl.assign.sub
(::vast::hl::SubIAssignOp)VAST compound assign operation
+Syntax:
+operation ::= `hl.assign.sub` $src `to` $dst attr-dict `:` type(operands) `->` type(results)
+
+A compound assign operation represents an assignment operation joined +with an arithmetic operation. It requires the same types for both source +and destination arguments.
+The custom assembly form of the operation is as follows:
+%result =
It represents C compound assignment statement:
+dst =
Interfaces: InferTypeOpInterface
+Operand | +Description | +
---|---|
src |
+lvalue to any type | +
dst |
+any type | +
Result | +Description | +
---|---|
result |
+any type | +
hl.assign.udiv
(::vast::hl::DivUAssignOp)VAST compound assign operation
+Syntax:
+operation ::= `hl.assign.udiv` $src `to` $dst attr-dict `:` type(operands) `->` type(results)
+
+A compound assign operation represents an assignment operation joined +with an arithmetic operation. It requires the same types for both source +and destination arguments.
+The custom assembly form of the operation is as follows:
+%result =
It represents C compound assignment statement:
+dst =
Interfaces: InferTypeOpInterface
+Operand | +Description | +
---|---|
src |
+lvalue to any type | +
dst |
+any type | +
Result | +Description | +
---|---|
result |
+any type | +
hl.assign.urem
(::vast::hl::RemUAssignOp)VAST compound assign operation
+Syntax:
+operation ::= `hl.assign.urem` $src `to` $dst attr-dict `:` type(operands) `->` type(results)
+
+A compound assign operation represents an assignment operation joined +with an arithmetic operation. It requires the same types for both source +and destination arguments.
+The custom assembly form of the operation is as follows:
+%result =
It represents C compound assignment statement:
+dst =
Interfaces: InferTypeOpInterface
+Operand | +Description | +
---|---|
src |
+lvalue to any type | +
dst |
+any type | +
Result | +Description | +
---|---|
result |
+any type | +
hl.base
(::vast::hl::CxxBaseSpecifierOp)VAST base class specifier
+Syntax:
+operation ::= `hl.base` $type attr-dict $access (`virtual` $is_virtual^)?
+
+VAST base class specifier +Interfaces: VastSymbol
+Attribute | +MLIR Type | +Description | +
---|---|---|
type |
+::mlir::TypeAttr | +any type attribute | +
access |
+::vast::hl::AccessSpecifierAttr | +Access specifier | +
is_virtual |
+::mlir::UnitAttr | +unit attribute | +
hl.bin.and
(::vast::hl::BinAndOp)VAST arithmetic binary operation
+Syntax:
+operation ::= `hl.bin.and` $lhs `,` $rhs attr-dict `:` functional-type(operands, results)
+
+High-level arithmetic binary operation. This operation takes two operands +and returns one result, each of these is required to be of the same +type.
+The custom assembly form of the operation is as follows:
+%result =
Operand | +Description | +
---|---|
lhs |
+any type | +
rhs |
+any type | +
Result | +Description | +
---|---|
result |
+any type | +
hl.bin.ashr
(::vast::hl::BinAShrOp)VAST binary shift operation
+Syntax:
+operation ::= `hl.bin.ashr` $lhs `,` $rhs attr-dict `:` functional-type(operands, results)
+
+High-level binary shift operation. This operation takes two operands +and returns one result.
+The custom assembly form of the operation is as follows:
+%result =
Operand | +Description | +
---|---|
lhs |
+integer like type | +
rhs |
+integer like type | +
Result | +Description | +
---|---|
result |
+integer like type | +
hl.bin.comma
(::vast::hl::BinComma)VAST binary operation
+Syntax:
+operation ::= `hl.bin.comma` $lhs `,` $rhs attr-dict `:` functional-type(operands, results)
+
+Operand | +Description | +
---|---|
lhs |
+any type | +
rhs |
+any type | +
Result | +Description | +
---|---|
result |
+any type | +
hl.bin.land
(::vast::hl::BinLAndOp)VAST logical binary operation
+Syntax:
+operation ::= `hl.bin.land` $lhs`,` $rhs attr-dict `:` type(results)
+
+High-level logical binary operation. This operation takes two operands +and returns one result, each of these is required to be of the same +type.
+The custom assembly form of the operation is as follows:
+%result =
Result | +Description | +
---|---|
result |
+any type | +
hl.bin.lor
(::vast::hl::BinLOrOp)VAST logical binary operation
+Syntax:
+operation ::= `hl.bin.lor` $lhs`,` $rhs attr-dict `:` type(results)
+
+High-level logical binary operation. This operation takes two operands +and returns one result, each of these is required to be of the same +type.
+The custom assembly form of the operation is as follows:
+%result =
Result | +Description | +
---|---|
result |
+any type | +
hl.bin.lshr
(::vast::hl::BinLShrOp)VAST binary shift operation
+Syntax:
+operation ::= `hl.bin.lshr` $lhs `,` $rhs attr-dict `:` functional-type(operands, results)
+
+High-level binary shift operation. This operation takes two operands +and returns one result.
+The custom assembly form of the operation is as follows:
+%result =
Operand | +Description | +
---|---|
lhs |
+integer like type | +
rhs |
+integer like type | +
Result | +Description | +
---|---|
result |
+integer like type | +
hl.bin.or
(::vast::hl::BinOrOp)VAST arithmetic binary operation
+Syntax:
+operation ::= `hl.bin.or` $lhs `,` $rhs attr-dict `:` functional-type(operands, results)
+
+High-level arithmetic binary operation. This operation takes two operands +and returns one result, each of these is required to be of the same +type.
+The custom assembly form of the operation is as follows:
+%result =
Operand | +Description | +
---|---|
lhs |
+any type | +
rhs |
+any type | +
Result | +Description | +
---|---|
result |
+any type | +
hl.bin.shl
(::vast::hl::BinShlOp)VAST binary shift operation
+Syntax:
+operation ::= `hl.bin.shl` $lhs `,` $rhs attr-dict `:` functional-type(operands, results)
+
+High-level binary shift operation. This operation takes two operands +and returns one result.
+The custom assembly form of the operation is as follows:
+%result =
Operand | +Description | +
---|---|
lhs |
+integer like type | +
rhs |
+integer like type | +
Result | +Description | +
---|---|
result |
+integer like type | +
hl.bin.xor
(::vast::hl::BinXorOp)VAST arithmetic binary operation
+Syntax:
+operation ::= `hl.bin.xor` $lhs `,` $rhs attr-dict `:` functional-type(operands, results)
+
+High-level arithmetic binary operation. This operation takes two operands +and returns one result, each of these is required to be of the same +type.
+The custom assembly form of the operation is as follows:
+%result =
Operand | +Description | +
---|---|
lhs |
+any type | +
rhs |
+any type | +
Result | +Description | +
---|---|
result |
+any type | +
hl.break
(::vast::hl::BreakOp)VAST break statement
+Syntax:
+operation ::= `hl.break` attr-dict
+
+VAST break statement +Traits: NoRegionArguments, NoTerminator, soft_terminator
+Interfaces: RegionKindInterface
+hl.builtin_bitcast
(::vast::hl::BuiltinBitCastOp)VAST cast operation
+Syntax:
+operation ::= `hl.builtin_bitcast` $value $kind attr-dict `:` type($value) `->` type($result)
+
+VAST cast operation
+Attribute | +MLIR Type | +Description | +
---|---|---|
kind |
+::vast::hl::CastKindAttr | +cast kind | +
Operand | +Description | +
---|---|
value |
+any type | +
Result | +Description | +
---|---|
result |
+any type | +
hl.call
(::vast::hl::CallOp)VAST call operation
+Syntax:
+operation ::= `hl.call` $callee `(` $argOperands `)` attr-dict `:` functional-type( $argOperands, $results )
+
+VAST call operation +Interfaces: CallOpInterface
+Attribute | +MLIR Type | +Description | +
---|---|---|
callee |
+::mlir::FlatSymbolRefAttr | +flat symbol reference attribute | +
Operand | +Description | +
---|---|
argOperands |
+any type | +
Result | +Description | +
---|---|
results |
+any type | +
hl.case
(::vast::hl::CaseOp)VAST case statement
+Syntax:
+operation ::= `hl.case` $lhs $body attr-dict
+
+The operation represents a single case of a switch statement.
+The generic form of the operation is as follows:
+hl.case { + ... / lhs/check region / + hl.value.yield %val : !hl.type +} { + ... / body region / +}
+It represents a C statement of form case lhs: body;
.
Traits: NoRegionArguments, NoTerminator
+Interfaces: RegionKindInterface
+hl.class
(::vast::hl::ClassDeclOp)VAST C++ class declaration
+Syntax:
+operation ::= `hl.class` $name attr-dict `:` `bases` $bases $fields
+
+VAST C++ class declaration +Traits: NoTerminator
+Interfaces: VastSymbol
+Attribute | +MLIR Type | +Description | +
---|---|---|
name |
+::mlir::StringAttr | +string attribute | +
hl.cmp
(::vast::hl::CmpOp)VAST comparison operation
+Syntax:
+operation ::= `hl.cmp` $predicate $lhs `,` $rhs attr-dict `:` type(operands) `->` type($result)
+
+VAST comparison operation
+Attribute | +MLIR Type | +Description | +
---|---|---|
predicate |
+::vast::hl::PredicateAttr | +comparison predicate | +
Operand | +Description | +
---|---|
lhs |
+any type | +
rhs |
+any type | +
Result | +Description | +
---|---|
result |
+bool or integer like type | +
hl.cond
(::vast::hl::CondOp)VAST conditional statement
+Syntax:
+operation ::= `hl.cond` $condRegion `?` $thenRegion `:` $elseRegion attr-dict `:` type(results)
+
+The operation takes builders of three regions -- condition, true branch and false branch. +Builders, given the location, build a particular region.
+The generic form of the operation is as follows:
+hl.cond { + ... / condition region / + hl.cond.yield %cond : !hl.bool +} ? { + ... / true region / +} : { + ... / false region / +}
+Traits: NoRegionArguments, NoTerminator
+Interfaces: RegionKindInterface
+Result | +Description | +
---|---|
result |
+any type | +
hl.cond.yield
(::vast::hl::CondYieldOp)Condition yield operation
+Syntax:
+operation ::= `hl.cond.yield` attr-dict $result `:` type($result)
+
+A condition yield operation is used to terminate the region representing
+condition expression of control flow operations IfOp
, WhileOp
, ForOp
+and DoOp
. It yields a boolean value for the conditional branch.
The custom assembly form of the operation is as follows:
+hl.cond.yield result : BoolType
+Traits: HasParent
Operand | +Description | +
---|---|
result |
+any type | +
hl.const
(::vast::hl::ConstantOp)VAST value constant
+Syntax:
+operation ::= `hl.const` $value attr-dict
+
+VAST value constant +Traits: ConstantLike
+Interfaces: InferTypeOpInterface
+Attribute | +MLIR Type | +Description | +
---|---|---|
value |
+::mlir::TypedAttr | +TypedAttr instance | +
Result | +Description | +
---|---|
result |
+any type | +
hl.continue
(::vast::hl::ContinueOp)VAST continue statement
+Syntax:
+operation ::= `hl.continue` attr-dict
+
+VAST continue statement +Traits: NoRegionArguments, NoTerminator, soft_terminator
+Interfaces: RegionKindInterface
+hl.cstyle_cast
(::vast::hl::CStyleCastOp)VAST cast operation
+Syntax:
+operation ::= `hl.cstyle_cast` $value $kind attr-dict `:` type($value) `->` type($result)
+
+VAST cast operation
+Attribute | +MLIR Type | +Description | +
---|---|---|
kind |
+::vast::hl::CastKindAttr | +cast kind | +
Operand | +Description | +
---|---|
value |
+any type | +
Result | +Description | +
---|---|
result |
+any type | +
hl.cxxstruct
(::vast::hl::CxxStructDeclOp)VAST C++ struct declaration
+Syntax:
+operation ::= `hl.cxxstruct` $name attr-dict `:` `bases` $bases $fields
+
+VAST C++ struct declaration +Traits: NoTerminator
+Interfaces: VastSymbol
+Attribute | +MLIR Type | +Description | +
---|---|---|
name |
+::mlir::StringAttr | +string attribute | +
hl.default
(::vast::hl::DefaultOp)VAST default statement
+Syntax:
+operation ::= `hl.default` $body attr-dict
+
+VAST default statement +Traits: NoRegionArguments, NoTerminator
+Interfaces: RegionKindInterface
+hl.deref
(::vast::hl::Deref)VAST deref operation
+Syntax:
+operation ::= `hl.deref` $addr attr-dict `:` type($addr) `->` type($result)
+
+VAST deref operation
+Operand | +Description | +
---|---|
addr |
+any type | +
Result | +Description | +
---|---|
result |
+lvalue to any type | +
hl.do
(::vast::hl::DoOp)VAST do-while statement
+Syntax:
+operation ::= `hl.do` $bodyRegion `while` $condRegion attr-dict
+
+The operation represents a do-while statement.
+The generic form of the operation is as follows:
+hl.do { + ... / body region / +} cond { + ... / cond region / + hl.cond.yield %cond : !hl.bool +}
+Traits: NoRegionArguments, NoTerminator
+Interfaces: RegionKindInterface
+hl.empty.decl
(::vast::hl::EmptyDeclOp)Syntax:
+operation ::= `hl.empty.decl` attr-dict
+
+hl.enum
(::vast::hl::EnumDeclOp)VAST enum declaration
+Syntax:
+operation ::= `hl.enum` $name attr-dict `:` ($type^ $constants)?
+
+Enum declaration serves to declare region for enum constant declarations. +It also defines an underlying type.
+Traits: NoTerminator
+Interfaces: VastSymbol
+Attribute | +MLIR Type | +Description | +
---|---|---|
name |
+::mlir::StringAttr | +string attribute | +
type |
+::mlir::TypeAttr | +any type attribute | +
hl.enum.const
(::vast::hl::EnumConstantOp)VAST enum constant declaration
+Syntax:
+operation ::= `hl.enum.const` $name `=` $value attr-dict (`init` $init^)?
+
+Enumeration constant servers to link name to an enum value. +It is required to be scoped in Enum operation. For example:
+hl.enum.const "F" = 2 : !hl.int
+
+A constant can have a constant expression initializer:
+hl.enum.const "G" = #core.integer<12> : !hl.int init {
+ %0 = hl.enumref "F" : !hl.int
+ %1 = hl.enumref "C" : !hl.int
+ %2 = hl.add %0, %1 : !hl.int
+ hl.value.yield %2 : !hl.int
+}
+
+Attribute | +MLIR Type | +Description | +
---|---|---|
name |
+::mlir::StringAttr | +string attribute | +
value |
+::mlir::TypedAttr | +TypedAttr instance | +
hl.enumref
(::vast::hl::EnumRefOp)VAST variable reference declaration
+Syntax:
+operation ::= `hl.enumref` $value attr-dict `:` type($result)
+
+VAST variable reference declaration
+Attribute | +MLIR Type | +Description | +
---|---|---|
value |
+::mlir::StringAttr | +string attribute | +
Result | +Description | +
---|---|
result |
+any type | +
hl.expr
(::vast::hl::ExprOp)VAST expression
+Syntax:
+operation ::= `hl.expr` attr-dict `:` type($result) $subexpr
+
+VAST expression +Traits: SingleBlock
+Result | +Description | +
---|---|
result |
+any type | +
hl.fadd
(::vast::hl::AddFOp)VAST arithmetic binary operation
+Syntax:
+operation ::= `hl.fadd` $lhs `,` $rhs attr-dict `:` functional-type(operands, results)
+
+High-level arithmetic binary operation. This operation takes two operands +and returns one result, each of these is required to be of the same +type.
+The custom assembly form of the operation is as follows:
+%result =
Operand | +Description | +
---|---|
lhs |
+any type | +
rhs |
+any type | +
Result | +Description | +
---|---|
result |
+any type | +
hl.fcmp
(::vast::hl::FCmpOp)VAST flaoting point comparison operation
+Syntax:
+operation ::= `hl.fcmp` $predicate $lhs `,` $rhs attr-dict `:` type(operands) `->` type($result)
+
+VAST floating point comparison operation
+Attribute | +MLIR Type | +Description | +
---|---|---|
predicate |
+::vast::hl::FPredicateAttr | +floating point comparison predicate | +
Operand | +Description | +
---|---|
lhs |
+float like type | +
rhs |
+float like type | +
Result | +Description | +
---|---|
result |
+bool or integer like type | +
hl.fdiv
(::vast::hl::DivFOp)VAST arithmetic binary operation
+Syntax:
+operation ::= `hl.fdiv` $lhs `,` $rhs attr-dict `:` functional-type(operands, results)
+
+High-level arithmetic binary operation. This operation takes two operands +and returns one result, each of these is required to be of the same +type.
+The custom assembly form of the operation is as follows:
+%result =
Operand | +Description | +
---|---|
lhs |
+any type | +
rhs |
+any type | +
Result | +Description | +
---|---|
result |
+any type | +
hl.field
(::vast::hl::FieldDeclOp)VAST record field declaration
+Syntax:
+operation ::= `hl.field` $name attr-dict (`bw` $bits^)? `:` $type
+
+VAST record field declaration +Interfaces: VastSymbol
+Attribute | +MLIR Type | +Description | +
---|---|---|
name |
+::mlir::StringAttr | +string attribute | +
type |
+::mlir::TypeAttr | +any type attribute | +
bits |
+::mlir::IntegerAttr | +32-bit signless integer attribute | +
hl.fmul
(::vast::hl::MulFOp)VAST arithmetic binary operation
+Syntax:
+operation ::= `hl.fmul` $lhs `,` $rhs attr-dict `:` functional-type(operands, results)
+
+High-level arithmetic binary operation. This operation takes two operands +and returns one result, each of these is required to be of the same +type.
+The custom assembly form of the operation is as follows:
+%result =
Operand | +Description | +
---|---|
lhs |
+any type | +
rhs |
+any type | +
Result | +Description | +
---|---|
result |
+any type | +
hl.for
(::vast::hl::ForOp)VAST for statement
+Syntax:
+operation ::= `hl.for` $condRegion `incr` $incrRegion attr-dict `do` $bodyRegion
+
+Operation represents a for-loop statement.
+The generic form of the operation is as follows:
+hl.for { + ... / cond region / + hl.cond.yield %cond : !hl.bool +} incr { + ... / increment/update region / +} do { + ... / body region / +}
+Traits: NoRegionArguments, NoTerminator
+Interfaces: RegionKindInterface
+hl.frem
(::vast::hl::RemFOp)VAST arithmetic binary operation
+Syntax:
+operation ::= `hl.frem` $lhs `,` $rhs attr-dict `:` functional-type(operands, results)
+
+High-level arithmetic binary operation. This operation takes two operands +and returns one result, each of these is required to be of the same +type.
+The custom assembly form of the operation is as follows:
+%result =
Operand | +Description | +
---|---|
lhs |
+any type | +
rhs |
+any type | +
Result | +Description | +
---|---|
result |
+any type | +
hl.fsub
(::vast::hl::SubFOp)VAST arithmetic binary operation
+Syntax:
+operation ::= `hl.fsub` $lhs `,` $rhs attr-dict `:` functional-type(operands, results)
+
+High-level arithmetic binary operation. This operation takes two operands +and returns one result, each of these is required to be of the same +type.
+The custom assembly form of the operation is as follows:
+%result =
Operand | +Description | +
---|---|
lhs |
+any type | +
rhs |
+any type | +
Result | +Description | +
---|---|
result |
+any type | +
hl.func
(::vast::hl::FuncOp)VAST function template
+Syntax:
+operation ::= `hl.func` $sym_name custom< FunctionSignatureAndBody >($function_type, attr-dict, $body)
+
+Inspired by cir::FuncOp
and mlir::func::FuncOp
:
++Operations within the function cannot implicitly capture values defined +outside of the function, i.e. Functions are
+IsolatedFromAbove
. All +external references must use function arguments or attributes that establish +a symbolic connection (e.g. symbols referenced by name via a string +attribute like SymbolRefAttr). An external function declaration (used when +referring to a function declared in some other module) has no body.
The function linkage information is specified by linkage
, as defined by
+GlobalLinkageKind
attribute.
Traits: AutomaticAllocationScope, IsolatedFromAbove, NoTerminator
+Interfaces: CallableOpInterface, FunctionOpInterface, RegionKindInterface, Symbol
+Attribute | +MLIR Type | +Description | +
---|---|---|
sym_name |
+::mlir::StringAttr | +string attribute | +
function_type |
+::mlir::TypeAttr | +type attribute of function type | +
linkage |
+::vast::core::GlobalLinkageKindAttr | +global linkage kind | +
sym_visibility |
+::mlir::StringAttr | +string attribute | +
arg_attrs |
+::mlir::ArrayAttr | +Array of dictionary attributes | +
res_attrs |
+::mlir::ArrayAttr | +Array of dictionary attributes | +
hl.funcref
(::vast::hl::FuncRefOp)VAST function reference declaration
+Syntax:
+operation ::= `hl.funcref` $function attr-dict `:` type($result)
+
+VAST function reference declaration
+Attribute | +MLIR Type | +Description | +
---|---|---|
function |
+::mlir::FlatSymbolRefAttr | +flat symbol reference attribute | +
Result | +Description | +
---|---|
result |
+any type | +
hl.globref
(::vast::hl::GlobalRefOp)VAST global variable reference declaration
+Syntax:
+operation ::= `hl.globref` $global attr-dict `:` type($result)
+
+VAST global variable reference declaration
+Attribute | +MLIR Type | +Description | +
---|---|---|
global |
+::mlir::StringAttr | +string attribute | +
Result | +Description | +
---|---|
result |
+any type | +
hl.gnu.extension
(::vast::hl::ExtensionOp)VAST extension (__extension__) keyword
+Syntax:
+operation ::= `hl.gnu.extension` $value attr-dict `:` type($value) `->` type($result)
+
+VAST op corresponding to GNU extension keyword.
+Operand | +Description | +
---|---|
value |
+any type | +
Result | +Description | +
---|---|
result |
+any type | +
hl.goto
(::vast::hl::GotoStmt)Syntax:
+operation ::= `hl.goto` $label attr-dict
+
+Operand | +Description | +
---|---|
label |
++ |
hl.if
(::vast::hl::IfOp)VAST if statement
+The operation takes builders of two mandatory regions -- condition and then +region -- and one builder optional region representing else block of C if statement. +Builders, given the location, build a particular region.
+The generic form of the operation is as follows:
+hl.if { + ... / condition region / + hl.cond.yield %cond : !hl.bool +} then { + ... / then region / +} else { + ... / else region / +}
+Traits: NoRegionArguments, NoTerminator
+Interfaces: RegionKindInterface
+hl.implicit_cast
(::vast::hl::ImplicitCastOp)VAST cast operation
+Syntax:
+operation ::= `hl.implicit_cast` $value $kind attr-dict `:` type($value) `->` type($result)
+
+VAST cast operation
+Attribute | +MLIR Type | +Description | +
---|---|---|
kind |
+::vast::hl::CastKindAttr | +cast kind | +
Operand | +Description | +
---|---|
value |
+any type | +
Result | +Description | +
---|---|
result |
+any type | +
hl.indirect_call
(::vast::hl::IndirectCallOp)VAST call operation
+Syntax:
+operation ::= `hl.indirect_call` $callee `:` type($callee) `(` $argOperands `)` attr-dict `:` functional-type( $argOperands, $results )
+
+VAST call operation +Interfaces: CallOpInterface
+Operand | +Description | +
---|---|
callee |
+any type | +
argOperands |
+any type | +
Result | +Description | +
---|---|
results |
+any type | +
hl.initlist
(::vast::hl::InitListExpr)VAST initializer list expression
+Syntax:
+operation ::= `hl.initlist` $elements attr-dict `:` functional-type($elements, results)
+
+VAST initializer list expression
+Operand | +Description | +
---|---|
elements |
+any type | +
Result | +Description | +
---|---|
«unnamed» | +any type | +
hl.label
(::vast::hl::LabelStmt)VAST control flow operation
+Syntax:
+operation ::= `hl.label` $label $body attr-dict
+
+VAST control flow operation +Traits: NoRegionArguments, NoTerminator
+Interfaces: RegionKindInterface
+Operand | +Description | +
---|---|
label |
++ |
hl.label.decl
(::vast::hl::LabelDeclOp)Syntax:
+operation ::= `hl.label.decl` $name attr-dict `:` type($result)
+
+Interfaces: InferTypeOpInterface
+Attribute | +MLIR Type | +Description | +
---|---|---|
name |
+::mlir::StringAttr | +string attribute | +
Result | +Description | +
---|---|
result |
++ |
hl.labeladdr
(::vast::hl::AddrLabelExpr)VAST address of label extension
+Syntax:
+operation ::= `hl.labeladdr` $label attr-dict `:` type($result)
+
+VAST address of label extension
+Operand | +Description | +
---|---|
label |
++ |
Result | +Description | +
---|---|
result |
+lvalue to pointer like type | +
hl.lnot
(::vast::hl::LNotOp)VAST unary logical operation
+Syntax:
+operation ::= `hl.lnot` $arg attr-dict `:` type($arg) `->` type($res)
+
+High-level unary logical operation assures that +result has the right type.
+The custom assembly form of the operation is as follows:
+%result =
Operand | +Description | +
---|---|
arg |
+any type | +
Result | +Description | +
---|---|
res |
+bool or integer like type | +
hl.member
(::vast::hl::RecordMemberOp)VAST record element access operation
+Syntax:
+operation ::= `hl.member` $record `at` $name attr-dict `:` type($record) `->` type($element)
+
+VAST record element access operation
+Attribute | +MLIR Type | +Description | +
---|---|---|
name |
+::mlir::StringAttr | +string attribute | +
Operand | +Description | +
---|---|
record |
+any type | +
Result | +Description | +
---|---|
element |
+lvalue to any type | +
hl.minus
(::vast::hl::MinusOp)VAST unary type preserving operation
+Syntax:
+operation ::= `hl.minus` $arg attr-dict `:` type($result)
+
+Type preserving high-level unary operation assures that argument and +result has the same type.
+The custom assembly form of the operation is as follows:
+%result =
Traits: SameOperandsAndResultType
+Interfaces: InferTypeOpInterface
+Operand | +Description | +
---|---|
arg |
+any type | +
Result | +Description | +
---|---|
result |
+any type | +
hl.mul
(::vast::hl::MulIOp)VAST arithmetic binary operation
+Syntax:
+operation ::= `hl.mul` $lhs `,` $rhs attr-dict `:` functional-type(operands, results)
+
+High-level arithmetic binary operation. This operation takes two operands +and returns one result, each of these is required to be of the same +type.
+The custom assembly form of the operation is as follows:
+%result =
Traits: Commutative
+Operand | +Description | +
---|---|
lhs |
+any type | +
rhs |
+any type | +
Result | +Description | +
---|---|
result |
+any type | +
hl.not
(::vast::hl::NotOp)VAST unary type preserving operation
+Syntax:
+operation ::= `hl.not` $arg attr-dict `:` type($result)
+
+Type preserving high-level unary operation assures that argument and +result has the same type.
+The custom assembly form of the operation is as follows:
+%result =
Traits: SameOperandsAndResultType
+Interfaces: InferTypeOpInterface
+Operand | +Description | +
---|---|
arg |
+any type | +
Result | +Description | +
---|---|
result |
+any type | +
hl.plus
(::vast::hl::PlusOp)VAST unary type preserving operation
+Syntax:
+operation ::= `hl.plus` $arg attr-dict `:` type($result)
+
+Type preserving high-level unary operation assures that argument and +result has the same type.
+The custom assembly form of the operation is as follows:
+%result =
Traits: SameOperandsAndResultType
+Interfaces: InferTypeOpInterface
+Operand | +Description | +
---|---|
arg |
+any type | +
Result | +Description | +
---|---|
result |
+any type | +
hl.post.dec
(::vast::hl::PostDecOp)VAST unary inplace operation
+Syntax:
+operation ::= `hl.post.dec` $arg attr-dict `:` type($arg) `->` type($result)
+
+Inplace high-level unary operation changes its single argument in place. +It does not produce a new value.
+The custom assembly form of the operation is as follows:
+%result =
Interfaces: InferTypeOpInterface
+Operand | +Description | +
---|---|
arg |
+lvalue to any type | +
Result | +Description | +
---|---|
result |
+any type | +
hl.post.inc
(::vast::hl::PostIncOp)VAST unary inplace operation
+Syntax:
+operation ::= `hl.post.inc` $arg attr-dict `:` type($arg) `->` type($result)
+
+Inplace high-level unary operation changes its single argument in place. +It does not produce a new value.
+The custom assembly form of the operation is as follows:
+%result =
Interfaces: InferTypeOpInterface
+Operand | +Description | +
---|---|
arg |
+lvalue to any type | +
Result | +Description | +
---|---|
result |
+any type | +
hl.pre.dec
(::vast::hl::PreDecOp)VAST unary inplace operation
+Syntax:
+operation ::= `hl.pre.dec` $arg attr-dict `:` type($arg) `->` type($result)
+
+Inplace high-level unary operation changes its single argument in place. +It does not produce a new value.
+The custom assembly form of the operation is as follows:
+%result =
Interfaces: InferTypeOpInterface
+Operand | +Description | +
---|---|
arg |
+lvalue to any type | +
Result | +Description | +
---|---|
result |
+any type | +
hl.pre.inc
(::vast::hl::PreIncOp)VAST unary inplace operation
+Syntax:
+operation ::= `hl.pre.inc` $arg attr-dict `:` type($arg) `->` type($result)
+
+Inplace high-level unary operation changes its single argument in place. +It does not produce a new value.
+The custom assembly form of the operation is as follows:
+%result =
Interfaces: InferTypeOpInterface
+Operand | +Description | +
---|---|
arg |
+lvalue to any type | +
Result | +Description | +
---|---|
result |
+any type | +
hl.predefined.expr
(::vast::hl::PredefinedExpr)VAT predefined expr ( such as __func__ )
+Syntax:
+operation ::= `hl.predefined.expr` $value $kind attr-dict `:` type($value) `->` type($result)
+
+VAT predefined expr ( such as func )
+Attribute | +MLIR Type | +Description | +
---|---|---|
kind |
+::vast::hl::IdentKindAttr | +ident kind | +
Operand | +Description | +
---|---|
value |
+any type | +
Result | +Description | +
---|---|
result |
+any type | +
hl.ref
(::vast::hl::DeclRefOp)VAST variable reference declaration
+Syntax:
+operation ::= `hl.ref` $decl attr-dict `:` functional-type(operands, results)
+
+VAST variable reference declaration
+Operand | +Description | +
---|---|
decl |
+any type | +
Result | +Description | +
---|---|
result |
+lvalue to any type | +
hl.return
(::vast::hl::ReturnOp)Syntax:
+operation ::= `hl.return` ($result^ `:` type($result))? attr-dict
+
+Traits: return_trait, soft_terminator
+Operand | +Description | +
---|---|
result |
+any type | +
hl.sdiv
(::vast::hl::DivSOp)VAST arithmetic binary operation
+Syntax:
+operation ::= `hl.sdiv` $lhs `,` $rhs attr-dict `:` functional-type(operands, results)
+
+High-level arithmetic binary operation. This operation takes two operands +and returns one result, each of these is required to be of the same +type.
+The custom assembly form of the operation is as follows:
+%result =
Operand | +Description | +
---|---|
lhs |
+any type | +
rhs |
+any type | +
Result | +Description | +
---|---|
result |
+any type | +
hl.sizeof.expr
(::vast::hl::SizeOfExprOp)VAST expr sizeof operator
+Syntax:
+operation ::= `hl.sizeof.expr` attr-dict `->` type($result) $expr
+
+VAST expr sizeof operator
+Result | +Description | +
---|---|
result |
+integer like type | +
hl.sizeof.type
(::vast::hl::SizeOfTypeOp)VAST type sizeof operator
+Syntax:
+operation ::= `hl.sizeof.type` $arg attr-dict `->` type($result)
+
+VAST type sizeof operator
+Attribute | +MLIR Type | +Description | +
---|---|---|
arg |
+::mlir::TypeAttr | +any type attribute | +
Result | +Description | +
---|---|
result |
+integer like type | +
hl.skip
(::vast::hl::SkipStmt)VAST skip statement
+Syntax:
+operation ::= `hl.skip` attr-dict
+
+VAST skip statement
+hl.srem
(::vast::hl::RemSOp)VAST arithmetic binary operation
+Syntax:
+operation ::= `hl.srem` $lhs `,` $rhs attr-dict `:` functional-type(operands, results)
+
+High-level arithmetic binary operation. This operation takes two operands +and returns one result, each of these is required to be of the same +type.
+The custom assembly form of the operation is as follows:
+%result =
Operand | +Description | +
---|---|
lhs |
+any type | +
rhs |
+any type | +
Result | +Description | +
---|---|
result |
+any type | +
hl.stmt.expr
(::vast::hl::StmtExprOp)VAST statement expression
+Syntax:
+operation ::= `hl.stmt.expr` attr-dict `:` type($result) $substmt
+
+VAST statement expression +Traits: SingleBlock
+Interfaces: RegionKindInterface
+Result | +Description | +
---|---|
result |
+any type | +
hl.struct
(::vast::hl::StructDeclOp)VAST struct declaration
+Syntax:
+operation ::= `hl.struct` $name attr-dict `:` $fields
+
+VAST struct declaration +Traits: NoTerminator
+Interfaces: VastSymbol
+Attribute | +MLIR Type | +Description | +
---|---|---|
name |
+::mlir::StringAttr | +string attribute | +
hl.sub
(::vast::hl::SubIOp)VAST arithmetic binary operation
+Syntax:
+operation ::= `hl.sub` $lhs `,` $rhs attr-dict `:` functional-type(operands, results)
+
+High-level arithmetic binary operation. This operation takes two operands +and returns one result, each of these is required to be of the same +type.
+The custom assembly form of the operation is as follows:
+%result =
Operand | +Description | +
---|---|
lhs |
+any type | +
rhs |
+any type | +
Result | +Description | +
---|---|
result |
+any type | +
hl.subscript
(::vast::hl::SubscriptOp)VAST array subscript operator
+Syntax:
+operation ::= `hl.subscript` $array `at` ` ` `[` $index `:` type($index) `]` attr-dict
+ `:` type($array) `->` type($result)
+
+VAST array subscript operator
+Operand | +Description | +
---|---|
array |
+lvalue to subscriptable type | +
index |
+integer like type | +
Result | +Description | +
---|---|
result |
+lvalue to any type | +
hl.switch
(::vast::hl::SwitchOp)VAST switch statement
+Syntax:
+operation ::= `hl.switch` $condRegion `cases` $cases attr-dict
+
+The operation represents a switch statement.
+The generic form of the operation is as follows:
+hl.switch { + ... / cond region / + hl.value.yield %val : !hl.type +} cases { + ... / casesregion / +}
+Traits: NoRegionArguments, NoTerminator
+Interfaces: RegionKindInterface
+hl.this
(::vast::hl::ThisOp)VAST this operator
+Syntax:
+operation ::= `hl.this` attr-dict `:` type($result)
+
+VAST this operator
+Result | +Description | +
---|---|
result |
+any type | +
hl.translation_unit
(::vast::hl::TranslationUnitOp)VAST translation unit
+Syntax:
+operation ::= `hl.translation_unit` $body attr-dict
+
+VAST tranaslation unit +Traits: IsolatedFromAbove, NoTerminator, SymbolTable
+hl.type
(::vast::hl::TypeDeclOp)VAST type declaration
+Syntax:
+operation ::= `hl.type` $name attr-dict
+
+VAST type declaration +Interfaces: VastSymbol
+Attribute | +MLIR Type | +Description | +
---|---|---|
name |
+::mlir::StringAttr | +string attribute | +
hl.type.yield
(::vast::hl::TypeYieldOp)Type yield operation
+Syntax:
+operation ::= `hl.type.yield` attr-dict $result `:` type($result)
+
+A type yield operation is used to terminate the underlying expression +region of a typeof(expr) statement.
+The custom assembly form of the operation is as follows:
+hl.type.yield result : type
+Traits: Terminator
+Operand | +Description | +
---|---|
result |
+any type | +
hl.typedef
(::vast::hl::TypeDefOp)VAST typedef operation
+Syntax:
+operation ::= `hl.typedef` $name attr-dict `:` $type
+
+Typedef operation servers to declare named types. +It creates a new type symbol in the current scope to +be referenced as NamedType later.
+Interfaces: VastSymbol
+Attribute | +MLIR Type | +Description | +
---|---|---|
name |
+::mlir::StringAttr | +string attribute | +
type |
+::mlir::TypeAttr | +any type attribute | +
hl.typeof.expr
(::vast::hl::TypeOfExprOp)VAST typeof(expr) operation
+Syntax:
+operation ::= `hl.typeof.expr` $name $expr `:` $type attr-dict
+
+The Typeof operation serves to declare a type using type introspection. +It evaluates its underlying expression, creates a new type symbol in the +current scope, assigns it to the type of the underlying expression, and +returns the type symbol to be referenced later
+Traits: SingleBlock
+Interfaces: VastSymbol
+Attribute | +MLIR Type | +Description | +
---|---|---|
name |
+::mlir::StringAttr | +string attribute | +
type |
+::mlir::TypeAttr | +any type attribute | +
hl.typeof.type
(::vast::hl::TypeOfTypeOp)VAST typeof(type) operation
+Syntax:
+operation ::= `hl.typeof.type` attr-dict `:` $type
+
+Interfaces: VastSymbol
+Attribute | +MLIR Type | +Description | +
---|---|---|
type |
+::mlir::TypeAttr | +any type attribute | +
hl.udiv
(::vast::hl::DivUOp)VAST arithmetic binary operation
+Syntax:
+operation ::= `hl.udiv` $lhs `,` $rhs attr-dict `:` functional-type(operands, results)
+
+High-level arithmetic binary operation. This operation takes two operands +and returns one result, each of these is required to be of the same +type.
+The custom assembly form of the operation is as follows:
+%result =
Operand | +Description | +
---|---|
lhs |
+any type | +
rhs |
+any type | +
Result | +Description | +
---|---|
result |
+any type | +
hl.union
(::vast::hl::UnionDeclOp)VAST record declaration
+Syntax:
+operation ::= `hl.union` $name attr-dict `:` $fields
+
+VAST record declaration +Traits: NoTerminator
+Interfaces: VastSymbol
+Attribute | +MLIR Type | +Description | +
---|---|---|
name |
+::mlir::StringAttr | +string attribute | +
hl.unreachable
(::vast::hl::UnreachableOp)VAST unreachable operation
+Syntax:
+operation ::= `hl.unreachable` attr-dict
+
+VAST unreachable operation +Traits: Terminator
+hl.urem
(::vast::hl::RemUOp)VAST arithmetic binary operation
+Syntax:
+operation ::= `hl.urem` $lhs `,` $rhs attr-dict `:` functional-type(operands, results)
+
+High-level arithmetic binary operation. This operation takes two operands +and returns one result, each of these is required to be of the same +type.
+The custom assembly form of the operation is as follows:
+%result =
Operand | +Description | +
---|---|
lhs |
+any type | +
rhs |
+any type | +
Result | +Description | +
---|---|
result |
+any type | +
hl.value.yield
(::vast::hl::ValueYieldOp)Value yield operation
+Syntax:
+operation ::= `hl.value.yield` attr-dict $result `:` type($result)
+
+A value yield operation is used to terminate the case region of a switch +statement. The yielded value triggers the parent case statement region.
+The custom assembly form of the operation is as follows:
+hl.value.yield result : type
+Traits: Terminator
+Operand | +Description | +
---|---|
result |
+any type | +
hl.var
(::vast::hl::VarDeclOp)VAST variable declaration
+Syntax:
+operation ::= `hl.var` $name attr-dict ($storageClass^)? ($threadStorageClass^)? `:` type($result)
+ (`=` $initializer^)?
+ (`allocation_size` $allocation_size^)?
+
+VAST variable declaration +Interfaces: VastSymbol
+Attribute | +MLIR Type | +Description | +
---|---|---|
name |
+::mlir::StringAttr | +string attribute | +
storageClass |
+::vast::hl::StorageClassAttr | +storage class | +
threadStorageClass |
+::vast::hl::TSClassAttr | +thread storage class | +
Result | +Description | +
---|---|
result |
+any type | +
hl.while
(::vast::hl::WhileOp)VAST while statement
+Syntax:
+operation ::= `hl.while` $condRegion `do` $bodyRegion attr-dict
+
+The operation takes builders of two mandatory regions -- condition and body +region. Builders, given the location, build a particular region.
+The generic form of the operation is as follows:
+hl.while { + ... / condition region / + hl.cond.yield %cond : !hl.bool +} do { + ... / body region / +}
+Traits: NoRegionArguments, NoTerminator
+Interfaces: RegionKindInterface
+Syntax:
+#hl.alloc_align<
+ int # alignment
+>
+
+Parameter | +C++ type | +Description | +
---|---|---|
alignment | +int |
++ |
Syntax:
+#hl.alloc_size<
+ int, # size_arg_pos
+ int # num_arg_pos
+>
+
+Parameter | +C++ type | +Description | +
---|---|---|
size_arg_pos | +int |
++ |
num_arg_pos | +int |
++ |
Syntax:
+#hl.annotation<
+ ::mlir::StringAttr # name
+>
+
+Parameter | +C++ type | +Description | +
---|---|---|
name | +::mlir::StringAttr |
++ |
Syntax:
+#hl.asm<
+ ::mlir::StringAttr, # label
+ bool # isLiteral
+>
+
+Parameter | +C++ type | +Description | +
---|---|---|
label | +::mlir::StringAttr |
++ |
isLiteral | +bool |
++ |
Syntax:
+#hl.builtin<
+ unsigned # ID
+>
+
+Parameter | +C++ type | +Description | +
---|---|---|
ID | +unsigned |
++ |
Syntax:
+#hl.quals<
+ bool, # is_const
+ bool # is_volatile
+>
+
+Parameter | +C++ type | +Description | +
---|---|---|
is_const | +bool |
+const qualifier | +
is_volatile | +bool |
+volatile qualifier | +
Syntax:
+#hl.quals<
+ bool, # is_const
+ bool, # is_volatile
+ bool # is_restrict
+>
+
+Parameter | +C++ type | +Description | +
---|---|---|
is_const | +bool |
+const qualifier | +
is_volatile | +bool |
+volatile qualifier | +
is_restrict | +bool |
+restrict qualifier | +
Syntax: #hl.const
Syntax:
+#hl.format<
+ ::mlir::StringAttr # name
+>
+
+Parameter | +C++ type | +Description | +
---|---|---|
name | +::mlir::StringAttr |
++ |
Syntax: #hl.loader_uninitialized
Syntax:
+#hl.mode<
+ ::mlir::StringAttr # mode
+>
+
+Parameter | +C++ type | +Description | +
---|---|---|
mode | +::mlir::StringAttr |
++ |
Syntax: #hl.no_instrument_function
Syntax: #hl.nothrow
Syntax: #hl.nonnull
Syntax: #hl.packed
Syntax: #hl.pure
Syntax: #hl.restrict
Syntax:
+#hl.section<
+ ::mlir::StringAttr # name
+>
+
+Parameter | +C++ type | +Description | +
---|---|---|
name | +::mlir::StringAttr |
++ |
Syntax:
+#hl.quals<
+ bool, # is_unsigned
+ bool, # is_const
+ bool # is_volatile
+>
+
+Parameter | +C++ type | +Description | +
---|---|---|
is_unsigned | +bool |
+unsigned qualifier | +
is_const | +bool |
+const qualifier | +
is_volatile | +bool |
+volatile qualifier | +
Syntax: #hl.warn_unused_result
Syntax:
+!hl.adjusted<
+ Type, # original
+ Type # adjusted
+>
+
+Parameter | +C++ type | +Description | +
---|---|---|
original | +Type |
++ |
adjusted | +Type |
++ |
Syntax:
+!hl.array<
+ SizeParam, # size
+ Type, # elementType
+ CVRQualifiersAttr # quals
+>
+
+Parameter | +C++ type | +Description | +
---|---|---|
size | +SizeParam |
+size parameter for arrays | +
elementType | +Type |
++ |
quals | +CVRQualifiersAttr |
++ |
Syntax:
+!hl.attributed<
+ Type # elementType
+>
+
+Parameter | +C++ type | +Description | +
---|---|---|
elementType | +Type |
++ |
Syntax:
+!hl.bfloat16<
+ CVQualifiersAttr # quals
+>
+
+Parameter | +C++ type | +Description | +
---|---|---|
quals | +CVQualifiersAttr |
++ |
Syntax:
+!hl.bool<
+ CVQualifiersAttr # quals
+>
+
+Parameter | +C++ type | +Description | +
---|---|---|
quals | +CVQualifiersAttr |
++ |
Syntax:
+!hl.char<
+ UCVQualifiersAttr # quals
+>
+
+Parameter | +C++ type | +Description | +
---|---|---|
quals | +UCVQualifiersAttr |
++ |
Syntax:
+!hl.decayed<
+ Type # elementType
+>
+
+Parameter | +C++ type | +Description | +
---|---|---|
elementType | +Type |
++ |
Syntax:
+!hl.double<
+ CVQualifiersAttr # quals
+>
+
+Parameter | +C++ type | +Description | +
---|---|---|
quals | +CVQualifiersAttr |
++ |
Syntax:
+!hl.elaborated<
+ Type, # elementType
+ CVRQualifiersAttr # quals
+>
+
+Parameter | +C++ type | +Description | +
---|---|---|
elementType | +Type |
++ |
quals | +CVRQualifiersAttr |
++ |
Syntax:
+!hl.enum<
+ ::llvm::StringRef, # name
+ CVQualifiersAttr # quals
+>
+
+Parameter | +C++ type | +Description | +
---|---|---|
name | +::llvm::StringRef |
++ |
quals | +CVQualifiersAttr |
++ |
Syntax:
+!hl.float128<
+ CVQualifiersAttr # quals
+>
+
+Parameter | +C++ type | +Description | +
---|---|---|
quals | +CVQualifiersAttr |
++ |
Syntax:
+!hl.float<
+ CVQualifiersAttr # quals
+>
+
+Parameter | +C++ type | +Description | +
---|---|---|
quals | +CVQualifiersAttr |
++ |
Syntax:
+!hl.half<
+ CVQualifiersAttr # quals
+>
+
+Parameter | +C++ type | +Description | +
---|---|---|
quals | +CVQualifiersAttr |
++ |
Syntax:
+!hl.int128<
+ UCVQualifiersAttr # quals
+>
+
+Parameter | +C++ type | +Description | +
---|---|---|
quals | +UCVQualifiersAttr |
++ |
Syntax:
+!hl.int<
+ UCVQualifiersAttr # quals
+>
+
+Parameter | +C++ type | +Description | +
---|---|---|
quals | +UCVQualifiersAttr |
++ |
Syntax:
+!hl.lvalue<
+ Type # elementType
+>
+
+Parameter | +C++ type | +Description | +
---|---|---|
elementType | +Type |
++ |
Syntax: !hl.label
Syntax:
+!hl.longdouble<
+ CVQualifiersAttr # quals
+>
+
+Parameter | +C++ type | +Description | +
---|---|---|
quals | +CVQualifiersAttr |
++ |
Syntax:
+!hl.longlong<
+ UCVQualifiersAttr # quals
+>
+
+Parameter | +C++ type | +Description | +
---|---|---|
quals | +UCVQualifiersAttr |
++ |
Syntax:
+!hl.long<
+ UCVQualifiersAttr # quals
+>
+
+Parameter | +C++ type | +Description | +
---|---|---|
quals | +UCVQualifiersAttr |
++ |
Syntax:
+!hl.paren<
+ Type # elementType
+>
+
+Parameter | +C++ type | +Description | +
---|---|---|
elementType | +Type |
++ |
Syntax:
+!hl.ptr<
+ Type, # elementType
+ CVRQualifiersAttr # quals
+>
+
+Parameter | +C++ type | +Description | +
---|---|---|
elementType | +Type |
++ |
quals | +CVRQualifiersAttr |
++ |
Syntax:
+!hl.rvalue<
+ Type # elementType
+>
+
+Parameter | +C++ type | +Description | +
---|---|---|
elementType | +Type |
++ |
Syntax:
+!hl.record<
+ ::llvm::StringRef, # name
+ CVQualifiersAttr # quals
+>
+
+Parameter | +C++ type | +Description | +
---|---|---|
name | +::llvm::StringRef |
++ |
quals | +CVQualifiersAttr |
++ |
Syntax:
+!hl.reference<
+ Type # elementType
+>
+
+Parameter | +C++ type | +Description | +
---|---|---|
elementType | +Type |
++ |
Syntax:
+!hl.short<
+ UCVQualifiersAttr # quals
+>
+
+Parameter | +C++ type | +Description | +
---|---|---|
quals | +UCVQualifiersAttr |
++ |
Syntax:
+!hl.typeof.expr<
+ ::llvm::StringRef, # name
+ CVRQualifiersAttr # quals
+>
+
+Parameter | +C++ type | +Description | +
---|---|---|
name | +::llvm::StringRef |
++ |
quals | +CVRQualifiersAttr |
++ |
Syntax:
+!hl.typeof.type<
+ Type, # unmodifiedType
+ CVRQualifiersAttr # quals
+>
+
+Parameter | +C++ type | +Description | +
---|---|---|
unmodifiedType | +Type |
++ |
quals | +CVRQualifiersAttr |
++ |
Syntax:
+!hl.typedef<
+ ::llvm::StringRef, # name
+ CVRQualifiersAttr # quals
+>
+
+Parameter | +C++ type | +Description | +
---|---|---|
name | +::llvm::StringRef |
++ |
quals | +CVRQualifiersAttr |
++ |
Syntax:
+!hl.void<
+ CVQualifiersAttr # quals
+>
+
+Parameter | +C++ type | +Description | +
---|---|---|
quals | +CVQualifiersAttr |
++ |
-vast-export-fn-info
Create JSON that exports information about function arguments.
+Lowers module into llvm IR and dumps it on stderr.
+-o : Output JSON file to be created.
+
+-vast-hl-dce
Trim dead code
+Removes unreachable code, such as code after return or break/continue.
+-vast-hl-lower-typedefs
Replace hl::TypeDef
type by its underlying aliased type.
Replaces hl::TypeDef
types by its underlying aliased types.
+The conversion resolves nested typedefs.
All hl::TypeDef
are marked illegal and converted by this pass.
-vast-hl-lower-types
Lower high-level types to standard types
+Lower high-level types into standard types which is usually required first step +by other passes in the pipeline.
+Information about bit sizes of high level types is inferred from the data layout of
+the module, which is derived from the information provided by clang and emitted
+automatically by vast-cc
.
TODO: Named types are not yet supported.
+-vast-hl-splice-trailing-scopes
Remove trailing hl::Scope
s.
Removes trailing scopes.
+ + + + + + +A vast low-level dialect. +This dialect serves as a bottom layer in VAST dialect tower. +There should always exist a pass that lowers this dialect into LLVM Dialect.
+Work in progress - new operations are still being added and existing can be changed +or removed.
+ll.br
(::vast::ll::Br)Direct branch.
+Syntax:
+operation ::= `ll.br` $dest (`(` $operands^ `:` type($operands) `)`)? attr-dict
+
+Direct branch +Traits: Terminator
+Interfaces: BranchOpInterface
+Operand | +Description | +
---|---|
operands |
+any type | +
Successor | +Description | +
---|---|
dest |
+any successor | +
ll.concat
(::vast::ll::Concat)Concat integers together
+Syntax:
+operation ::= `ll.concat` operands attr-dict `:` functional-type(operands, results)
+
+Concat operands together, where first argument occupies lsb.
+Operand | +Description | +
---|---|
args |
+any type | +
Result | +Description | +
---|---|
result |
+any type | +
ll.cond_br
(::vast::ll::CondBr)Conditional branch.
+Syntax:
+operation ::= `ll.cond_br` $cond `:` type($cond) `,`
+ $trueDest (`(` $trueOperands^ `:` type($trueOperands) `)`)? `,`
+ $falseDest (`(` $falseOperands^ `:` type($falseOperands) `)`)?
+ attr-dict
+
+Direct branch +Traits: AttrSizedOperandSegments, Terminator
+Operand | +Description | +
---|---|
cond |
+any type | +
trueOperands |
+any type | +
falseOperands |
+any type | +
Successor | +Description | +
---|---|
trueDest |
+any successor | +
falseDest |
+any successor | +
ll.cond_scope_ret
(::vast::ll::CondScopeRet)Terminator of scope if condition is met, otherwise branch.
+Syntax:
+operation ::= `ll.cond_scope_ret` $cond `:` type($cond) `,`
+ $dest (`(` $dest_operands^ `:` type($dest_operands) `)`)? attr-dict
+
+Terminate or branch. +Traits: Terminator
+Operand | +Description | +
---|---|
cond |
+any type | +
dest_operands |
+any type | +
Successor | +Description | +
---|---|
dest |
+any successor | +
ll.extract
(::vast::ll::Extract)Extracts value
+Syntax:
+operation ::= `ll.extract` operands attr-dict `:` functional-type(operands, results)
+
+0
is lsb, [inc, exc)
Attribute | +MLIR Type | +Description | +
---|---|---|
from |
+::mlir::TypedAttr | +TypedAttr instance | +
to |
+::mlir::TypedAttr | +TypedAttr instance | +
Operand | +Description | +
---|---|
arg |
+any type | +
Result | +Description | +
---|---|
result |
+any type | +
ll.func
(::vast::ll::FuncOp)VAST function template
+Syntax:
+operation ::= `ll.func` $linkage $sym_name custom< FunctionSignatureAndBody >($function_type, attr-dict, $body)
+
+Inspired by cir::FuncOp
and mlir::func::FuncOp
:
++Operations within the function cannot implicitly capture values defined +outside of the function, i.e. Functions are
+IsolatedFromAbove
. All +external references must use function arguments or attributes that establish +a symbolic connection (e.g. symbols referenced by name via a string +attribute like SymbolRefAttr). An external function declaration (used when +referring to a function declared in some other module) has no body.
The function linkage information is specified by linkage
, as defined by
+GlobalLinkageKind
attribute.
Traits: AutomaticAllocationScope, IsolatedFromAbove, NoTerminator
+Interfaces: CallableOpInterface, FunctionOpInterface, RegionKindInterface, Symbol
+Attribute | +MLIR Type | +Description | +
---|---|---|
sym_name |
+::mlir::StringAttr | +string attribute | +
function_type |
+::mlir::TypeAttr | +type attribute of function type | +
linkage |
+::vast::core::GlobalLinkageKindAttr | +global linkage kind | +
sym_visibility |
+::mlir::StringAttr | +string attribute | +
arg_attrs |
+::mlir::ArrayAttr | +Array of dictionary attributes | +
res_attrs |
+::mlir::ArrayAttr | +Array of dictionary attributes | +
ll.gep
(::vast::ll::StructGEPOp)VAST struct gep operation
+VAST struct gep operation
+Attribute | +MLIR Type | +Description | +
---|---|---|
idx |
+::mlir::IntegerAttr | +32-bit signless integer attribute | +
name |
+::mlir::StringAttr | +string attribute | +
Operand | +Description | +
---|---|
record |
+any type | +
Result | +Description | +
---|---|
element |
+any type | +
ll.initialize
(::vast::ll::InitializeVar)Initialize a variable.
+Syntax:
+operation ::= `ll.initialize` operands attr-dict `:` functional-type(operands, results)
+
+Initialize a variable - for now this operation is a direct lowering from hl.var +initialization section. Later there will be need to discover how this ties +to constructors.
+Operand | +Description | +
---|---|
var |
+any type | +
elements |
+any type | +
Result | +Description | +
---|---|
result |
+any type | +
ll.inline_scope
(::vast::ll::InlineScope)Scope, that forwards (cond)scope return up.
+Result of inlined if. +Traits: NoRegionArguments
+ll.return
(::vast::ll::ReturnOp)Syntax:
+operation ::= `ll.return` ($result^ `:` type($result))? attr-dict
+
+Traits: Terminator, return_trait
+Operand | +Description | +
---|---|
result |
+any type | +
ll.scope
(::vast::ll::Scope)Scope, holds one region.
+Syntax:
+operation ::= `ll.scope` $body attr-dict
+
+Scope that holds one region, each block should be terminated + with either branch, scope return or their conditional variants. +Traits: NoRegionArguments
+ll.scope_recurse
(::vast::ll::ScopeRecurse)Jump to first block of scope.
+Syntax:
+operation ::= `ll.scope_recurse` attr-dict
+
+Modelling continue. +Traits: Terminator
+ll.scope_ret
(::vast::ll::ScopeRet)Terminator of scope.
+Syntax:
+operation ::= `ll.scope_ret` attr-dict
+
+Terminator of scopes (for example during lowering of loops). +Traits: Terminator
+ll.uninitialized_var
(::vast::ll::UninitializedVar)Declaration of variable that have not been initialized yet.
+Syntax:
+operation ::= `ll.uninitialized_var` attr-dict `:` type($result)
+
+Declaration of variable that have not been initialized yet. +Interfaces: VastSymbol
+Result | +Description | +
---|---|
result |
+any type | +
-vast-ll-to-llvm
Convert low level operations to LLVM dialect.
+Work in progess.
+ + + + + + +A vast metadata dialect. +This dialect intends capture user metadata +that are kept accross transformations.
+A metadata identifier.
+Syntax:
+#meta.id<
+ identifier_t # value
+>
+
+A metadata identifier can be used to relate operations +to external metadata storage.
+#meta.id<"0x3A28213A">
+
+Parameter | +C++ type | +Description | +
---|---|---|
value | +identifier_t |
++ |
A vast unsupported dialect. +This dialect defines a set of generic unsupported +operation/types that can be used to lower AST Node +that are yet not supported and can't be lowered by +other dialects.
+unsup.decl
(::vast::unsup::UnsupportedDecl)VAST unsupported decl
+Syntax:
+operation ::= `unsup.decl` $name attr-dict `:` $body
+
+VAST unsupported decl +Traits: NoTerminator
+Attribute | +MLIR Type | +Description | +
---|---|---|
name |
+::mlir::StringAttr | +string attribute | +
unsup.stmt
(::vast::unsup::UnsupportedStmt)VAST unsupported statement
+Syntax:
+operation ::= `unsup.stmt` $name attr-dict `:` type($result) $children
+
+VAST unsupported statement +Traits: NoTerminator
+Attribute | +MLIR Type | +Description | +
---|---|---|
name |
+::mlir::StringAttr | +string attribute | +
Result | +Description | +
---|---|
result |
+any type | +
Syntax:
+#unsup.attr<
+ ::mlir::StringAttr # spelling
+>
+
+Parameter | +C++ type | +Description | +
---|---|---|
spelling | +::mlir::StringAttr |
++ |
Syntax:
+!unsup.type<
+ ::llvm::StringRef # originName
+>
+
+Parameter | +C++ type | +Description | +
---|---|---|
originName | +::llvm::StringRef |
++ |
VAST is a library for program analysis and instrumentation of C/C++ and related +languages. VAST provides a foundation for customizable program representation +for a broad spectrum of analyses. Using the MLIR infrastructure, VAST provides +a toolset to represent C/C++ program at various stages of the compilation and +to transform the representation to the best-fit program abstraction.
+Whether static or dynamic, program analysis often requires a specific view +of the source code. The usual requirements for a representation is to be +easily analyzable, i.e., have a reasonably small set of operations, be truthful +to the semantics of the analyzed program, and the analysis must be relatable to +the source. It is also beneficial to access the source at various abstraction +levels.
+The current state-of-the-art tools leverage compiler infrastructures to perform +program analysis. This approach is beneficial because it remains truthful to the +executed program semantics, whether AST or LLVM IR. However, these +representations come at a cost as they are designed for optimization and code +generation, rather than for program analysis.
+The Clang AST is unoptimized and too complex for interpretation-based analysis. +Also, it lacks program features that Clang inserts during its LLVM code +generation process. On the other hand, LLVM is often too low-level and hard to +relate to high-level program constructs.
+VAST is a new compiler front/middle-end designed for program analysis. It +transforms parsed C and C++ code, in the form of Clang ASTs, into a high-level +MLIR dialect. The high level dialect is then progressively lowered all the way +down to LLVM IR. This progression enables VAST to represent the code as a tower +of IRs in multiple MLIR dialects. The MLIR allows us to capture high-level +features from AST and interleave them with low-level dialects.
+The feature that differentiates our approach is that the program representation
+can hold multiple representations simultaneously, the so-called tower of IRs
.
+One can imagine the tower as multiple MLIR modules side-by-side in various
+dialects. Each layer of the tower represents a specific stage of compilation. At
+the top is a high-level dialect relatable to AST, and at the bottom is a
+low-level LLVM-like dialect. Layers are interlinked with location information.
+Higher layers can also be seen as metadata for lower layers.
This feature simplifies analysis built on top of VAST IR in multiple ways. It +naturally provides provenance to higher levels dialects (and source code) +from the low levels. Similarly, one can reach for low-level representation from +the high-level source view. This can have multiple utilizations. One of them is +relating analysis results to the source. For a user, it is invaluable to +represent results in the language of what they see, that is, the high-level +representation of the source. For example, using provenance, one can link the +values in low-level registers to variable names in the source. Furthermore, +this streamlines communication from the user to the analysis backend and back in +the interactive tools and also allows the automatic analysis to query the +best-fit representation at any time.
+The provenance is invaluable for static analysis too. It is often advantageous +to perform analysis as an abstract interpretation of the low-level +representation and relate it to high-level constructs. For example, when trying +to infer properties about control flow, like loop invariants, one can examine +high-level operations and relate the results to low-level analysis using +provenance links.
+We expect to provide a DSL library for design of custom program representation +abstraction on top of our tower of IRs. The library will provide utilities to +link other dialects to the rest of the tower so that the provenance is usable +outside the main pipeline.
+As a foundation, VAST provides backbone dialects for the tower of IRs.
+A high-level dialect hl
is a faithful representation of Clang AST. While
+intermediate dialects represent compilation artifacts like ABI lowering of macro
+expansions. Whenever it is possible, we try to utilize standard dialects. At the
+bottom of the tower, we have the llvm
dialect. For features that are not
+present in the llvm
dialect, we utilize our low-level dialect ll
. We
+leverage a meta
dialect to provide provenance utilities. The currently
+supported features are documented in automatically generated dialect
+docs.
For types, we provide high-level types from Clang AST enriched by value +categories. This allows referencing types as presented in the source. In the +rest of the tower, we utilize standard or llvm types, respectively.
+One does not need to utilize the tower of IRs but can craft a specific +representation that interleaves multiple abstractions simultaneously.
+ + + + + + +VAST is a library for program analysis and instrumentation of C/C++ and related languages. VAST provides a foundation for customizable program representation for a broad spectrum of analyses. Using the MLIR infrastructure, VAST provides a toolset to represent C/C++ program at various stages of the compilation and to transform the representation to the best-fit program abstraction.
Whether static or dynamic, program analysis often requires a specific view of the source code. The usual requirements for a representation is to be easily analyzable, i.e., have a reasonably small set of operations, be truthful to the semantics of the analyzed program, and the analysis must be relatable to the source. It is also beneficial to access the source at various abstraction levels.
The current state-of-the-art tools leverage compiler infrastructures to perform program analysis. This approach is beneficial because it remains truthful to the executed program semantics, whether AST or LLVM IR. However, these representations come at a cost as they are designed for optimization and code generation, rather than for program analysis.
The Clang AST is unoptimized and too complex for interpretation-based analysis. Also, it lacks program features that Clang inserts during its LLVM code generation process. On the other hand, LLVM is often too low-level and hard to relate to high-level program constructs.
VAST is a new compiler front/middle-end designed for program analysis. It transforms parsed C and C++ code, in the form of Clang ASTs, into a high-level MLIR dialect. The high level dialect is then progressively lowered all the way down to LLVM IR. This progression enables VAST to represent the code as a tower of IRs in multiple MLIR dialects. The MLIR allows us to capture high-level features from AST and interleave them with low-level dialects.
"},{"location":"#a-tower-of-irs","title":"A Tower of IRs","text":"The feature that differentiates our approach is that the program representation can hold multiple representations simultaneously, the so-called tower of IRs
. One can imagine the tower as multiple MLIR modules side-by-side in various dialects. Each layer of the tower represents a specific stage of compilation. At the top is a high-level dialect relatable to AST, and at the bottom is a low-level LLVM-like dialect. Layers are interlinked with location information. Higher layers can also be seen as metadata for lower layers.
This feature simplifies analysis built on top of VAST IR in multiple ways. It naturally provides provenance to higher levels dialects (and source code) from the low levels. Similarly, one can reach for low-level representation from the high-level source view. This can have multiple utilizations. One of them is relating analysis results to the source. For a user, it is invaluable to represent results in the language of what they see, that is, the high-level representation of the source. For example, using provenance, one can link the values in low-level registers to variable names in the source. Furthermore, this streamlines communication from the user to the analysis backend and back in the interactive tools and also allows the automatic analysis to query the best-fit representation at any time.
The provenance is invaluable for static analysis too. It is often advantageous to perform analysis as an abstract interpretation of the low-level representation and relate it to high-level constructs. For example, when trying to infer properties about control flow, like loop invariants, one can examine high-level operations and relate the results to low-level analysis using provenance links.
We expect to provide a DSL library for design of custom program representation abstraction on top of our tower of IRs. The library will provide utilities to link other dialects to the rest of the tower so that the provenance is usable outside the main pipeline.
"},{"location":"#dialects","title":"Dialects","text":"As a foundation, VAST provides backbone dialects for the tower of IRs. A high-level dialect hl
is a faithful representation of Clang AST. While intermediate dialects represent compilation artifacts like ABI lowering of macro expansions. Whenever it is possible, we try to utilize standard dialects. At the bottom of the tower, we have the llvm
dialect. For features that are not present in the llvm
dialect, we utilize our low-level dialect ll
. We leverage a meta
dialect to provide provenance utilities. The currently supported features are documented in automatically generated dialect docs.
For types, we provide high-level types from Clang AST enriched by value categories. This allows referencing types as presented in the source. In the rest of the tower, we utilize standard or llvm types, respectively.
One does not need to utilize the tower of IRs but can craft a specific representation that interleaves multiple abstractions simultaneously.
"},{"location":"CONTRIBUTING/","title":"Contributing to VAST","text":"First, thanks for your interest in contributing to VAST! We welcome and appreciate all contributions, including bug reports, feature suggestions, tutorials/blog posts, and code improvements.
If you're unsure where to start, we recommend our good first issue
issue label.
Bug reports and feature suggestions can be submitted to our issue tracker.
When reporting a bug please provide a minimal example with steps to reproduce the issue if possible. It helps us a lot, as we can get to the bottom of the issue much faster and can even use it as a test case to catch future regressions.
"},{"location":"CONTRIBUTING/#questions","title":"Questions","text":"Questions can be submitted to the discussion page.
"},{"location":"CONTRIBUTING/#legal","title":"Legal","text":"For legal reasons, we require contributors to sign our Contributor License Agreement. This will be automatically checked as part of our CI.
"},{"location":"CONTRIBUTING/#git-pull-requests","title":"Git & Pull Requests","text":"VAST uses the pull request contribution model. Please make an account on Github, fork this repo, and submit code contributions via pull request. For more documentation, look here.
Since VAST does not squash commits in a pull request, it is important to uphold some culture when it comes to commits.
component: Simple sentence with a dot.
with maximum of 80 chars and optional longer message.git log
on the modified file(s).Some pull request guidelines:
VAST is licensed according to the Apache 2.0 license. VAST links against and uses Clang and LLVM APIs. Clang is also licensed under Apache 2.0, with LLVM exceptions.
This research was developed with funding from the Defense Advanced Research Projects Agency (DARPA). The views, opinions and/or findings expressed are those of the author and should not be interpreted as representing the official views or policies of the Department of Defense or the U.S. Government.
Distribution Statement A \u2013 Approved for Public Release, Distribution Unlimited
"},{"location":"Designs/abi/","title":"Abi","text":""},{"location":"Designs/abi/#abi","title":"ABI","text":"VAST partially models ABI specifications for function types and therefore callsites. While the specification goes into details regarding registers, for now VAST only offers lowering similar to what clang codegen does - argument and return types are coerced to types that will easily fit their respective registers once that allocation takes place. There is nothing preventing inclusion of information about registers as well (for example as metadata or separate operations/dialect), however it is not yet implemented.
Similar to other transformation in VAST, ABI modelling tries to be as modular as possible and as such can be split into three distinct steps:
Main goal for now is to lower function prototypes to match the types produced by clang, so that VAST emitted LLVM can be used as drop-in replacement for clang one.
When reading this document please keep in mind that implementation of this feature is still ongoing and therefore particular technical details could change drastically (although we hope that overall design will remain the same).
"},{"location":"Designs/abi/#classification","title":"Classification","text":"Mirrors what clang does, but instead of locking the computed information away, we expose the API. In ideal world we would like to keep the algorithm(s, as there may be multiple per different ABIs) generic. This can be achieved by requiring users to implement & provide interface that specifies various details about used types; algorithm will be same when talking about hl
or LLVM
types after all.
Once classification for a function is computed, we need to:
sret
.To facilitate this, VAST contains abi
dialect, which operations encode \"high-level\" descriptions of type transformations that can occur during ABI lowering as operations. This is not very different from what clang does, but VAST does it over multiple steps.
For functions, type change itself is easy and to mark that function is transformed, abi.func
operation is used instead of original one to define the newly formed function. However, as arguments and return types are different, we introduce abi.prologue
and abi.epilogue
operations.
Consider following function we want to lower:
Disclaimer: Since abi
dialect does not have nice formatting, therefore examples in this section contain some artistic liberty, but semantics (and operations) are preserved.
strut Point{ int; int; int; };\n\nint size( struct Point p ) { ... }\n
After running the classification, we discover that type of size
should be ( i64, i32 ) -> i32
- both arguments and returned value are passed directly. Therefore we encode it as follows:
abi.func size(i64 %arg0_0, i32 %arg0_1 ) -> i32\n{\n %arg = abi.prologue -> hl.lvalue< hl.struct< \"Point\" > >\n {\n %0 = abi.direct %arg0_0, %arg0_1: (i64, i32) -> hl.struct< \"Point\" >\n abi.yield %0\n }\n\n // Computation can continue as before, because %arg has a correct type\n\n %ret = ... value that was previously returned ... -> i32\n %out = abi.epilogue\n {\n %0 = abi.direct %ret: i32 -> i32\n abi.yield %0\n }\n hl.return %out\n}\n
In case, there were multiple function arguments, the abi.prologue
would return more values.
\n%args = abi.prologue -> (hl.lvalue< hl.struct< \"Point\" > >, i32 )\n{\n %0 = abi.direct %arg0_0, %arg0_1\n %1 = abi.direct %arg1\n abi.yield %0, %1\n}\n
TODO: Add extra examples, at least memory
and sret
.
This design allows easy analysis and subsequent rewrite (as each function has a prologue and epilogue and returned values are explicitly yielded).
Callsites are transformed in the same manner (unfortunately, they look more complicated due to nested regions):
\n%x = hl.call< \"size\" > %arg: hl.struct< \"Point\" > -> i32\n\n%x = abi.call< \"size\" >: () -> i32\n{\n %arg0_0, %arg0_1 = abi.call_args: () -> (i64, i32)\n {\n %0, %1 = abi.direct %arg\n abi.yield %0, %1\n }\n %x' = hl.call< \"size\" > %arg0_0, &arg0_1 : (i64, i32) -> i32\n %0 = abi.call_rets : () -> i32\n {\n %0 = abi.direct %x' : i32 -> i32\n abi.yield %0\n }\n abi.yield %0\n}\n\n
For now, same abi
operations are used to encode transformation in callsite and function (although they change the value in a \"opposite direction\"), this may be later revisited, but for now it is enough to look at the parent operation to determine whether the transformation lies in a function or callsite.
While abi
dialect provides us with all the information required to do the transformation, it does not \"compute\" anything. Rather this lowering is left to a next pass. We hope by splitting the transformation into 2, we achieve the following:
hl
, llvm
or totally random dialect of user choice.The proposed way of parameter passing for next-gen c++ is to use declarative style:
f( in X x) // x can be read from\nf( inout X x) // x can be used in read and write\nf( out X x) // x can be writen to\nf( move X x) // x will be moved from\nf(forward X x) // x will be passed along\n
Similar holds for return values:
auto f() move X { /* ... */ } // move X to caller\nauto f() X { /* ... */ } // possibly same\nauto f() forward X { /* ... */ } // pass along X to the caller\n
Using the semantics aware vast dialects, we can design a method to automatically modernize code to use a declarative style of parameter passing.
"},{"location":"Designs/cpp2-parameters/#examples","title":"Examples","text":"CPP CPP2\nvoid f(const X& x) {\n g(x);\n}\n
\nvoid f(in X x) {\n g(x);\n}\nVAST high-level dialect Transformed to parameter dialect
\nhl.func @f(%x: !hl.ref< !hl.lvalue< !hl.struct< \"X\" > >, const >) {\n %0 = hl.call @g(%x) : (!hl.ref< !hl.lvalue< !hl.struct< \"X\" > >, const >) -> !hl.void\n}\n
\nhl.func @f(%x: !par.in< !hl.lvalue< !hl.struct< \"X\" > > >) {\n %0 = hl.call @g(%x) : (!par.in< !hl.lvalue< !hl.struct< \"X\" > > >) -> !hl.void\n}\n
The transformation will be probably overapproximating, in cases when the analysis cannot determine the precise category, i.e., inout
oveapproximates in
and out
parameters.
The dialect will define type adaptors for each parameter category:
!par.in< T >\n!par.out< T >\n!par.inout< T >\n!par.move< T >\n!par.forward< T >\n
Parameter categories can also be present as type attributes not to mess up the rest of the type trait system. This needs further investigation.
The advantage of the type adaptors we can enforce the correct usage of values. For example, we can forbid usage of out
parameter in other places than assignment.
Currently, it is necessary to use clang
(due to gcc
bug) to build VAST. On Linux it is also necessary to use lld
at the moment.
VAST uses llvm-17
which can be obtained from the repository provided by LLVM.
Before building (for Ubuntu) get all the necessary dependencies by running
apt-get install build-essential cmake ninja-build libstdc++-12-dev llvm-17 libmlir-17 libmlir-17-dev mlir-17-tools libclang-17-dev\n
or an equivalent command for your operating system of choice.
"},{"location":"GettingStarted/build/#instructions","title":"Instructions","text":"To configure project run cmake
with following default options. In case clang
isn't your default compiler prefix the command with CC=clang CXX=clang++
. If you want to use system installed llvm
and mlir
(on Ubuntu) use:
cmake --preset ninja-multi-default \\\n --toolchain ./cmake/lld.toolchain.cmake \\\n -DCMAKE_PREFIX_PATH=/usr/lib/llvm-17/\n
To use a specific llvm
provide -DCMAKE_PREFIX_PATH=<llvm & mlir instalation paths>
option, where CMAKE_PREFIX_PATH
points to directory containing LLVMConfig.cmake
and MLIRConfig.cmake
.
Note: vast requires LLVM with RTTI enabled. Use LLVM_ENABLE_RTTI=ON
if you build your own LLVM.
Finally, build the project:
cmake --build --preset ninja-rel\n
Use ninja-deb
preset for debug build.
To run mlir codegen of highlevel dialect use.
./builds/ninja-multi-default/tools/vast-front/Release/vast-front -vast-emit-mlir=<dialect> <input.c> -o <output.mlir>\n
Supported dialects are: hl
, ll
, llvm
ctest --preset ninja-deb\n
"},{"location":"GettingStarted/debug/","title":"Debug","text":""},{"location":"GettingStarted/debug/#debugging","title":"Debugging","text":"VAST makes use of the MLIR infrastructure to facilitate the reproduction of crashes within the pipeline. You can refer to the MLIR documentation on crash and failure reproduction for more details. We provide a similar set of options in vast-front to aid in debugging.
"},{"location":"GettingStarted/debug/#generating-crash-reproducers","title":"Generating Crash Reproducers","text":"To generate a minimal reproducer for a crashed pipeline of vast-front
, use the following option:
-vast-emit-crash-reproducer=\"reproducer.mlir\" \n
This option disables multithreading to ensure a comprehensive crash report. You can then load and examine the crash report using the following command:
vast-opt -run-reproducer reproducer.mlir\n
"},{"location":"GettingStarted/debug/#pipeline-information","title":"Pipeline Information","text":"To obtain a detailed insight into the pipeline, you can use the following option of vast-front
:
-vast-print-pipeline\n
This option dumps the pipeline string to the standard error stream. You can use this information for a more specific investigation of the pipeline. Execute the pipeline with the printed string using the following command:
vast-opt --pass-pipeline=\"pipeline-string\"\n
"},{"location":"GettingStarted/debug/#debug-pipeline","title":"Debug Pipeline","text":"With the -vast-debug
option, you get more detailed crash reports. It shows MLIR operations when there's an error and provides current stack traces.
VAST offers a handy script to generate a variety of MLIR primitives. You can find the script at scripts/templater.py. This tool is designed to help you create dialects, passes, operations, types, and attributes interactively.
"},{"location":"GettingStarted/extend/#usage","title":"Usage","text":"Just run the script. It has been designed to provide a guided process for generating the desired primitives. If you find anything confusing or unintuitive, please don't hesitate to open an issue so that we can address it.
When you run the script, it will generate the basic skeleton for your chosen primitive. It will list the generated files which you can freely modify to provide desired functionality.
"},{"location":"Tools/vast-front/","title":"VAST: Compiler Driver","text":"WIP vast-front
VAST provides an implementation of LSP language server in the form of the vast-lsp-server
tool. This tool interacts with the MLIR C++ API to support rich language queries, such as \u201cFind Definition\u201d.
The tool easily integrates with VSCode extension MLIR. The user needs to point the extension to mlir-lsp-server
. To do so, one can create a symbolic link named mlir-lsp-server
to point to built vast-lsp-server
.
To build vast-lsp-server
use:
cmake --build <build-dir> --target vast-lsp-server\n
"},{"location":"Tools/vast-opt/","title":"VAST: Optimizer","text":"After mlir
module from vast-cc
is produced, we can leverage our optimisation pipeline to transform module in various ways. The lowest level we can do is LLVM dialect, from which we can dump LLVM IR if desired.
Overall design philosophy is that passes try to be really modular, self-contained and doing one thing properly - all while trying to preserve provenance metadata. Sometimes this does not exactly hold (transformation from HL
into LL
is huge) but it is what we strive for. Passes will more often than not have some dependencies between themselves - always consult documentation if unsure and report an issue if wiki is out of date on this.
TODO: Improve once we have examples
TL;DR: Vast provided passes always try to keep metadata (and they should do a good job), but for passes from other sources this does not hold and probably some heuristic will be used to re-compute them in best-effort.
"},{"location":"Tools/vast-opt/#passes","title":"Passes","text":"Passes we have implemented can be roughly grouped into several categories. We also note some of the native mlir passes that are needed to continue with transformations to reach LLVM dialect.
"},{"location":"Tools/vast-opt/#type-lowering","title":"Type lowering","text":"A common prerequisite for other passes is to lower HL
types into standard types. This can be done in two steps: * --vast-hl-lower-types
- Converts simple (non-struct) types according to provided data layout (embedded in the mlir module metadata). * --vast-hl-structs-to-tuples
- Converts HL
struct types into standard tuples
While these should be commutative, the preferred order is --vast-hl-lower-types --vast-hl-structs-to-tuples
--vast-hl-to-scf
HL
control flow ops (currently only hl.if
and hl.while
) into their scf
equivalents. Since scf
requires i1
in their conditions, additional casts may be inserted to satisfy this requirement (currently they are emitted in HL
however this behaviour should customisable eventually.To produce an LLVM following addition passes must be run --convert-scf-to-std --convert-std-to-llvm
and possibly --vast-hl-to-ll
as well (or some equivalent, depending on how conditions are coerced)
--vast-hl-to-ll
HL
operation into their LLVM dialect equivalents - this is a rather huge pass, for details see its documentation.--vast-llvm-dump
llvm::errs()
in human readable form. Since passes can run in parallel, dump to file is non-trivial.Let's say we have file main.c
which we want to lower into some dialect. First let's have a look at some generic invocations we may find handy:
To get mlir module via vast-cc
vast-cc --ccopts -xc --from-source main.c\n
A quick remainder * --ccopts -xc
says we are doing C
not C++
* --from-source file
says that source code comes from the file
Once we have the module, we can invoke vast-opt
, with easiest way being a simple pipe
vast-cc --ccopts -xc --from-source main.c | vast-opt pass-we-want another-pass-we-want\n
If we want, we can also chain pipes
vast-cc --ccopts -xc --from-source main.c | vast-opt pass | vast-opt another-pass | ...\n
Now, let's say we want to lower into LLVM bitcode, therefore the invocation will look as follows
vast-cc --ccopts -xc --from-source main.c | vast-opt --vast-hl-lower-types --vast-hl-structs-to-tuples\n --vast-hl-to-scf --convert-scf-to-std --convert-std-to-llvm\n --vast-hl-to-ll\n
"},{"location":"Tools/vast-query/","title":"VAST: Query","text":"vast-query
is a command line tool to query symbols in the vast generated MLIR. Its primary purpose is to test symbols and their use edges in the produced MLIR. Example of usage:
vast-query [options] <input file>\n
Options:
--scope=<function name> - Show values from scope of a given function\n --show-symbols=<value> - Show MLIR symbols\n =functions - show function symbols\n =types - show type symbols\n =records - show record symbols\n =vars - show variable symbols\n =globs - show global variable symbols\n =all - show all symbols\n --symbol-users=<symbol name> - Show users of a given symbol\n
"},{"location":"Tools/vast-repl/","title":"VAST: REPL","text":"WIP vast-repl
is an interactive MLIR query and modification tool.
Commands:
exit - exits repl\n\nhelp - prints help\nload <filename> - loads source from file\n\nshow <value> - displays queried value\n =source - loaded source code\n =ast - clang ast\n =module - current VAST MLIR module\n =symbols - present symbols in the module\n\nmeta <action> - operates on metadata for given symbol\n =add <symbol> <id> - adds <id> meta to <symbol>\n =get <id> - gets symbol with <id> meta\n
"},{"location":"dialects/HighLevelPasses/","title":"High Level","text":""},{"location":"dialects/HighLevelPasses/#-vast-export-fn-info","title":"-vast-export-fn-info
","text":"Create JSON that exports information about function arguments.
Lowers module into llvm IR and dumps it on stderr.
"},{"location":"dialects/HighLevelPasses/#options","title":"Options","text":"-o : Output JSON file to be created.\n
"},{"location":"dialects/HighLevelPasses/#-vast-hl-dce","title":"-vast-hl-dce
","text":"Trim dead code
Removes unreachable code, such as code after return or break/continue.
"},{"location":"dialects/HighLevelPasses/#-vast-hl-lower-typedefs","title":"-vast-hl-lower-typedefs
","text":"Replace hl::TypeDef
type by its underlying aliased type.
Replaces hl::TypeDef
types by its underlying aliased types. The conversion resolves nested typedefs.
All hl::TypeDef
are marked illegal and converted by this pass.
-vast-hl-lower-types
","text":"Lower high-level types to standard types
Lower high-level types into standard types which is usually required first step by other passes in the pipeline.
Information about bit sizes of high level types is inferred from the data layout of the module, which is derived from the information provided by clang and emitted automatically by vast-cc
.
TODO: Named types are not yet supported.
"},{"location":"dialects/HighLevelPasses/#-vast-hl-splice-trailing-scopes","title":"-vast-hl-splice-trailing-scopes
","text":"Remove trailing hl::Scope
s.
Removes trailing scopes.
"},{"location":"dialects/LowLevelPasses/","title":"Low Level","text":""},{"location":"dialects/LowLevelPasses/#-vast-ll-to-llvm","title":"-vast-ll-to-llvm
","text":"Convert low level operations to LLVM dialect.
Work in progess.
"},{"location":"dialects/ABI/ABI/","title":"ABI","text":""},{"location":"dialects/ABI/ABI/#abi-dialect","title":"'abi' Dialect","text":"A vast ABI dialect. Dialect provides operations to describe how arguments and return values are transformed to better model target abi.
abi.call
(::vast::abi::CallOp)","text":"ABI call operation
Syntax:
operation ::= `abi.call` $callee `(` $args `)` attr-dict `:` functional-type( $args, $results )\n
ABI call operation Interfaces: CallOpInterface
"},{"location":"dialects/ABI/ABI/#attributes","title":"Attributes:","text":"Attribute MLIR Type Descriptioncallee
::mlir::FlatSymbolRefAttr flat symbol reference attribute"},{"location":"dialects/ABI/ABI/#operands","title":"Operands:","text":"Operand Description args
any type"},{"location":"dialects/ABI/ABI/#results","title":"Results:","text":"Result Description results
any type"},{"location":"dialects/ABI/ABI/#abicall_args-vastabicallargsop","title":"abi.call_args
(::vast::abi::CallArgsOp)","text":"Not implement yet.
Syntax:
operation ::= `abi.call_args` $body attr-dict `:` type($results)\n
WIP
"},{"location":"dialects/ABI/ABI/#results_1","title":"Results:","text":"Result Descriptionresults
any type"},{"location":"dialects/ABI/ABI/#abicall_exec-vastabicallexecutionop","title":"abi.call_exec
(::vast::abi::CallExecutionOp)","text":"WIP
Syntax:
operation ::= `abi.call_exec` $callee `(` $args `)` $body attr-dict `:` functional-type($args, $result)\n
WIP Interfaces: CallOpInterface
"},{"location":"dialects/ABI/ABI/#attributes_1","title":"Attributes:","text":"Attribute MLIR Type Descriptioncallee
::mlir::FlatSymbolRefAttr flat symbol reference attribute"},{"location":"dialects/ABI/ABI/#operands_1","title":"Operands:","text":"Operand Description args
any type"},{"location":"dialects/ABI/ABI/#results_2","title":"Results:","text":"Result Description result
any type"},{"location":"dialects/ABI/ABI/#abicall_rets-vastabicallretsop","title":"abi.call_rets
(::vast::abi::CallRetsOp)","text":"Not implement yet.
Syntax:
operation ::= `abi.call_rets` $body attr-dict `:` type($results)\n
WIP
"},{"location":"dialects/ABI/ABI/#results_3","title":"Results:","text":"Result Descriptionresults
any type"},{"location":"dialects/ABI/ABI/#abidirect-vastabidirectop","title":"abi.direct
(::vast::abi::DirectOp)","text":"Pass value directly - usually means by register
Syntax:
operation ::= `abi.direct` $value attr-dict `:` type($value) `->` type($result)\n
Pass value directly - usually means by register.
"},{"location":"dialects/ABI/ABI/#operands_2","title":"Operands:","text":"Operand Descriptionvalue
any type"},{"location":"dialects/ABI/ABI/#results_4","title":"Results:","text":"Result Description result
any type"},{"location":"dialects/ABI/ABI/#abiepilogue-vastabiepilogueop","title":"abi.epilogue
(::vast::abi::EpilogueOp)","text":"WIP
Syntax:
operation ::= `abi.epilogue` $body attr-dict `:` type($results)\n
WIP
"},{"location":"dialects/ABI/ABI/#results_5","title":"Results:","text":"Result Descriptionresults
any type"},{"location":"dialects/ABI/ABI/#abifunc-vastabifuncop","title":"abi.func
(::vast::abi::FuncOp)","text":"_ Function with transformed type. _
Syntax:
operation ::= `abi.func` $sym_name custom< FunctionSignatureAndBody >($function_type, attr-dict, $body)\n
Placeholder.
Traits: AutomaticAllocationScope, IsolatedFromAbove, NoTerminator
Interfaces: CallableOpInterface, FunctionOpInterface, RegionKindInterface, Symbol
"},{"location":"dialects/ABI/ABI/#attributes_2","title":"Attributes:","text":"Attribute MLIR Type Descriptionsym_name
::mlir::StringAttr string attribute function_type
::mlir::TypeAttr type attribute of function type linkage
::vast::core::GlobalLinkageKindAttr global linkage kind sym_visibility
::mlir::StringAttr string attribute arg_attrs
::mlir::ArrayAttr Array of dictionary attributes res_attrs
::mlir::ArrayAttr Array of dictionary attributes"},{"location":"dialects/ABI/ABI/#abiindirect-vastabiindirectop","title":"abi.indirect
(::vast::abi::IndirectOp)","text":"Value is passed indirectly via memory
Syntax:
operation ::= `abi.indirect` $value attr-dict `:` type($value) `->` type($result)\n
Value is passed indirectly via memory
"},{"location":"dialects/ABI/ABI/#operands_3","title":"Operands:","text":"Operand Descriptionvalue
any type"},{"location":"dialects/ABI/ABI/#results_6","title":"Results:","text":"Result Description result
any type"},{"location":"dialects/ABI/ABI/#abiprologue-vastabiprologueop","title":"abi.prologue
(::vast::abi::PrologueOp)","text":"WIP
Syntax:
operation ::= `abi.prologue` $body attr-dict `:` type($results)\n
WIP
"},{"location":"dialects/ABI/ABI/#results_7","title":"Results:","text":"Result Descriptionresults
any type"},{"location":"dialects/ABI/ABI/#abiret_direct-vastabiretdirectop","title":"abi.ret_direct
(::vast::abi::RetDirectOp)","text":"Value is returned directly.
Syntax:
operation ::= `abi.ret_direct` $value attr-dict `:` type($value) `->` type($result)\n
Value is returned directly.
"},{"location":"dialects/ABI/ABI/#operands_4","title":"Operands:","text":"Operand Descriptionvalue
any type"},{"location":"dialects/ABI/ABI/#results_8","title":"Results:","text":"Result Description result
any type"},{"location":"dialects/ABI/ABI/#abitodo-vastabitodoop","title":"abi.todo
(::vast::abi::TodoOp)","text":"Not implement yet.
Syntax:
operation ::= `abi.todo` $value attr-dict `:` type($value) `->` type($result)\n
Not implemented yet
"},{"location":"dialects/ABI/ABI/#operands_5","title":"Operands:","text":"Operand Descriptionvalue
any type"},{"location":"dialects/ABI/ABI/#results_9","title":"Results:","text":"Result Description result
any type"},{"location":"dialects/ABI/ABI/#abiwrap_fn-vastabiwrapfuncop","title":"abi.wrap_fn
(::vast::abi::WrapFuncOp)","text":"_ Function that defines abi transformation of args. _
Syntax:
operation ::= `abi.wrap_fn` $sym_name custom< FunctionSignatureAndBody >($function_type, attr-dict, $body)\n
Placeholder.
Traits: AutomaticAllocationScope, IsolatedFromAbove, NoTerminator
Interfaces: CallableOpInterface, FunctionOpInterface, RegionKindInterface, Symbol
"},{"location":"dialects/ABI/ABI/#attributes_3","title":"Attributes:","text":"Attribute MLIR Type Descriptionsym_name
::mlir::StringAttr string attribute function_type
::mlir::TypeAttr type attribute of function type linkage
::vast::core::GlobalLinkageKindAttr global linkage kind sym_visibility
::mlir::StringAttr string attribute arg_attrs
::mlir::ArrayAttr Array of dictionary attributes res_attrs
::mlir::ArrayAttr Array of dictionary attributes"},{"location":"dialects/ABI/ABI/#abiyield-vastabiyieldop","title":"abi.yield
(::vast::abi::YieldOp)","text":"WIP
Syntax:
operation ::= `abi.yield` $values attr-dict `:` type($values) `->` type($result)\n
WIP Traits: Terminator
"},{"location":"dialects/ABI/ABI/#operands_6","title":"Operands:","text":"Operand Descriptionvalues
any type"},{"location":"dialects/ABI/ABI/#results_10","title":"Results:","text":"Result Description result
any type"},{"location":"dialects/Core/Core/","title":"Core","text":""},{"location":"dialects/Core/Core/#core-dialect","title":"'core' Dialect","text":"Utility dialect to provide common features for other dialects. Dialect providing features that may be used by other dialects. These features can be used by including \"vast/Dialect/Core/Utils.td\" It also provides lazy.op for lazy evaluation of expressions and binary logical operations that make use of it.
core.bin.land
(::vast::core::BinLAndOp)","text":"VAST core dialect logical binary operation
Syntax:
operation ::= `core.bin.land` $lhs `,` $rhs attr-dict `:` functional-type(operands, results)\n
Core dialect logical binary operation. This operation takes two operands and returns one result, each of these is required to be of the same type.
The custom assembly form of the operation is as follows:
%result = %lhs, %rhs : type"},{"location":"dialects/Core/Core/#operands","title":"Operands:","text":"Operand Description lhs
any type rhs
any type"},{"location":"dialects/Core/Core/#results","title":"Results:","text":"Result Description result
any type"},{"location":"dialects/Core/Core/#corebinlor-vastcorebinlorop","title":"core.bin.lor
(::vast::core::BinLOrOp)","text":"
VAST core dialect logical binary operation
Syntax:
operation ::= `core.bin.lor` $lhs `,` $rhs attr-dict `:` functional-type(operands, results)\n
Core dialect logical binary operation. This operation takes two operands and returns one result, each of these is required to be of the same type.
The custom assembly form of the operation is as follows:
%result = %lhs, %rhs : type"},{"location":"dialects/Core/Core/#operands_1","title":"Operands:","text":"Operand Description lhs
any type rhs
any type"},{"location":"dialects/Core/Core/#results_1","title":"Results:","text":"Result Description result
any type"},{"location":"dialects/Core/Core/#coreimplicitreturn-vastcoreimplicitreturnop","title":"core.implicit.return
(::vast::core::ImplicitReturnOp)","text":"
VAST implicit return
Syntax:
operation ::= `core.implicit.return` $result `:` type($result) attr-dict\n
Op representing return that wasn't explicitely written in the source (e.g. in void fun(){}).
Traits: return_trait, soft_terminator
"},{"location":"dialects/Core/Core/#operands_2","title":"Operands:","text":"Operand Descriptionresult
any type"},{"location":"dialects/Core/Core/#corelazyop-vastcorelazyop","title":"core.lazy.op
(::vast::core::LazyOp)","text":"Lazily evaluate a region.
Syntax:
operation ::= `core.lazy.op` $lazy attr-dict `:` type(results)\n
The operation serves to encapsulate delayed evaluation in its region.
Traits: NoTerminator
"},{"location":"dialects/Core/Core/#results_2","title":"Results:","text":"Result Descriptionresult
any type"},{"location":"dialects/Core/Core/#corescope-vastcorescopeop","title":"core.scope
(::vast::core::ScopeOp)","text":"VAST scope declaration
Syntax:
operation ::= `core.scope` $body attr-dict\n
Scope operation servers to represent explicitly high-level code scope. Other control flow operations represent scopes implicitly. It is a single-region operation.
Traits: NoTerminator
Interfaces: RegionKindInterface
"},{"location":"dialects/Core/Core/#coreselect-vastcoreselectop","title":"core.select
(::vast::core::SelectOp)","text":"Select a value based on condition.
Syntax:
operation ::= `core.select` $cond `,` $thenRegion `,` $elseRegion attr-dict `:` functional-type(operands, results)\n
Usual select operation. First operand is selected if predicate is true, second otherwise (to mirror how ternary works in C).
%result = %cond %lhs, %rhs : type"},{"location":"dialects/Core/Core/#operands_3","title":"Operands:","text":"Operand Description cond
any type thenRegion
any type elseRegion
any type"},{"location":"dialects/Core/Core/#results_3","title":"Results:","text":"Result Description results
any type"},{"location":"dialects/Core/Core/#attribute-definition","title":"Attribute definition","text":""},{"location":"dialects/Core/Core/#booleanattr","title":"BooleanAttr","text":"
An Attribute containing a boolean value
Syntax:
#core.bool<\n ::mlir::Type, # type\n bool # value\n>\n
An boolean attribute is a literal attribute that represents a boolean value.
"},{"location":"dialects/Core/Core/#parameters","title":"Parameters:","text":"Parameter C++ type Description type::mlir::Type
value bool
"},{"location":"dialects/Core/Core/#globallinkagekindattr","title":"GlobalLinkageKindAttr","text":"Linkage type/kind
Syntax:
#core.global_linkage_kind<\n ::vast::core::GlobalLinkageKind # value\n>\n
"},{"location":"dialects/Core/Core/#parameters_1","title":"Parameters:","text":"Parameter C++ type Description value ::vast::core::GlobalLinkageKind
an enum of type GlobalLinkageKind"},{"location":"dialects/Core/Core/#floatattr","title":"FloatAttr","text":"An Attribute containing a floating point value
Syntax:
#core.float<\n ::mlir::Type, # type\n ::llvm::APFloat # value\n>\n
A float attribute is a literal attribute that represents a floating point value of the specified floating point type.
"},{"location":"dialects/Core/Core/#parameters_2","title":"Parameters:","text":"Parameter C++ type Description type::mlir::Type
value ::llvm::APFloat
"},{"location":"dialects/Core/Core/#integerattr","title":"IntegerAttr","text":"An Attribute containing a integer value
Syntax:
#core.integer<\n ::mlir::Type, # type\n ::llvm::APSInt # value\n>\n
An integer attribute is a literal attribute that represents an integral value of the specified integer type.
"},{"location":"dialects/Core/Core/#parameters_3","title":"Parameters:","text":"Parameter C++ type Description type::mlir::Type
value ::llvm::APSInt
"},{"location":"dialects/Core/Core/#sourcelanguageattr","title":"SourceLanguageAttr","text":"Module source language
Syntax:
#core.lang<\n ::vast::core::SourceLanguage # value\n>\n
Represents the source language used to generate the module.
Example:
// Module compiled from C.\nmodule attributes {vast.core.lang = vast.core.lang<c>} {}\n// Module compiled from C++.\nmodule attributes {vast.core.lang = vast.core.lang<cxx>} {}\n
"},{"location":"dialects/Core/Core/#parameters_4","title":"Parameters:","text":"Parameter C++ type Description value ::vast::core::SourceLanguage
an enum of type SourceLanguage"},{"location":"dialects/Core/Core/#voidattr","title":"VoidAttr","text":"Attribute to represent void value.
Syntax:
#core.void<\n ::mlir::Type # type\n>\n
The VoidAttr is used to return void from statements uniformly.
"},{"location":"dialects/Core/Core/#parameters_5","title":"Parameters:","text":"Parameter C++ type Description type::mlir::Type
"},{"location":"dialects/Core/Core/#type-definition","title":"Type definition","text":""},{"location":"dialects/Core/Core/#functiontype","title":"FunctionType","text":"Vast function type
Syntax:
!core.fn<\n ::llvm::ArrayRef<Type>, # inputs\n ::llvm::ArrayRef<Type>, # results\n bool # varArg\n>\n
The !core.fn
is a function type. It consists of a variadic return type, and list of parameter types and can optionally be variadic.
Example:
!core.fn<!hl.bool ()>\n!core.fn<!hl.int (!hl.char, !hl.char)>\n!core.fn<!i32 (!i32, ...)>\n
"},{"location":"dialects/Core/Core/#parameters_6","title":"Parameters:","text":"Parameter C++ type Description inputs ::llvm::ArrayRef<Type>
results ::llvm::ArrayRef<Type>
varArg bool
"},{"location":"dialects/HighLevel/HighLevel/","title":"High Level","text":""},{"location":"dialects/HighLevel/HighLevel/#hl-dialect","title":"'hl' Dialect","text":"A high-level verbose program analysis MLIR dialect. This dialect intends capture highevel constructs of C/C++ for further program analysis.
hl.access
(::vast::hl::AccessSpecifierOp)","text":"VAST C++ access specifier declaration
Syntax:
operation ::= `hl.access` attr-dict $spec\n
VAST C++ access specifier declaration
"},{"location":"dialects/HighLevel/HighLevel/#attributes","title":"Attributes:","text":"Attribute MLIR Type Descriptionspec
::vast::hl::AccessSpecifierAttr Access specifier"},{"location":"dialects/HighLevel/HighLevel/#hladd-vasthladdiop","title":"hl.add
(::vast::hl::AddIOp)","text":"VAST arithmetic binary operation
Syntax:
operation ::= `hl.add` $lhs `,` $rhs attr-dict `:` functional-type(operands, results)\n
High-level arithmetic binary operation. This operation takes two operands and returns one result, each of these is required to be of the same type.
The custom assembly form of the operation is as follows:
%result = %lhs, %rhs : functional-type(operands, results)
Traits: Commutative
"},{"location":"dialects/HighLevel/HighLevel/#operands","title":"Operands:","text":"Operand Descriptionlhs
any type rhs
any type"},{"location":"dialects/HighLevel/HighLevel/#results","title":"Results:","text":"Result Description result
any type"},{"location":"dialects/HighLevel/HighLevel/#hladdressof-vasthladdressof","title":"hl.addressof
(::vast::hl::AddressOf)","text":"VAST addressof operation
Syntax:
operation ::= `hl.addressof` $value attr-dict `:` type($value) `->` type($result)\n
VAST addressof operation
"},{"location":"dialects/HighLevel/HighLevel/#operands_1","title":"Operands:","text":"Operand Descriptionvalue
lvalue to any type"},{"location":"dialects/HighLevel/HighLevel/#results_1","title":"Results:","text":"Result Description result
any type"},{"location":"dialects/HighLevel/HighLevel/#hlalignofexpr-vasthlalignofexprop","title":"hl.alignof.expr
(::vast::hl::AlignOfExprOp)","text":"VAST expr alignof operator
Syntax:
operation ::= `hl.alignof.expr` attr-dict `->` type($result) $expr\n
VAST expr alignof operator
"},{"location":"dialects/HighLevel/HighLevel/#results_2","title":"Results:","text":"Result Descriptionresult
integer like type"},{"location":"dialects/HighLevel/HighLevel/#hlalignoftype-vasthlalignoftypeop","title":"hl.alignof.type
(::vast::hl::AlignOfTypeOp)","text":"VAST type alignof operator
Syntax:
operation ::= `hl.alignof.type` $arg attr-dict `->` type($result)\n
VAST type alignof operator
"},{"location":"dialects/HighLevel/HighLevel/#attributes_1","title":"Attributes:","text":"Attribute MLIR Type Descriptionarg
::mlir::TypeAttr any type attribute"},{"location":"dialects/HighLevel/HighLevel/#results_3","title":"Results:","text":"Result Description result
integer like type"},{"location":"dialects/HighLevel/HighLevel/#hlasm-vasthlasmop","title":"hl.asm
(::vast::hl::AsmOp)","text":"VAST operation for inline assembly
Syntax:
operation ::= `hl.asm` attr-dict $asm_template `(`($output_names $asm_outputs^ `:` $output_constraints)? `)` `(` (`ins` `:`$input_names $asm_inputs^ `:` $input_constraints)? `)` `(`( $clobbers^)?`)` `(`( $labels^)?`)` `:` functional-type(operands, results)\n
VAST operation mirroring the GCCAsmStmt in clang AST. It prints a name for every operand (either its id or user-supplied string). Traits: AttrSizedOperandSegments
"},{"location":"dialects/HighLevel/HighLevel/#attributes_2","title":"Attributes:","text":"Attribute MLIR Type Descriptionasm_template
::mlir::StringAttr string attribute is_volatile
::mlir::UnitAttr unit attribute has_goto
::mlir::UnitAttr unit attribute output_names
::mlir::ArrayAttr array attribute input_names
::mlir::ArrayAttr array attribute output_constraints
::mlir::ArrayAttr array attribute input_constraints
::mlir::ArrayAttr array attribute clobbers
::mlir::ArrayAttr array attribute"},{"location":"dialects/HighLevel/HighLevel/#operands_2","title":"Operands:","text":"Operand Description asm_outputs
any type asm_inputs
any type labels
any type"},{"location":"dialects/HighLevel/HighLevel/#hlassign-vasthlassignop","title":"hl.assign
(::vast::hl::AssignOp)","text":"VAST compound assign operation
Syntax:
operation ::= `hl.assign` $src `to` $dst attr-dict `:` type(operands) `->` type(results)\n
A compound assign operation represents an assignment operation joined with an arithmetic operation. It requires the same types for both source and destination arguments.
The custom assembly form of the operation is as follows:
%result = src to dst : functional-type(operands, results)
It represents C compound assignment statement:
dst = src;
Interfaces: InferTypeOpInterface
"},{"location":"dialects/HighLevel/HighLevel/#operands_3","title":"Operands:","text":"Operand Descriptionsrc
lvalue to any type dst
any type"},{"location":"dialects/HighLevel/HighLevel/#results_4","title":"Results:","text":"Result Description result
any type"},{"location":"dialects/HighLevel/HighLevel/#hlassignadd-vasthladdiassignop","title":"hl.assign.add
(::vast::hl::AddIAssignOp)","text":"VAST compound assign operation
Syntax:
operation ::= `hl.assign.add` $src `to` $dst attr-dict `:` type(operands) `->` type(results)\n
A compound assign operation represents an assignment operation joined with an arithmetic operation. It requires the same types for both source and destination arguments.
The custom assembly form of the operation is as follows:
%result = src to dst : functional-type(operands, results)
It represents C compound assignment statement:
dst = src;
Interfaces: InferTypeOpInterface
"},{"location":"dialects/HighLevel/HighLevel/#operands_4","title":"Operands:","text":"Operand Descriptionsrc
lvalue to any type dst
any type"},{"location":"dialects/HighLevel/HighLevel/#results_5","title":"Results:","text":"Result Description result
any type"},{"location":"dialects/HighLevel/HighLevel/#hlassignbinand-vasthlbinandassignop","title":"hl.assign.bin.and
(::vast::hl::BinAndAssignOp)","text":"VAST compound assign operation
Syntax:
operation ::= `hl.assign.bin.and` $src `to` $dst attr-dict `:` type(operands) `->` type(results)\n
A compound assign operation represents an assignment operation joined with an arithmetic operation. It requires the same types for both source and destination arguments.
The custom assembly form of the operation is as follows:
%result = src to dst : functional-type(operands, results)
It represents C compound assignment statement:
dst = src;
Interfaces: InferTypeOpInterface
"},{"location":"dialects/HighLevel/HighLevel/#operands_5","title":"Operands:","text":"Operand Descriptionsrc
lvalue to any type dst
any type"},{"location":"dialects/HighLevel/HighLevel/#results_6","title":"Results:","text":"Result Description result
any type"},{"location":"dialects/HighLevel/HighLevel/#hlassignbinashr-vasthlbinashrassignop","title":"hl.assign.bin.ashr
(::vast::hl::BinAShrAssignOp)","text":"VAST compound assign operation
Syntax:
operation ::= `hl.assign.bin.ashr` $src `to` $dst attr-dict `:` type(operands) `->` type(results)\n
A compound assign operation represents an assignment operation joined with an arithmetic operation. It requires the same types for both source and destination arguments.
The custom assembly form of the operation is as follows:
%result = src to dst : functional-type(operands, results)
It represents C compound assignment statement:
dst = src;
Interfaces: InferTypeOpInterface
"},{"location":"dialects/HighLevel/HighLevel/#operands_6","title":"Operands:","text":"Operand Descriptionsrc
lvalue to integer like type dst
any type"},{"location":"dialects/HighLevel/HighLevel/#results_7","title":"Results:","text":"Result Description result
integer like type"},{"location":"dialects/HighLevel/HighLevel/#hlassignbinlshr-vasthlbinlshrassignop","title":"hl.assign.bin.lshr
(::vast::hl::BinLShrAssignOp)","text":"VAST compound assign operation
Syntax:
operation ::= `hl.assign.bin.lshr` $src `to` $dst attr-dict `:` type(operands) `->` type(results)\n
A compound assign operation represents an assignment operation joined with an arithmetic operation. It requires the same types for both source and destination arguments.
The custom assembly form of the operation is as follows:
%result = src to dst : functional-type(operands, results)
It represents C compound assignment statement:
dst = src;
Interfaces: InferTypeOpInterface
"},{"location":"dialects/HighLevel/HighLevel/#operands_7","title":"Operands:","text":"Operand Descriptionsrc
lvalue to integer like type dst
any type"},{"location":"dialects/HighLevel/HighLevel/#results_8","title":"Results:","text":"Result Description result
integer like type"},{"location":"dialects/HighLevel/HighLevel/#hlassignbinor-vasthlbinorassignop","title":"hl.assign.bin.or
(::vast::hl::BinOrAssignOp)","text":"VAST compound assign operation
Syntax:
operation ::= `hl.assign.bin.or` $src `to` $dst attr-dict `:` type(operands) `->` type(results)\n
A compound assign operation represents an assignment operation joined with an arithmetic operation. It requires the same types for both source and destination arguments.
The custom assembly form of the operation is as follows:
%result = src to dst : functional-type(operands, results)
It represents C compound assignment statement:
dst = src;
Interfaces: InferTypeOpInterface
"},{"location":"dialects/HighLevel/HighLevel/#operands_8","title":"Operands:","text":"Operand Descriptionsrc
lvalue to any type dst
any type"},{"location":"dialects/HighLevel/HighLevel/#results_9","title":"Results:","text":"Result Description result
any type"},{"location":"dialects/HighLevel/HighLevel/#hlassignbinshl-vasthlbinshlassignop","title":"hl.assign.bin.shl
(::vast::hl::BinShlAssignOp)","text":"VAST compound assign operation
Syntax:
operation ::= `hl.assign.bin.shl` $src `to` $dst attr-dict `:` type(operands) `->` type(results)\n
A compound assign operation represents an assignment operation joined with an arithmetic operation. It requires the same types for both source and destination arguments.
The custom assembly form of the operation is as follows:
%result = src to dst : functional-type(operands, results)
It represents C compound assignment statement:
dst = src;
Interfaces: InferTypeOpInterface
"},{"location":"dialects/HighLevel/HighLevel/#operands_9","title":"Operands:","text":"Operand Descriptionsrc
lvalue to integer like type dst
any type"},{"location":"dialects/HighLevel/HighLevel/#results_10","title":"Results:","text":"Result Description result
integer like type"},{"location":"dialects/HighLevel/HighLevel/#hlassignbinxor-vasthlbinxorassignop","title":"hl.assign.bin.xor
(::vast::hl::BinXorAssignOp)","text":"VAST compound assign operation
Syntax:
operation ::= `hl.assign.bin.xor` $src `to` $dst attr-dict `:` type(operands) `->` type(results)\n
A compound assign operation represents an assignment operation joined with an arithmetic operation. It requires the same types for both source and destination arguments.
The custom assembly form of the operation is as follows:
%result = src to dst : functional-type(operands, results)
It represents C compound assignment statement:
dst = src;
Interfaces: InferTypeOpInterface
"},{"location":"dialects/HighLevel/HighLevel/#operands_10","title":"Operands:","text":"Operand Descriptionsrc
lvalue to any type dst
any type"},{"location":"dialects/HighLevel/HighLevel/#results_11","title":"Results:","text":"Result Description result
any type"},{"location":"dialects/HighLevel/HighLevel/#hlassignfadd-vasthladdfassignop","title":"hl.assign.fadd
(::vast::hl::AddFAssignOp)","text":"VAST compound assign operation
Syntax:
operation ::= `hl.assign.fadd` $src `to` $dst attr-dict `:` type(operands) `->` type(results)\n
A compound assign operation represents an assignment operation joined with an arithmetic operation. It requires the same types for both source and destination arguments.
The custom assembly form of the operation is as follows:
%result = src to dst : functional-type(operands, results)
It represents C compound assignment statement:
dst = src;
Interfaces: InferTypeOpInterface
"},{"location":"dialects/HighLevel/HighLevel/#operands_11","title":"Operands:","text":"Operand Descriptionsrc
lvalue to any type dst
any type"},{"location":"dialects/HighLevel/HighLevel/#results_12","title":"Results:","text":"Result Description result
any type"},{"location":"dialects/HighLevel/HighLevel/#hlassignfdiv-vasthldivfassignop","title":"hl.assign.fdiv
(::vast::hl::DivFAssignOp)","text":"VAST compound assign operation
Syntax:
operation ::= `hl.assign.fdiv` $src `to` $dst attr-dict `:` type(operands) `->` type(results)\n
A compound assign operation represents an assignment operation joined with an arithmetic operation. It requires the same types for both source and destination arguments.
The custom assembly form of the operation is as follows:
%result = src to dst : functional-type(operands, results)
It represents C compound assignment statement:
dst = src;
Interfaces: InferTypeOpInterface
"},{"location":"dialects/HighLevel/HighLevel/#operands_12","title":"Operands:","text":"Operand Descriptionsrc
lvalue to any type dst
any type"},{"location":"dialects/HighLevel/HighLevel/#results_13","title":"Results:","text":"Result Description result
any type"},{"location":"dialects/HighLevel/HighLevel/#hlassignfmul-vasthlmulfassignop","title":"hl.assign.fmul
(::vast::hl::MulFAssignOp)","text":"VAST compound assign operation
Syntax:
operation ::= `hl.assign.fmul` $src `to` $dst attr-dict `:` type(operands) `->` type(results)\n
A compound assign operation represents an assignment operation joined with an arithmetic operation. It requires the same types for both source and destination arguments.
The custom assembly form of the operation is as follows:
%result = src to dst : functional-type(operands, results)
It represents C compound assignment statement:
dst = src;
Interfaces: InferTypeOpInterface
"},{"location":"dialects/HighLevel/HighLevel/#operands_13","title":"Operands:","text":"Operand Descriptionsrc
lvalue to any type dst
any type"},{"location":"dialects/HighLevel/HighLevel/#results_14","title":"Results:","text":"Result Description result
any type"},{"location":"dialects/HighLevel/HighLevel/#hlassignfrem-vasthlremfassignop","title":"hl.assign.frem
(::vast::hl::RemFAssignOp)","text":"VAST compound assign operation
Syntax:
operation ::= `hl.assign.frem` $src `to` $dst attr-dict `:` type(operands) `->` type(results)\n
A compound assign operation represents an assignment operation joined with an arithmetic operation. It requires the same types for both source and destination arguments.
The custom assembly form of the operation is as follows:
%result = src to dst : functional-type(operands, results)
It represents C compound assignment statement:
dst = src;
Interfaces: InferTypeOpInterface
"},{"location":"dialects/HighLevel/HighLevel/#operands_14","title":"Operands:","text":"Operand Descriptionsrc
lvalue to any type dst
any type"},{"location":"dialects/HighLevel/HighLevel/#results_15","title":"Results:","text":"Result Description result
any type"},{"location":"dialects/HighLevel/HighLevel/#hlassignfsub-vasthlsubfassignop","title":"hl.assign.fsub
(::vast::hl::SubFAssignOp)","text":"VAST compound assign operation
Syntax:
operation ::= `hl.assign.fsub` $src `to` $dst attr-dict `:` type(operands) `->` type(results)\n
A compound assign operation represents an assignment operation joined with an arithmetic operation. It requires the same types for both source and destination arguments.
The custom assembly form of the operation is as follows:
%result = src to dst : functional-type(operands, results)
It represents C compound assignment statement:
dst = src;
Interfaces: InferTypeOpInterface
"},{"location":"dialects/HighLevel/HighLevel/#operands_15","title":"Operands:","text":"Operand Descriptionsrc
lvalue to any type dst
any type"},{"location":"dialects/HighLevel/HighLevel/#results_16","title":"Results:","text":"Result Description result
any type"},{"location":"dialects/HighLevel/HighLevel/#hlassignmul-vasthlmuliassignop","title":"hl.assign.mul
(::vast::hl::MulIAssignOp)","text":"VAST compound assign operation
Syntax:
operation ::= `hl.assign.mul` $src `to` $dst attr-dict `:` type(operands) `->` type(results)\n
A compound assign operation represents an assignment operation joined with an arithmetic operation. It requires the same types for both source and destination arguments.
The custom assembly form of the operation is as follows:
%result = src to dst : functional-type(operands, results)
It represents C compound assignment statement:
dst = src;
Interfaces: InferTypeOpInterface
"},{"location":"dialects/HighLevel/HighLevel/#operands_16","title":"Operands:","text":"Operand Descriptionsrc
lvalue to any type dst
any type"},{"location":"dialects/HighLevel/HighLevel/#results_17","title":"Results:","text":"Result Description result
any type"},{"location":"dialects/HighLevel/HighLevel/#hlassignsdiv-vasthldivsassignop","title":"hl.assign.sdiv
(::vast::hl::DivSAssignOp)","text":"VAST compound assign operation
Syntax:
operation ::= `hl.assign.sdiv` $src `to` $dst attr-dict `:` type(operands) `->` type(results)\n
A compound assign operation represents an assignment operation joined with an arithmetic operation. It requires the same types for both source and destination arguments.
The custom assembly form of the operation is as follows:
%result = src to dst : functional-type(operands, results)
It represents C compound assignment statement:
dst = src;
Interfaces: InferTypeOpInterface
"},{"location":"dialects/HighLevel/HighLevel/#operands_17","title":"Operands:","text":"Operand Descriptionsrc
lvalue to any type dst
any type"},{"location":"dialects/HighLevel/HighLevel/#results_18","title":"Results:","text":"Result Description result
any type"},{"location":"dialects/HighLevel/HighLevel/#hlassignsrem-vasthlremsassignop","title":"hl.assign.srem
(::vast::hl::RemSAssignOp)","text":"VAST compound assign operation
Syntax:
operation ::= `hl.assign.srem` $src `to` $dst attr-dict `:` type(operands) `->` type(results)\n
A compound assign operation represents an assignment operation joined with an arithmetic operation. It requires the same types for both source and destination arguments.
The custom assembly form of the operation is as follows:
%result = src to dst : functional-type(operands, results)
It represents C compound assignment statement:
dst = src;
Interfaces: InferTypeOpInterface
"},{"location":"dialects/HighLevel/HighLevel/#operands_18","title":"Operands:","text":"Operand Descriptionsrc
lvalue to any type dst
any type"},{"location":"dialects/HighLevel/HighLevel/#results_19","title":"Results:","text":"Result Description result
any type"},{"location":"dialects/HighLevel/HighLevel/#hlassignsub-vasthlsubiassignop","title":"hl.assign.sub
(::vast::hl::SubIAssignOp)","text":"VAST compound assign operation
Syntax:
operation ::= `hl.assign.sub` $src `to` $dst attr-dict `:` type(operands) `->` type(results)\n
A compound assign operation represents an assignment operation joined with an arithmetic operation. It requires the same types for both source and destination arguments.
The custom assembly form of the operation is as follows:
%result = src to dst : functional-type(operands, results)
It represents C compound assignment statement:
dst = src;
Interfaces: InferTypeOpInterface
"},{"location":"dialects/HighLevel/HighLevel/#operands_19","title":"Operands:","text":"Operand Descriptionsrc
lvalue to any type dst
any type"},{"location":"dialects/HighLevel/HighLevel/#results_20","title":"Results:","text":"Result Description result
any type"},{"location":"dialects/HighLevel/HighLevel/#hlassignudiv-vasthldivuassignop","title":"hl.assign.udiv
(::vast::hl::DivUAssignOp)","text":"VAST compound assign operation
Syntax:
operation ::= `hl.assign.udiv` $src `to` $dst attr-dict `:` type(operands) `->` type(results)\n
A compound assign operation represents an assignment operation joined with an arithmetic operation. It requires the same types for both source and destination arguments.
The custom assembly form of the operation is as follows:
%result = src to dst : functional-type(operands, results)
It represents C compound assignment statement:
dst = src;
Interfaces: InferTypeOpInterface
"},{"location":"dialects/HighLevel/HighLevel/#operands_20","title":"Operands:","text":"Operand Descriptionsrc
lvalue to any type dst
any type"},{"location":"dialects/HighLevel/HighLevel/#results_21","title":"Results:","text":"Result Description result
any type"},{"location":"dialects/HighLevel/HighLevel/#hlassignurem-vasthlremuassignop","title":"hl.assign.urem
(::vast::hl::RemUAssignOp)","text":"VAST compound assign operation
Syntax:
operation ::= `hl.assign.urem` $src `to` $dst attr-dict `:` type(operands) `->` type(results)\n
A compound assign operation represents an assignment operation joined with an arithmetic operation. It requires the same types for both source and destination arguments.
The custom assembly form of the operation is as follows:
%result = src to dst : functional-type(operands, results)
It represents C compound assignment statement:
dst = src;
Interfaces: InferTypeOpInterface
"},{"location":"dialects/HighLevel/HighLevel/#operands_21","title":"Operands:","text":"Operand Descriptionsrc
lvalue to any type dst
any type"},{"location":"dialects/HighLevel/HighLevel/#results_22","title":"Results:","text":"Result Description result
any type"},{"location":"dialects/HighLevel/HighLevel/#hlbase-vasthlcxxbasespecifierop","title":"hl.base
(::vast::hl::CxxBaseSpecifierOp)","text":"VAST base class specifier
Syntax:
operation ::= `hl.base` $type attr-dict $access (`virtual` $is_virtual^)?\n
VAST base class specifier Interfaces: VastSymbol
"},{"location":"dialects/HighLevel/HighLevel/#attributes_3","title":"Attributes:","text":"Attribute MLIR Type Descriptiontype
::mlir::TypeAttr any type attribute access
::vast::hl::AccessSpecifierAttr Access specifier is_virtual
::mlir::UnitAttr unit attribute"},{"location":"dialects/HighLevel/HighLevel/#hlbinand-vasthlbinandop","title":"hl.bin.and
(::vast::hl::BinAndOp)","text":"VAST arithmetic binary operation
Syntax:
operation ::= `hl.bin.and` $lhs `,` $rhs attr-dict `:` functional-type(operands, results)\n
High-level arithmetic binary operation. This operation takes two operands and returns one result, each of these is required to be of the same type.
The custom assembly form of the operation is as follows:
%result = %lhs, %rhs : functional-type(operands, results)"},{"location":"dialects/HighLevel/HighLevel/#operands_22","title":"Operands:","text":"Operand Description lhs
any type rhs
any type"},{"location":"dialects/HighLevel/HighLevel/#results_23","title":"Results:","text":"Result Description result
any type"},{"location":"dialects/HighLevel/HighLevel/#hlbinashr-vasthlbinashrop","title":"hl.bin.ashr
(::vast::hl::BinAShrOp)","text":"
VAST binary shift operation
Syntax:
operation ::= `hl.bin.ashr` $lhs `,` $rhs attr-dict `:` functional-type(operands, results)\n
High-level binary shift operation. This operation takes two operands and returns one result.
The custom assembly form of the operation is as follows:
%result = %lhs, %rhs : functional-type(operands, results)"},{"location":"dialects/HighLevel/HighLevel/#operands_23","title":"Operands:","text":"Operand Description lhs
integer like type rhs
integer like type"},{"location":"dialects/HighLevel/HighLevel/#results_24","title":"Results:","text":"Result Description result
integer like type"},{"location":"dialects/HighLevel/HighLevel/#hlbincomma-vasthlbincomma","title":"hl.bin.comma
(::vast::hl::BinComma)","text":"
VAST binary operation
Syntax:
operation ::= `hl.bin.comma` $lhs `,` $rhs attr-dict `:` functional-type(operands, results)\n
"},{"location":"dialects/HighLevel/HighLevel/#operands_24","title":"Operands:","text":"Operand Description lhs
any type rhs
any type"},{"location":"dialects/HighLevel/HighLevel/#results_25","title":"Results:","text":"Result Description result
any type"},{"location":"dialects/HighLevel/HighLevel/#hlbinland-vasthlbinlandop","title":"hl.bin.land
(::vast::hl::BinLAndOp)","text":"VAST logical binary operation
Syntax:
operation ::= `hl.bin.land` $lhs`,` $rhs attr-dict `:` type(results)\n
High-level logical binary operation. This operation takes two operands and returns one result, each of these is required to be of the same type.
The custom assembly form of the operation is as follows:
%result = %lhs, %rhs : type"},{"location":"dialects/HighLevel/HighLevel/#results_26","title":"Results:","text":"Result Description result
any type"},{"location":"dialects/HighLevel/HighLevel/#hlbinlor-vasthlbinlorop","title":"hl.bin.lor
(::vast::hl::BinLOrOp)","text":"
VAST logical binary operation
Syntax:
operation ::= `hl.bin.lor` $lhs`,` $rhs attr-dict `:` type(results)\n
High-level logical binary operation. This operation takes two operands and returns one result, each of these is required to be of the same type.
The custom assembly form of the operation is as follows:
%result = %lhs, %rhs : type"},{"location":"dialects/HighLevel/HighLevel/#results_27","title":"Results:","text":"Result Description result
any type"},{"location":"dialects/HighLevel/HighLevel/#hlbinlshr-vasthlbinlshrop","title":"hl.bin.lshr
(::vast::hl::BinLShrOp)","text":"
VAST binary shift operation
Syntax:
operation ::= `hl.bin.lshr` $lhs `,` $rhs attr-dict `:` functional-type(operands, results)\n
High-level binary shift operation. This operation takes two operands and returns one result.
The custom assembly form of the operation is as follows:
%result = %lhs, %rhs : functional-type(operands, results)"},{"location":"dialects/HighLevel/HighLevel/#operands_25","title":"Operands:","text":"Operand Description lhs
integer like type rhs
integer like type"},{"location":"dialects/HighLevel/HighLevel/#results_28","title":"Results:","text":"Result Description result
integer like type"},{"location":"dialects/HighLevel/HighLevel/#hlbinor-vasthlbinorop","title":"hl.bin.or
(::vast::hl::BinOrOp)","text":"
VAST arithmetic binary operation
Syntax:
operation ::= `hl.bin.or` $lhs `,` $rhs attr-dict `:` functional-type(operands, results)\n
High-level arithmetic binary operation. This operation takes two operands and returns one result, each of these is required to be of the same type.
The custom assembly form of the operation is as follows:
%result = %lhs, %rhs : functional-type(operands, results)"},{"location":"dialects/HighLevel/HighLevel/#operands_26","title":"Operands:","text":"Operand Description lhs
any type rhs
any type"},{"location":"dialects/HighLevel/HighLevel/#results_29","title":"Results:","text":"Result Description result
any type"},{"location":"dialects/HighLevel/HighLevel/#hlbinshl-vasthlbinshlop","title":"hl.bin.shl
(::vast::hl::BinShlOp)","text":"
VAST binary shift operation
Syntax:
operation ::= `hl.bin.shl` $lhs `,` $rhs attr-dict `:` functional-type(operands, results)\n
High-level binary shift operation. This operation takes two operands and returns one result.
The custom assembly form of the operation is as follows:
%result = %lhs, %rhs : functional-type(operands, results)"},{"location":"dialects/HighLevel/HighLevel/#operands_27","title":"Operands:","text":"Operand Description lhs
integer like type rhs
integer like type"},{"location":"dialects/HighLevel/HighLevel/#results_30","title":"Results:","text":"Result Description result
integer like type"},{"location":"dialects/HighLevel/HighLevel/#hlbinxor-vasthlbinxorop","title":"hl.bin.xor
(::vast::hl::BinXorOp)","text":"
VAST arithmetic binary operation
Syntax:
operation ::= `hl.bin.xor` $lhs `,` $rhs attr-dict `:` functional-type(operands, results)\n
High-level arithmetic binary operation. This operation takes two operands and returns one result, each of these is required to be of the same type.
The custom assembly form of the operation is as follows:
%result = %lhs, %rhs : functional-type(operands, results)"},{"location":"dialects/HighLevel/HighLevel/#operands_28","title":"Operands:","text":"Operand Description lhs
any type rhs
any type"},{"location":"dialects/HighLevel/HighLevel/#results_31","title":"Results:","text":"Result Description result
any type"},{"location":"dialects/HighLevel/HighLevel/#hlbreak-vasthlbreakop","title":"hl.break
(::vast::hl::BreakOp)","text":"
VAST break statement
Syntax:
operation ::= `hl.break` attr-dict\n
VAST break statement Traits: NoRegionArguments, NoTerminator, soft_terminator
Interfaces: RegionKindInterface
"},{"location":"dialects/HighLevel/HighLevel/#hlbuiltin_bitcast-vasthlbuiltinbitcastop","title":"hl.builtin_bitcast
(::vast::hl::BuiltinBitCastOp)","text":"VAST cast operation
Syntax:
operation ::= `hl.builtin_bitcast` $value $kind attr-dict `:` type($value) `->` type($result)\n
VAST cast operation
"},{"location":"dialects/HighLevel/HighLevel/#attributes_4","title":"Attributes:","text":"Attribute MLIR Type Descriptionkind
::vast::hl::CastKindAttr cast kind"},{"location":"dialects/HighLevel/HighLevel/#operands_29","title":"Operands:","text":"Operand Description value
any type"},{"location":"dialects/HighLevel/HighLevel/#results_32","title":"Results:","text":"Result Description result
any type"},{"location":"dialects/HighLevel/HighLevel/#hlcall-vasthlcallop","title":"hl.call
(::vast::hl::CallOp)","text":"VAST call operation
Syntax:
operation ::= `hl.call` $callee `(` $argOperands `)` attr-dict `:` functional-type( $argOperands, $results )\n
VAST call operation Interfaces: CallOpInterface
"},{"location":"dialects/HighLevel/HighLevel/#attributes_5","title":"Attributes:","text":"Attribute MLIR Type Descriptioncallee
::mlir::FlatSymbolRefAttr flat symbol reference attribute"},{"location":"dialects/HighLevel/HighLevel/#operands_30","title":"Operands:","text":"Operand Description argOperands
any type"},{"location":"dialects/HighLevel/HighLevel/#results_33","title":"Results:","text":"Result Description results
any type"},{"location":"dialects/HighLevel/HighLevel/#hlcase-vasthlcaseop","title":"hl.case
(::vast::hl::CaseOp)","text":"VAST case statement
Syntax:
operation ::= `hl.case` $lhs $body attr-dict\n
The operation represents a single case of a switch statement.
The generic form of the operation is as follows:
hl.case { ... / lhs/check region / hl.value.yield %val : !hl.type } { ... / body region / }
It represents a C statement of form case lhs: body;
.
Traits: NoRegionArguments, NoTerminator
Interfaces: RegionKindInterface
"},{"location":"dialects/HighLevel/HighLevel/#hlclass-vasthlclassdeclop","title":"hl.class
(::vast::hl::ClassDeclOp)","text":"VAST C++ class declaration
Syntax:
operation ::= `hl.class` $name attr-dict `:` `bases` $bases $fields\n
VAST C++ class declaration Traits: NoTerminator
Interfaces: VastSymbol
"},{"location":"dialects/HighLevel/HighLevel/#attributes_6","title":"Attributes:","text":"Attribute MLIR Type Descriptionname
::mlir::StringAttr string attribute"},{"location":"dialects/HighLevel/HighLevel/#hlcmp-vasthlcmpop","title":"hl.cmp
(::vast::hl::CmpOp)","text":"VAST comparison operation
Syntax:
operation ::= `hl.cmp` $predicate $lhs `,` $rhs attr-dict `:` type(operands) `->` type($result)\n
VAST comparison operation
"},{"location":"dialects/HighLevel/HighLevel/#attributes_7","title":"Attributes:","text":"Attribute MLIR Type Descriptionpredicate
::vast::hl::PredicateAttr comparison predicate"},{"location":"dialects/HighLevel/HighLevel/#operands_31","title":"Operands:","text":"Operand Description lhs
any type rhs
any type"},{"location":"dialects/HighLevel/HighLevel/#results_34","title":"Results:","text":"Result Description result
bool or integer like type"},{"location":"dialects/HighLevel/HighLevel/#hlcond-vasthlcondop","title":"hl.cond
(::vast::hl::CondOp)","text":"VAST conditional statement
Syntax:
operation ::= `hl.cond` $condRegion `?` $thenRegion `:` $elseRegion attr-dict `:` type(results)\n
The operation takes builders of three regions -- condition, true branch and false branch. Builders, given the location, build a particular region.
The generic form of the operation is as follows:
hl.cond { ... / condition region / hl.cond.yield %cond : !hl.bool } ? { ... / true region / } : { ... / false region / }
Traits: NoRegionArguments, NoTerminator
Interfaces: RegionKindInterface
"},{"location":"dialects/HighLevel/HighLevel/#results_35","title":"Results:","text":"Result Descriptionresult
any type"},{"location":"dialects/HighLevel/HighLevel/#hlcondyield-vasthlcondyieldop","title":"hl.cond.yield
(::vast::hl::CondYieldOp)","text":"Condition yield operation
Syntax:
operation ::= `hl.cond.yield` attr-dict $result `:` type($result)\n
A condition yield operation is used to terminate the region representing condition expression of control flow operations IfOp
, WhileOp
, ForOp
and DoOp
. It yields a boolean value for the conditional branch.
The custom assembly form of the operation is as follows:
hl.cond.yield result : BoolType
Traits: HasParent, Terminator"},{"location":"dialects/HighLevel/HighLevel/#operands_32","title":"Operands:","text":"Operand Description result
any type"},{"location":"dialects/HighLevel/HighLevel/#hlconst-vasthlconstantop","title":"hl.const
(::vast::hl::ConstantOp)","text":"
VAST value constant
Syntax:
operation ::= `hl.const` $value attr-dict\n
VAST value constant Traits: ConstantLike
Interfaces: InferTypeOpInterface
"},{"location":"dialects/HighLevel/HighLevel/#attributes_8","title":"Attributes:","text":"Attribute MLIR Type Descriptionvalue
::mlir::TypedAttr TypedAttr instance"},{"location":"dialects/HighLevel/HighLevel/#results_36","title":"Results:","text":"Result Description result
any type"},{"location":"dialects/HighLevel/HighLevel/#hlcontinue-vasthlcontinueop","title":"hl.continue
(::vast::hl::ContinueOp)","text":"VAST continue statement
Syntax:
operation ::= `hl.continue` attr-dict\n
VAST continue statement Traits: NoRegionArguments, NoTerminator, soft_terminator
Interfaces: RegionKindInterface
"},{"location":"dialects/HighLevel/HighLevel/#hlcstyle_cast-vasthlcstylecastop","title":"hl.cstyle_cast
(::vast::hl::CStyleCastOp)","text":"VAST cast operation
Syntax:
operation ::= `hl.cstyle_cast` $value $kind attr-dict `:` type($value) `->` type($result)\n
VAST cast operation
"},{"location":"dialects/HighLevel/HighLevel/#attributes_9","title":"Attributes:","text":"Attribute MLIR Type Descriptionkind
::vast::hl::CastKindAttr cast kind"},{"location":"dialects/HighLevel/HighLevel/#operands_33","title":"Operands:","text":"Operand Description value
any type"},{"location":"dialects/HighLevel/HighLevel/#results_37","title":"Results:","text":"Result Description result
any type"},{"location":"dialects/HighLevel/HighLevel/#hlcxxstruct-vasthlcxxstructdeclop","title":"hl.cxxstruct
(::vast::hl::CxxStructDeclOp)","text":"VAST C++ struct declaration
Syntax:
operation ::= `hl.cxxstruct` $name attr-dict `:` `bases` $bases $fields\n
VAST C++ struct declaration Traits: NoTerminator
Interfaces: VastSymbol
"},{"location":"dialects/HighLevel/HighLevel/#attributes_10","title":"Attributes:","text":"Attribute MLIR Type Descriptionname
::mlir::StringAttr string attribute"},{"location":"dialects/HighLevel/HighLevel/#hldefault-vasthldefaultop","title":"hl.default
(::vast::hl::DefaultOp)","text":"VAST default statement
Syntax:
operation ::= `hl.default` $body attr-dict\n
VAST default statement Traits: NoRegionArguments, NoTerminator
Interfaces: RegionKindInterface
"},{"location":"dialects/HighLevel/HighLevel/#hlderef-vasthlderef","title":"hl.deref
(::vast::hl::Deref)","text":"VAST deref operation
Syntax:
operation ::= `hl.deref` $addr attr-dict `:` type($addr) `->` type($result)\n
VAST deref operation
"},{"location":"dialects/HighLevel/HighLevel/#operands_34","title":"Operands:","text":"Operand Descriptionaddr
any type"},{"location":"dialects/HighLevel/HighLevel/#results_38","title":"Results:","text":"Result Description result
lvalue to any type"},{"location":"dialects/HighLevel/HighLevel/#hldo-vasthldoop","title":"hl.do
(::vast::hl::DoOp)","text":"VAST do-while statement
Syntax:
operation ::= `hl.do` $bodyRegion `while` $condRegion attr-dict\n
The operation represents a do-while statement.
The generic form of the operation is as follows:
hl.do { ... / body region / } cond { ... / cond region / hl.cond.yield %cond : !hl.bool }
Traits: NoRegionArguments, NoTerminator
Interfaces: RegionKindInterface
"},{"location":"dialects/HighLevel/HighLevel/#hlemptydecl-vasthlemptydeclop","title":"hl.empty.decl
(::vast::hl::EmptyDeclOp)","text":"Syntax:
operation ::= `hl.empty.decl` attr-dict\n
"},{"location":"dialects/HighLevel/HighLevel/#hlenum-vasthlenumdeclop","title":"hl.enum
(::vast::hl::EnumDeclOp)","text":"VAST enum declaration
Syntax:
operation ::= `hl.enum` $name attr-dict `:` ($type^ $constants)?\n
Enum declaration serves to declare region for enum constant declarations. It also defines an underlying type.
Traits: NoTerminator
Interfaces: VastSymbol
"},{"location":"dialects/HighLevel/HighLevel/#attributes_11","title":"Attributes:","text":"Attribute MLIR Type Descriptionname
::mlir::StringAttr string attribute type
::mlir::TypeAttr any type attribute"},{"location":"dialects/HighLevel/HighLevel/#hlenumconst-vasthlenumconstantop","title":"hl.enum.const
(::vast::hl::EnumConstantOp)","text":"VAST enum constant declaration
Syntax:
operation ::= `hl.enum.const` $name `=` $value attr-dict (`init` $init^)?\n
Enumeration constant servers to link name to an enum value. It is required to be scoped in Enum operation. For example:
hl.enum.const \"F\" = 2 : !hl.int\n
A constant can have a constant expression initializer:
hl.enum.const \"G\" = #core.integer<12> : !hl.int init {\n %0 = hl.enumref \"F\" : !hl.int\n %1 = hl.enumref \"C\" : !hl.int\n %2 = hl.add %0, %1 : !hl.int\n hl.value.yield %2 : !hl.int\n}\n
"},{"location":"dialects/HighLevel/HighLevel/#attributes_12","title":"Attributes:","text":"Attribute MLIR Type Description name
::mlir::StringAttr string attribute value
::mlir::TypedAttr TypedAttr instance"},{"location":"dialects/HighLevel/HighLevel/#hlenumref-vasthlenumrefop","title":"hl.enumref
(::vast::hl::EnumRefOp)","text":"VAST variable reference declaration
Syntax:
operation ::= `hl.enumref` $value attr-dict `:` type($result)\n
VAST variable reference declaration
"},{"location":"dialects/HighLevel/HighLevel/#attributes_13","title":"Attributes:","text":"Attribute MLIR Type Descriptionvalue
::mlir::StringAttr string attribute"},{"location":"dialects/HighLevel/HighLevel/#results_39","title":"Results:","text":"Result Description result
any type"},{"location":"dialects/HighLevel/HighLevel/#hlexpr-vasthlexprop","title":"hl.expr
(::vast::hl::ExprOp)","text":"VAST expression
Syntax:
operation ::= `hl.expr` attr-dict `:` type($result) $subexpr\n
VAST expression Traits: SingleBlock
"},{"location":"dialects/HighLevel/HighLevel/#results_40","title":"Results:","text":"Result Descriptionresult
any type"},{"location":"dialects/HighLevel/HighLevel/#hlfadd-vasthladdfop","title":"hl.fadd
(::vast::hl::AddFOp)","text":"VAST arithmetic binary operation
Syntax:
operation ::= `hl.fadd` $lhs `,` $rhs attr-dict `:` functional-type(operands, results)\n
High-level arithmetic binary operation. This operation takes two operands and returns one result, each of these is required to be of the same type.
The custom assembly form of the operation is as follows:
%result = %lhs, %rhs : functional-type(operands, results)"},{"location":"dialects/HighLevel/HighLevel/#operands_35","title":"Operands:","text":"Operand Description lhs
any type rhs
any type"},{"location":"dialects/HighLevel/HighLevel/#results_41","title":"Results:","text":"Result Description result
any type"},{"location":"dialects/HighLevel/HighLevel/#hlfcmp-vasthlfcmpop","title":"hl.fcmp
(::vast::hl::FCmpOp)","text":"
VAST flaoting point comparison operation
Syntax:
operation ::= `hl.fcmp` $predicate $lhs `,` $rhs attr-dict `:` type(operands) `->` type($result)\n
VAST floating point comparison operation
"},{"location":"dialects/HighLevel/HighLevel/#attributes_14","title":"Attributes:","text":"Attribute MLIR Type Descriptionpredicate
::vast::hl::FPredicateAttr floating point comparison predicate"},{"location":"dialects/HighLevel/HighLevel/#operands_36","title":"Operands:","text":"Operand Description lhs
float like type rhs
float like type"},{"location":"dialects/HighLevel/HighLevel/#results_42","title":"Results:","text":"Result Description result
bool or integer like type"},{"location":"dialects/HighLevel/HighLevel/#hlfdiv-vasthldivfop","title":"hl.fdiv
(::vast::hl::DivFOp)","text":"VAST arithmetic binary operation
Syntax:
operation ::= `hl.fdiv` $lhs `,` $rhs attr-dict `:` functional-type(operands, results)\n
High-level arithmetic binary operation. This operation takes two operands and returns one result, each of these is required to be of the same type.
The custom assembly form of the operation is as follows:
%result = %lhs, %rhs : functional-type(operands, results)"},{"location":"dialects/HighLevel/HighLevel/#operands_37","title":"Operands:","text":"Operand Description lhs
any type rhs
any type"},{"location":"dialects/HighLevel/HighLevel/#results_43","title":"Results:","text":"Result Description result
any type"},{"location":"dialects/HighLevel/HighLevel/#hlfield-vasthlfielddeclop","title":"hl.field
(::vast::hl::FieldDeclOp)","text":"
VAST record field declaration
Syntax:
operation ::= `hl.field` $name attr-dict (`bw` $bits^)? `:` $type\n
VAST record field declaration Interfaces: VastSymbol
"},{"location":"dialects/HighLevel/HighLevel/#attributes_15","title":"Attributes:","text":"Attribute MLIR Type Descriptionname
::mlir::StringAttr string attribute type
::mlir::TypeAttr any type attribute bits
::mlir::IntegerAttr 32-bit signless integer attribute"},{"location":"dialects/HighLevel/HighLevel/#hlfmul-vasthlmulfop","title":"hl.fmul
(::vast::hl::MulFOp)","text":"VAST arithmetic binary operation
Syntax:
operation ::= `hl.fmul` $lhs `,` $rhs attr-dict `:` functional-type(operands, results)\n
High-level arithmetic binary operation. This operation takes two operands and returns one result, each of these is required to be of the same type.
The custom assembly form of the operation is as follows:
%result = %lhs, %rhs : functional-type(operands, results)"},{"location":"dialects/HighLevel/HighLevel/#operands_38","title":"Operands:","text":"Operand Description lhs
any type rhs
any type"},{"location":"dialects/HighLevel/HighLevel/#results_44","title":"Results:","text":"Result Description result
any type"},{"location":"dialects/HighLevel/HighLevel/#hlfor-vasthlforop","title":"hl.for
(::vast::hl::ForOp)","text":"
VAST for statement
Syntax:
operation ::= `hl.for` $condRegion `incr` $incrRegion attr-dict `do` $bodyRegion\n
Operation represents a for-loop statement.
The generic form of the operation is as follows:
hl.for { ... / cond region / hl.cond.yield %cond : !hl.bool } incr { ... / increment/update region / } do { ... / body region / }
Traits: NoRegionArguments, NoTerminator
Interfaces: RegionKindInterface
"},{"location":"dialects/HighLevel/HighLevel/#hlfrem-vasthlremfop","title":"hl.frem
(::vast::hl::RemFOp)","text":"VAST arithmetic binary operation
Syntax:
operation ::= `hl.frem` $lhs `,` $rhs attr-dict `:` functional-type(operands, results)\n
High-level arithmetic binary operation. This operation takes two operands and returns one result, each of these is required to be of the same type.
The custom assembly form of the operation is as follows:
%result = %lhs, %rhs : functional-type(operands, results)"},{"location":"dialects/HighLevel/HighLevel/#operands_39","title":"Operands:","text":"Operand Description lhs
any type rhs
any type"},{"location":"dialects/HighLevel/HighLevel/#results_45","title":"Results:","text":"Result Description result
any type"},{"location":"dialects/HighLevel/HighLevel/#hlfsub-vasthlsubfop","title":"hl.fsub
(::vast::hl::SubFOp)","text":"
VAST arithmetic binary operation
Syntax:
operation ::= `hl.fsub` $lhs `,` $rhs attr-dict `:` functional-type(operands, results)\n
High-level arithmetic binary operation. This operation takes two operands and returns one result, each of these is required to be of the same type.
The custom assembly form of the operation is as follows:
%result = %lhs, %rhs : functional-type(operands, results)"},{"location":"dialects/HighLevel/HighLevel/#operands_40","title":"Operands:","text":"Operand Description lhs
any type rhs
any type"},{"location":"dialects/HighLevel/HighLevel/#results_46","title":"Results:","text":"Result Description result
any type"},{"location":"dialects/HighLevel/HighLevel/#hlfunc-vasthlfuncop","title":"hl.func
(::vast::hl::FuncOp)","text":"
VAST function template
Syntax:
operation ::= `hl.func` $sym_name custom< FunctionSignatureAndBody >($function_type, attr-dict, $body)\n
Inspired by cir::FuncOp
and mlir::func::FuncOp
:
Operations within the function cannot implicitly capture values defined outside of the function, i.e. Functions are IsolatedFromAbove
. All external references must use function arguments or attributes that establish a symbolic connection (e.g. symbols referenced by name via a string attribute like SymbolRefAttr). An external function declaration (used when referring to a function declared in some other module) has no body.
The function linkage information is specified by linkage
, as defined by GlobalLinkageKind
attribute.
Traits: AutomaticAllocationScope, IsolatedFromAbove, NoTerminator
Interfaces: CallableOpInterface, FunctionOpInterface, RegionKindInterface, Symbol
"},{"location":"dialects/HighLevel/HighLevel/#attributes_16","title":"Attributes:","text":"Attribute MLIR Type Descriptionsym_name
::mlir::StringAttr string attribute function_type
::mlir::TypeAttr type attribute of function type linkage
::vast::core::GlobalLinkageKindAttr global linkage kind sym_visibility
::mlir::StringAttr string attribute arg_attrs
::mlir::ArrayAttr Array of dictionary attributes res_attrs
::mlir::ArrayAttr Array of dictionary attributes"},{"location":"dialects/HighLevel/HighLevel/#hlfuncref-vasthlfuncrefop","title":"hl.funcref
(::vast::hl::FuncRefOp)","text":"VAST function reference declaration
Syntax:
operation ::= `hl.funcref` $function attr-dict `:` type($result)\n
VAST function reference declaration
"},{"location":"dialects/HighLevel/HighLevel/#attributes_17","title":"Attributes:","text":"Attribute MLIR Type Descriptionfunction
::mlir::FlatSymbolRefAttr flat symbol reference attribute"},{"location":"dialects/HighLevel/HighLevel/#results_47","title":"Results:","text":"Result Description result
any type"},{"location":"dialects/HighLevel/HighLevel/#hlglobref-vasthlglobalrefop","title":"hl.globref
(::vast::hl::GlobalRefOp)","text":"VAST global variable reference declaration
Syntax:
operation ::= `hl.globref` $global attr-dict `:` type($result)\n
VAST global variable reference declaration
"},{"location":"dialects/HighLevel/HighLevel/#attributes_18","title":"Attributes:","text":"Attribute MLIR Type Descriptionglobal
::mlir::StringAttr string attribute"},{"location":"dialects/HighLevel/HighLevel/#results_48","title":"Results:","text":"Result Description result
any type"},{"location":"dialects/HighLevel/HighLevel/#hlgnuextension-vasthlextensionop","title":"hl.gnu.extension
(::vast::hl::ExtensionOp)","text":"VAST extension (__extension__) keyword
Syntax:
operation ::= `hl.gnu.extension` $value attr-dict `:` type($value) `->` type($result)\n
VAST op corresponding to GNU extension keyword.
"},{"location":"dialects/HighLevel/HighLevel/#operands_41","title":"Operands:","text":"Operand Descriptionvalue
any type"},{"location":"dialects/HighLevel/HighLevel/#results_49","title":"Results:","text":"Result Description result
any type"},{"location":"dialects/HighLevel/HighLevel/#hlgoto-vasthlgotostmt","title":"hl.goto
(::vast::hl::GotoStmt)","text":"Syntax:
operation ::= `hl.goto` $label attr-dict\n
"},{"location":"dialects/HighLevel/HighLevel/#operands_42","title":"Operands:","text":"Operand Description label
"},{"location":"dialects/HighLevel/HighLevel/#hlif-vasthlifop","title":"hl.if
(::vast::hl::IfOp)","text":"VAST if statement
The operation takes builders of two mandatory regions -- condition and then region -- and one builder optional region representing else block of C if statement. Builders, given the location, build a particular region.
The generic form of the operation is as follows:
hl.if { ... / condition region / hl.cond.yield %cond : !hl.bool } then { ... / then region / } else { ... / else region / }
Traits: NoRegionArguments, NoTerminator
Interfaces: RegionKindInterface
"},{"location":"dialects/HighLevel/HighLevel/#hlimplicit_cast-vasthlimplicitcastop","title":"hl.implicit_cast
(::vast::hl::ImplicitCastOp)","text":"VAST cast operation
Syntax:
operation ::= `hl.implicit_cast` $value $kind attr-dict `:` type($value) `->` type($result)\n
VAST cast operation
"},{"location":"dialects/HighLevel/HighLevel/#attributes_19","title":"Attributes:","text":"Attribute MLIR Type Descriptionkind
::vast::hl::CastKindAttr cast kind"},{"location":"dialects/HighLevel/HighLevel/#operands_43","title":"Operands:","text":"Operand Description value
any type"},{"location":"dialects/HighLevel/HighLevel/#results_50","title":"Results:","text":"Result Description result
any type"},{"location":"dialects/HighLevel/HighLevel/#hlindirect_call-vasthlindirectcallop","title":"hl.indirect_call
(::vast::hl::IndirectCallOp)","text":"VAST call operation
Syntax:
operation ::= `hl.indirect_call` $callee `:` type($callee) `(` $argOperands `)` attr-dict `:` functional-type( $argOperands, $results )\n
VAST call operation Interfaces: CallOpInterface
"},{"location":"dialects/HighLevel/HighLevel/#operands_44","title":"Operands:","text":"Operand Descriptioncallee
any type argOperands
any type"},{"location":"dialects/HighLevel/HighLevel/#results_51","title":"Results:","text":"Result Description results
any type"},{"location":"dialects/HighLevel/HighLevel/#hlinitlist-vasthlinitlistexpr","title":"hl.initlist
(::vast::hl::InitListExpr)","text":"VAST initializer list expression
Syntax:
operation ::= `hl.initlist` $elements attr-dict `:` functional-type($elements, results)\n
VAST initializer list expression
"},{"location":"dialects/HighLevel/HighLevel/#operands_45","title":"Operands:","text":"Operand Descriptionelements
any type"},{"location":"dialects/HighLevel/HighLevel/#results_52","title":"Results:","text":"Result Description \u00abunnamed\u00bb any type"},{"location":"dialects/HighLevel/HighLevel/#hllabel-vasthllabelstmt","title":"hl.label
(::vast::hl::LabelStmt)","text":"VAST control flow operation
Syntax:
operation ::= `hl.label` $label $body attr-dict\n
VAST control flow operation Traits: NoRegionArguments, NoTerminator
Interfaces: RegionKindInterface
"},{"location":"dialects/HighLevel/HighLevel/#operands_46","title":"Operands:","text":"Operand Descriptionlabel
"},{"location":"dialects/HighLevel/HighLevel/#hllabeldecl-vasthllabeldeclop","title":"hl.label.decl
(::vast::hl::LabelDeclOp)","text":"Syntax:
operation ::= `hl.label.decl` $name attr-dict `:` type($result)\n
Interfaces: InferTypeOpInterface
"},{"location":"dialects/HighLevel/HighLevel/#attributes_20","title":"Attributes:","text":"Attribute MLIR Type Descriptionname
::mlir::StringAttr string attribute"},{"location":"dialects/HighLevel/HighLevel/#results_53","title":"Results:","text":"Result Description result
"},{"location":"dialects/HighLevel/HighLevel/#hllabeladdr-vasthladdrlabelexpr","title":"hl.labeladdr
(::vast::hl::AddrLabelExpr)","text":"VAST address of label extension
Syntax:
operation ::= `hl.labeladdr` $label attr-dict `:` type($result)\n
VAST address of label extension
"},{"location":"dialects/HighLevel/HighLevel/#operands_47","title":"Operands:","text":"Operand Descriptionlabel
"},{"location":"dialects/HighLevel/HighLevel/#results_54","title":"Results:","text":"Result Description result
lvalue to pointer like type"},{"location":"dialects/HighLevel/HighLevel/#hllnot-vasthllnotop","title":"hl.lnot
(::vast::hl::LNotOp)","text":"VAST unary logical operation
Syntax:
operation ::= `hl.lnot` $arg attr-dict `:` type($arg) `->` type($res)\n
High-level unary logical operation assures that result has the right type.
The custom assembly form of the operation is as follows:
%result = %arg : type -> ret_type"},{"location":"dialects/HighLevel/HighLevel/#operands_48","title":"Operands:","text":"Operand Description arg
any type"},{"location":"dialects/HighLevel/HighLevel/#results_55","title":"Results:","text":"Result Description res
bool or integer like type"},{"location":"dialects/HighLevel/HighLevel/#hlmember-vasthlrecordmemberop","title":"hl.member
(::vast::hl::RecordMemberOp)","text":"
VAST record element access operation
Syntax:
operation ::= `hl.member` $record `at` $name attr-dict `:` type($record) `->` type($element)\n
VAST record element access operation
"},{"location":"dialects/HighLevel/HighLevel/#attributes_21","title":"Attributes:","text":"Attribute MLIR Type Descriptionname
::mlir::StringAttr string attribute"},{"location":"dialects/HighLevel/HighLevel/#operands_49","title":"Operands:","text":"Operand Description record
any type"},{"location":"dialects/HighLevel/HighLevel/#results_56","title":"Results:","text":"Result Description element
lvalue to any type"},{"location":"dialects/HighLevel/HighLevel/#hlminus-vasthlminusop","title":"hl.minus
(::vast::hl::MinusOp)","text":"VAST unary type preserving operation
Syntax:
operation ::= `hl.minus` $arg attr-dict `:` type($result)\n
Type preserving high-level unary operation assures that argument and result has the same type.
The custom assembly form of the operation is as follows:
%result = %arg : type
Traits: SameOperandsAndResultType
Interfaces: InferTypeOpInterface
"},{"location":"dialects/HighLevel/HighLevel/#operands_50","title":"Operands:","text":"Operand Descriptionarg
any type"},{"location":"dialects/HighLevel/HighLevel/#results_57","title":"Results:","text":"Result Description result
any type"},{"location":"dialects/HighLevel/HighLevel/#hlmul-vasthlmuliop","title":"hl.mul
(::vast::hl::MulIOp)","text":"VAST arithmetic binary operation
Syntax:
operation ::= `hl.mul` $lhs `,` $rhs attr-dict `:` functional-type(operands, results)\n
High-level arithmetic binary operation. This operation takes two operands and returns one result, each of these is required to be of the same type.
The custom assembly form of the operation is as follows:
%result = %lhs, %rhs : functional-type(operands, results)
Traits: Commutative
"},{"location":"dialects/HighLevel/HighLevel/#operands_51","title":"Operands:","text":"Operand Descriptionlhs
any type rhs
any type"},{"location":"dialects/HighLevel/HighLevel/#results_58","title":"Results:","text":"Result Description result
any type"},{"location":"dialects/HighLevel/HighLevel/#hlnot-vasthlnotop","title":"hl.not
(::vast::hl::NotOp)","text":"VAST unary type preserving operation
Syntax:
operation ::= `hl.not` $arg attr-dict `:` type($result)\n
Type preserving high-level unary operation assures that argument and result has the same type.
The custom assembly form of the operation is as follows:
%result = %arg : type
Traits: SameOperandsAndResultType
Interfaces: InferTypeOpInterface
"},{"location":"dialects/HighLevel/HighLevel/#operands_52","title":"Operands:","text":"Operand Descriptionarg
any type"},{"location":"dialects/HighLevel/HighLevel/#results_59","title":"Results:","text":"Result Description result
any type"},{"location":"dialects/HighLevel/HighLevel/#hlplus-vasthlplusop","title":"hl.plus
(::vast::hl::PlusOp)","text":"VAST unary type preserving operation
Syntax:
operation ::= `hl.plus` $arg attr-dict `:` type($result)\n
Type preserving high-level unary operation assures that argument and result has the same type.
The custom assembly form of the operation is as follows:
%result = %arg : type
Traits: SameOperandsAndResultType
Interfaces: InferTypeOpInterface
"},{"location":"dialects/HighLevel/HighLevel/#operands_53","title":"Operands:","text":"Operand Descriptionarg
any type"},{"location":"dialects/HighLevel/HighLevel/#results_60","title":"Results:","text":"Result Description result
any type"},{"location":"dialects/HighLevel/HighLevel/#hlpostdec-vasthlpostdecop","title":"hl.post.dec
(::vast::hl::PostDecOp)","text":"VAST unary inplace operation
Syntax:
operation ::= `hl.post.dec` $arg attr-dict `:` type($arg) `->` type($result)\n
Inplace high-level unary operation changes its single argument in place. It does not produce a new value.
The custom assembly form of the operation is as follows:
%result = %arg : type
Interfaces: InferTypeOpInterface
"},{"location":"dialects/HighLevel/HighLevel/#operands_54","title":"Operands:","text":"Operand Descriptionarg
lvalue to any type"},{"location":"dialects/HighLevel/HighLevel/#results_61","title":"Results:","text":"Result Description result
any type"},{"location":"dialects/HighLevel/HighLevel/#hlpostinc-vasthlpostincop","title":"hl.post.inc
(::vast::hl::PostIncOp)","text":"VAST unary inplace operation
Syntax:
operation ::= `hl.post.inc` $arg attr-dict `:` type($arg) `->` type($result)\n
Inplace high-level unary operation changes its single argument in place. It does not produce a new value.
The custom assembly form of the operation is as follows:
%result = %arg : type
Interfaces: InferTypeOpInterface
"},{"location":"dialects/HighLevel/HighLevel/#operands_55","title":"Operands:","text":"Operand Descriptionarg
lvalue to any type"},{"location":"dialects/HighLevel/HighLevel/#results_62","title":"Results:","text":"Result Description result
any type"},{"location":"dialects/HighLevel/HighLevel/#hlpredec-vasthlpredecop","title":"hl.pre.dec
(::vast::hl::PreDecOp)","text":"VAST unary inplace operation
Syntax:
operation ::= `hl.pre.dec` $arg attr-dict `:` type($arg) `->` type($result)\n
Inplace high-level unary operation changes its single argument in place. It does not produce a new value.
The custom assembly form of the operation is as follows:
%result = %arg : type
Interfaces: InferTypeOpInterface
"},{"location":"dialects/HighLevel/HighLevel/#operands_56","title":"Operands:","text":"Operand Descriptionarg
lvalue to any type"},{"location":"dialects/HighLevel/HighLevel/#results_63","title":"Results:","text":"Result Description result
any type"},{"location":"dialects/HighLevel/HighLevel/#hlpreinc-vasthlpreincop","title":"hl.pre.inc
(::vast::hl::PreIncOp)","text":"VAST unary inplace operation
Syntax:
operation ::= `hl.pre.inc` $arg attr-dict `:` type($arg) `->` type($result)\n
Inplace high-level unary operation changes its single argument in place. It does not produce a new value.
The custom assembly form of the operation is as follows:
%result = %arg : type
Interfaces: InferTypeOpInterface
"},{"location":"dialects/HighLevel/HighLevel/#operands_57","title":"Operands:","text":"Operand Descriptionarg
lvalue to any type"},{"location":"dialects/HighLevel/HighLevel/#results_64","title":"Results:","text":"Result Description result
any type"},{"location":"dialects/HighLevel/HighLevel/#hlpredefinedexpr-vasthlpredefinedexpr","title":"hl.predefined.expr
(::vast::hl::PredefinedExpr)","text":"VAT predefined expr ( such as __func__ )
Syntax:
operation ::= `hl.predefined.expr` $value $kind attr-dict `:` type($value) `->` type($result)\n
VAT predefined expr ( such as func )
"},{"location":"dialects/HighLevel/HighLevel/#attributes_22","title":"Attributes:","text":"Attribute MLIR Type Descriptionkind
::vast::hl::IdentKindAttr ident kind"},{"location":"dialects/HighLevel/HighLevel/#operands_58","title":"Operands:","text":"Operand Description value
any type"},{"location":"dialects/HighLevel/HighLevel/#results_65","title":"Results:","text":"Result Description result
any type"},{"location":"dialects/HighLevel/HighLevel/#hlref-vasthldeclrefop","title":"hl.ref
(::vast::hl::DeclRefOp)","text":"VAST variable reference declaration
Syntax:
operation ::= `hl.ref` $decl attr-dict `:` functional-type(operands, results)\n
VAST variable reference declaration
"},{"location":"dialects/HighLevel/HighLevel/#operands_59","title":"Operands:","text":"Operand Descriptiondecl
any type"},{"location":"dialects/HighLevel/HighLevel/#results_66","title":"Results:","text":"Result Description result
lvalue to any type"},{"location":"dialects/HighLevel/HighLevel/#hlreturn-vasthlreturnop","title":"hl.return
(::vast::hl::ReturnOp)","text":"Syntax:
operation ::= `hl.return` ($result^ `:` type($result))? attr-dict\n
Traits: return_trait, soft_terminator
"},{"location":"dialects/HighLevel/HighLevel/#operands_60","title":"Operands:","text":"Operand Descriptionresult
any type"},{"location":"dialects/HighLevel/HighLevel/#hlsdiv-vasthldivsop","title":"hl.sdiv
(::vast::hl::DivSOp)","text":"VAST arithmetic binary operation
Syntax:
operation ::= `hl.sdiv` $lhs `,` $rhs attr-dict `:` functional-type(operands, results)\n
High-level arithmetic binary operation. This operation takes two operands and returns one result, each of these is required to be of the same type.
The custom assembly form of the operation is as follows:
%result = %lhs, %rhs : functional-type(operands, results)"},{"location":"dialects/HighLevel/HighLevel/#operands_61","title":"Operands:","text":"Operand Description lhs
any type rhs
any type"},{"location":"dialects/HighLevel/HighLevel/#results_67","title":"Results:","text":"Result Description result
any type"},{"location":"dialects/HighLevel/HighLevel/#hlsizeofexpr-vasthlsizeofexprop","title":"hl.sizeof.expr
(::vast::hl::SizeOfExprOp)","text":"
VAST expr sizeof operator
Syntax:
operation ::= `hl.sizeof.expr` attr-dict `->` type($result) $expr\n
VAST expr sizeof operator
"},{"location":"dialects/HighLevel/HighLevel/#results_68","title":"Results:","text":"Result Descriptionresult
integer like type"},{"location":"dialects/HighLevel/HighLevel/#hlsizeoftype-vasthlsizeoftypeop","title":"hl.sizeof.type
(::vast::hl::SizeOfTypeOp)","text":"VAST type sizeof operator
Syntax:
operation ::= `hl.sizeof.type` $arg attr-dict `->` type($result)\n
VAST type sizeof operator
"},{"location":"dialects/HighLevel/HighLevel/#attributes_23","title":"Attributes:","text":"Attribute MLIR Type Descriptionarg
::mlir::TypeAttr any type attribute"},{"location":"dialects/HighLevel/HighLevel/#results_69","title":"Results:","text":"Result Description result
integer like type"},{"location":"dialects/HighLevel/HighLevel/#hlskip-vasthlskipstmt","title":"hl.skip
(::vast::hl::SkipStmt)","text":"VAST skip statement
Syntax:
operation ::= `hl.skip` attr-dict\n
VAST skip statement
"},{"location":"dialects/HighLevel/HighLevel/#hlsrem-vasthlremsop","title":"hl.srem
(::vast::hl::RemSOp)","text":"VAST arithmetic binary operation
Syntax:
operation ::= `hl.srem` $lhs `,` $rhs attr-dict `:` functional-type(operands, results)\n
High-level arithmetic binary operation. This operation takes two operands and returns one result, each of these is required to be of the same type.
The custom assembly form of the operation is as follows:
%result = %lhs, %rhs : functional-type(operands, results)"},{"location":"dialects/HighLevel/HighLevel/#operands_62","title":"Operands:","text":"Operand Description lhs
any type rhs
any type"},{"location":"dialects/HighLevel/HighLevel/#results_70","title":"Results:","text":"Result Description result
any type"},{"location":"dialects/HighLevel/HighLevel/#hlstmtexpr-vasthlstmtexprop","title":"hl.stmt.expr
(::vast::hl::StmtExprOp)","text":"
VAST statement expression
Syntax:
operation ::= `hl.stmt.expr` attr-dict `:` type($result) $substmt\n
VAST statement expression Traits: SingleBlock
Interfaces: RegionKindInterface
"},{"location":"dialects/HighLevel/HighLevel/#results_71","title":"Results:","text":"Result Descriptionresult
any type"},{"location":"dialects/HighLevel/HighLevel/#hlstruct-vasthlstructdeclop","title":"hl.struct
(::vast::hl::StructDeclOp)","text":"VAST struct declaration
Syntax:
operation ::= `hl.struct` $name attr-dict `:` $fields\n
VAST struct declaration Traits: NoTerminator
Interfaces: VastSymbol
"},{"location":"dialects/HighLevel/HighLevel/#attributes_24","title":"Attributes:","text":"Attribute MLIR Type Descriptionname
::mlir::StringAttr string attribute"},{"location":"dialects/HighLevel/HighLevel/#hlsub-vasthlsubiop","title":"hl.sub
(::vast::hl::SubIOp)","text":"VAST arithmetic binary operation
Syntax:
operation ::= `hl.sub` $lhs `,` $rhs attr-dict `:` functional-type(operands, results)\n
High-level arithmetic binary operation. This operation takes two operands and returns one result, each of these is required to be of the same type.
The custom assembly form of the operation is as follows:
%result = %lhs, %rhs : functional-type(operands, results)"},{"location":"dialects/HighLevel/HighLevel/#operands_63","title":"Operands:","text":"Operand Description lhs
any type rhs
any type"},{"location":"dialects/HighLevel/HighLevel/#results_72","title":"Results:","text":"Result Description result
any type"},{"location":"dialects/HighLevel/HighLevel/#hlsubscript-vasthlsubscriptop","title":"hl.subscript
(::vast::hl::SubscriptOp)","text":"
VAST array subscript operator
Syntax:
operation ::= `hl.subscript` $array `at` ` ` `[` $index `:` type($index) `]` attr-dict\n `:` type($array) `->` type($result)\n
VAST array subscript operator
"},{"location":"dialects/HighLevel/HighLevel/#operands_64","title":"Operands:","text":"Operand Descriptionarray
lvalue to subscriptable type index
integer like type"},{"location":"dialects/HighLevel/HighLevel/#results_73","title":"Results:","text":"Result Description result
lvalue to any type"},{"location":"dialects/HighLevel/HighLevel/#hlswitch-vasthlswitchop","title":"hl.switch
(::vast::hl::SwitchOp)","text":"VAST switch statement
Syntax:
operation ::= `hl.switch` $condRegion `cases` $cases attr-dict\n
The operation represents a switch statement.
The generic form of the operation is as follows:
hl.switch { ... / cond region / hl.value.yield %val : !hl.type } cases { ... / casesregion / }
Traits: NoRegionArguments, NoTerminator
Interfaces: RegionKindInterface
"},{"location":"dialects/HighLevel/HighLevel/#hlthis-vasthlthisop","title":"hl.this
(::vast::hl::ThisOp)","text":"VAST this operator
Syntax:
operation ::= `hl.this` attr-dict `:` type($result)\n
VAST this operator
"},{"location":"dialects/HighLevel/HighLevel/#results_74","title":"Results:","text":"Result Descriptionresult
any type"},{"location":"dialects/HighLevel/HighLevel/#hltranslation_unit-vasthltranslationunitop","title":"hl.translation_unit
(::vast::hl::TranslationUnitOp)","text":"VAST translation unit
Syntax:
operation ::= `hl.translation_unit` $body attr-dict\n
VAST tranaslation unit Traits: IsolatedFromAbove, NoTerminator, SymbolTable
"},{"location":"dialects/HighLevel/HighLevel/#hltype-vasthltypedeclop","title":"hl.type
(::vast::hl::TypeDeclOp)","text":"VAST type declaration
Syntax:
operation ::= `hl.type` $name attr-dict\n
VAST type declaration Interfaces: VastSymbol
"},{"location":"dialects/HighLevel/HighLevel/#attributes_25","title":"Attributes:","text":"Attribute MLIR Type Descriptionname
::mlir::StringAttr string attribute"},{"location":"dialects/HighLevel/HighLevel/#hltypeyield-vasthltypeyieldop","title":"hl.type.yield
(::vast::hl::TypeYieldOp)","text":"Type yield operation
Syntax:
operation ::= `hl.type.yield` attr-dict $result `:` type($result)\n
A type yield operation is used to terminate the underlying expression region of a typeof(expr) statement.
The custom assembly form of the operation is as follows:
hl.type.yield result : type
Traits: Terminator
"},{"location":"dialects/HighLevel/HighLevel/#operands_65","title":"Operands:","text":"Operand Descriptionresult
any type"},{"location":"dialects/HighLevel/HighLevel/#hltypedef-vasthltypedefop","title":"hl.typedef
(::vast::hl::TypeDefOp)","text":"VAST typedef operation
Syntax:
operation ::= `hl.typedef` $name attr-dict `:` $type\n
Typedef operation servers to declare named types. It creates a new type symbol in the current scope to be referenced as NamedType later.
Interfaces: VastSymbol
"},{"location":"dialects/HighLevel/HighLevel/#attributes_26","title":"Attributes:","text":"Attribute MLIR Type Descriptionname
::mlir::StringAttr string attribute type
::mlir::TypeAttr any type attribute"},{"location":"dialects/HighLevel/HighLevel/#hltypeofexpr-vasthltypeofexprop","title":"hl.typeof.expr
(::vast::hl::TypeOfExprOp)","text":"VAST typeof(expr) operation
Syntax:
operation ::= `hl.typeof.expr` $name $expr `:` $type attr-dict\n
The Typeof operation serves to declare a type using type introspection. It evaluates its underlying expression, creates a new type symbol in the current scope, assigns it to the type of the underlying expression, and returns the type symbol to be referenced later
Traits: SingleBlock
Interfaces: VastSymbol
"},{"location":"dialects/HighLevel/HighLevel/#attributes_27","title":"Attributes:","text":"Attribute MLIR Type Descriptionname
::mlir::StringAttr string attribute type
::mlir::TypeAttr any type attribute"},{"location":"dialects/HighLevel/HighLevel/#hltypeoftype-vasthltypeoftypeop","title":"hl.typeof.type
(::vast::hl::TypeOfTypeOp)","text":"VAST typeof(type) operation
Syntax:
operation ::= `hl.typeof.type` attr-dict `:` $type\n
Interfaces: VastSymbol
"},{"location":"dialects/HighLevel/HighLevel/#attributes_28","title":"Attributes:","text":"Attribute MLIR Type Descriptiontype
::mlir::TypeAttr any type attribute"},{"location":"dialects/HighLevel/HighLevel/#hludiv-vasthldivuop","title":"hl.udiv
(::vast::hl::DivUOp)","text":"VAST arithmetic binary operation
Syntax:
operation ::= `hl.udiv` $lhs `,` $rhs attr-dict `:` functional-type(operands, results)\n
High-level arithmetic binary operation. This operation takes two operands and returns one result, each of these is required to be of the same type.
The custom assembly form of the operation is as follows:
%result = %lhs, %rhs : functional-type(operands, results)"},{"location":"dialects/HighLevel/HighLevel/#operands_66","title":"Operands:","text":"Operand Description lhs
any type rhs
any type"},{"location":"dialects/HighLevel/HighLevel/#results_75","title":"Results:","text":"Result Description result
any type"},{"location":"dialects/HighLevel/HighLevel/#hlunion-vasthluniondeclop","title":"hl.union
(::vast::hl::UnionDeclOp)","text":"
VAST record declaration
Syntax:
operation ::= `hl.union` $name attr-dict `:` $fields\n
VAST record declaration Traits: NoTerminator
Interfaces: VastSymbol
"},{"location":"dialects/HighLevel/HighLevel/#attributes_29","title":"Attributes:","text":"Attribute MLIR Type Descriptionname
::mlir::StringAttr string attribute"},{"location":"dialects/HighLevel/HighLevel/#hlunreachable-vasthlunreachableop","title":"hl.unreachable
(::vast::hl::UnreachableOp)","text":"VAST unreachable operation
Syntax:
operation ::= `hl.unreachable` attr-dict\n
VAST unreachable operation Traits: Terminator
"},{"location":"dialects/HighLevel/HighLevel/#hlurem-vasthlremuop","title":"hl.urem
(::vast::hl::RemUOp)","text":"VAST arithmetic binary operation
Syntax:
operation ::= `hl.urem` $lhs `,` $rhs attr-dict `:` functional-type(operands, results)\n
High-level arithmetic binary operation. This operation takes two operands and returns one result, each of these is required to be of the same type.
The custom assembly form of the operation is as follows:
%result = %lhs, %rhs : functional-type(operands, results)"},{"location":"dialects/HighLevel/HighLevel/#operands_67","title":"Operands:","text":"Operand Description lhs
any type rhs
any type"},{"location":"dialects/HighLevel/HighLevel/#results_76","title":"Results:","text":"Result Description result
any type"},{"location":"dialects/HighLevel/HighLevel/#hlvalueyield-vasthlvalueyieldop","title":"hl.value.yield
(::vast::hl::ValueYieldOp)","text":"
Value yield operation
Syntax:
operation ::= `hl.value.yield` attr-dict $result `:` type($result)\n
A value yield operation is used to terminate the case region of a switch statement. The yielded value triggers the parent case statement region.
The custom assembly form of the operation is as follows:
hl.value.yield result : type
Traits: Terminator
"},{"location":"dialects/HighLevel/HighLevel/#operands_68","title":"Operands:","text":"Operand Descriptionresult
any type"},{"location":"dialects/HighLevel/HighLevel/#hlvar-vasthlvardeclop","title":"hl.var
(::vast::hl::VarDeclOp)","text":"VAST variable declaration
Syntax:
operation ::= `hl.var` $name attr-dict ($storageClass^)? ($threadStorageClass^)? `:` type($result)\n (`=` $initializer^)?\n (`allocation_size` $allocation_size^)?\n
VAST variable declaration Interfaces: VastSymbol
"},{"location":"dialects/HighLevel/HighLevel/#attributes_30","title":"Attributes:","text":"Attribute MLIR Type Descriptionname
::mlir::StringAttr string attribute storageClass
::vast::hl::StorageClassAttr storage class threadStorageClass
::vast::hl::TSClassAttr thread storage class"},{"location":"dialects/HighLevel/HighLevel/#results_77","title":"Results:","text":"Result Description result
any type"},{"location":"dialects/HighLevel/HighLevel/#hlwhile-vasthlwhileop","title":"hl.while
(::vast::hl::WhileOp)","text":"VAST while statement
Syntax:
operation ::= `hl.while` $condRegion `do` $bodyRegion attr-dict\n
The operation takes builders of two mandatory regions -- condition and body region. Builders, given the location, build a particular region.
The generic form of the operation is as follows:
hl.while { ... / condition region / hl.cond.yield %cond : !hl.bool } do { ... / body region / }
Traits: NoRegionArguments, NoTerminator
Interfaces: RegionKindInterface
"},{"location":"dialects/HighLevel/HighLevel/#attribute-definition","title":"Attribute definition","text":""},{"location":"dialects/HighLevel/HighLevel/#allocalignattr","title":"AllocAlignAttr","text":"Syntax:
#hl.alloc_align<\n int # alignment\n>\n
"},{"location":"dialects/HighLevel/HighLevel/#parameters","title":"Parameters:","text":"Parameter C++ type Description alignment int
"},{"location":"dialects/HighLevel/HighLevel/#allocsizeattr","title":"AllocSizeAttr","text":"Syntax:
#hl.alloc_size<\n int, # size_arg_pos\n int # num_arg_pos\n>\n
"},{"location":"dialects/HighLevel/HighLevel/#parameters_1","title":"Parameters:","text":"Parameter C++ type Description size_arg_pos int
num_arg_pos int
"},{"location":"dialects/HighLevel/HighLevel/#annotationattr","title":"AnnotationAttr","text":"Syntax:
#hl.annotation<\n ::mlir::StringAttr # name\n>\n
"},{"location":"dialects/HighLevel/HighLevel/#parameters_2","title":"Parameters:","text":"Parameter C++ type Description name ::mlir::StringAttr
"},{"location":"dialects/HighLevel/HighLevel/#asmlabelattr","title":"AsmLabelAttr","text":"Syntax:
#hl.asm<\n ::mlir::StringAttr, # label\n bool # isLiteral\n>\n
"},{"location":"dialects/HighLevel/HighLevel/#parameters_3","title":"Parameters:","text":"Parameter C++ type Description label ::mlir::StringAttr
isLiteral bool
"},{"location":"dialects/HighLevel/HighLevel/#builtinattr","title":"BuiltinAttr","text":"Syntax:
#hl.builtin<\n unsigned # ID\n>\n
"},{"location":"dialects/HighLevel/HighLevel/#parameters_4","title":"Parameters:","text":"Parameter C++ type Description ID unsigned
"},{"location":"dialects/HighLevel/HighLevel/#cvqualifiersattr","title":"CVQualifiersAttr","text":"Syntax:
#hl.quals<\n bool, # is_const\n bool # is_volatile\n>\n
"},{"location":"dialects/HighLevel/HighLevel/#parameters_5","title":"Parameters:","text":"Parameter C++ type Description is_const bool
const qualifier is_volatile bool
volatile qualifier"},{"location":"dialects/HighLevel/HighLevel/#cvrqualifiersattr","title":"CVRQualifiersAttr","text":"Syntax:
#hl.quals<\n bool, # is_const\n bool, # is_volatile\n bool # is_restrict\n>\n
"},{"location":"dialects/HighLevel/HighLevel/#parameters_6","title":"Parameters:","text":"Parameter C++ type Description is_const bool
const qualifier is_volatile bool
volatile qualifier is_restrict bool
restrict qualifier"},{"location":"dialects/HighLevel/HighLevel/#constattr","title":"ConstAttr","text":"Syntax: #hl.const
Syntax:
#hl.format<\n ::mlir::StringAttr # name\n>\n
"},{"location":"dialects/HighLevel/HighLevel/#parameters_7","title":"Parameters:","text":"Parameter C++ type Description name ::mlir::StringAttr
"},{"location":"dialects/HighLevel/HighLevel/#loaderuninitializedattr","title":"LoaderUninitializedAttr","text":"Syntax: #hl.loader_uninitialized
Syntax:
#hl.mode<\n ::mlir::StringAttr # mode\n>\n
"},{"location":"dialects/HighLevel/HighLevel/#parameters_8","title":"Parameters:","text":"Parameter C++ type Description mode ::mlir::StringAttr
"},{"location":"dialects/HighLevel/HighLevel/#noinstrumentfunctionattr","title":"NoInstrumentFunctionAttr","text":"Syntax: #hl.no_instrument_function
Syntax: #hl.nothrow
Syntax: #hl.nonnull
Syntax: #hl.packed
Syntax: #hl.pure
Syntax: #hl.restrict
Syntax:
#hl.section<\n ::mlir::StringAttr # name\n>\n
"},{"location":"dialects/HighLevel/HighLevel/#parameters_9","title":"Parameters:","text":"Parameter C++ type Description name ::mlir::StringAttr
"},{"location":"dialects/HighLevel/HighLevel/#ucvqualifiersattr","title":"UCVQualifiersAttr","text":"Syntax:
#hl.quals<\n bool, # is_unsigned\n bool, # is_const\n bool # is_volatile\n>\n
"},{"location":"dialects/HighLevel/HighLevel/#parameters_10","title":"Parameters:","text":"Parameter C++ type Description is_unsigned bool
unsigned qualifier is_const bool
const qualifier is_volatile bool
volatile qualifier"},{"location":"dialects/HighLevel/HighLevel/#warnunusedresultattr","title":"WarnUnusedResultAttr","text":"Syntax: #hl.warn_unused_result
Syntax:
!hl.adjusted<\n Type, # original\n Type # adjusted\n>\n
"},{"location":"dialects/HighLevel/HighLevel/#parameters_11","title":"Parameters:","text":"Parameter C++ type Description original Type
adjusted Type
"},{"location":"dialects/HighLevel/HighLevel/#arraytype","title":"ArrayType","text":"Syntax:
!hl.array<\n SizeParam, # size\n Type, # elementType\n CVRQualifiersAttr # quals\n>\n
"},{"location":"dialects/HighLevel/HighLevel/#parameters_12","title":"Parameters:","text":"Parameter C++ type Description size SizeParam
size parameter for arrays elementType Type
quals CVRQualifiersAttr
"},{"location":"dialects/HighLevel/HighLevel/#attributedtype","title":"AttributedType","text":"Syntax:
!hl.attributed<\n Type # elementType\n>\n
"},{"location":"dialects/HighLevel/HighLevel/#parameters_13","title":"Parameters:","text":"Parameter C++ type Description elementType Type
"},{"location":"dialects/HighLevel/HighLevel/#bfloat16type","title":"BFloat16Type","text":"Syntax:
!hl.bfloat16<\n CVQualifiersAttr # quals\n>\n
"},{"location":"dialects/HighLevel/HighLevel/#parameters_14","title":"Parameters:","text":"Parameter C++ type Description quals CVQualifiersAttr
"},{"location":"dialects/HighLevel/HighLevel/#booltype","title":"BoolType","text":"Syntax:
!hl.bool<\n CVQualifiersAttr # quals\n>\n
"},{"location":"dialects/HighLevel/HighLevel/#parameters_15","title":"Parameters:","text":"Parameter C++ type Description quals CVQualifiersAttr
"},{"location":"dialects/HighLevel/HighLevel/#chartype","title":"CharType","text":"Syntax:
!hl.char<\n UCVQualifiersAttr # quals\n>\n
"},{"location":"dialects/HighLevel/HighLevel/#parameters_16","title":"Parameters:","text":"Parameter C++ type Description quals UCVQualifiersAttr
"},{"location":"dialects/HighLevel/HighLevel/#decayedtype","title":"DecayedType","text":"Syntax:
!hl.decayed<\n Type # elementType\n>\n
"},{"location":"dialects/HighLevel/HighLevel/#parameters_17","title":"Parameters:","text":"Parameter C++ type Description elementType Type
"},{"location":"dialects/HighLevel/HighLevel/#doubletype","title":"DoubleType","text":"Syntax:
!hl.double<\n CVQualifiersAttr # quals\n>\n
"},{"location":"dialects/HighLevel/HighLevel/#parameters_18","title":"Parameters:","text":"Parameter C++ type Description quals CVQualifiersAttr
"},{"location":"dialects/HighLevel/HighLevel/#elaboratedtype","title":"ElaboratedType","text":"Syntax:
!hl.elaborated<\n Type, # elementType\n CVRQualifiersAttr # quals\n>\n
"},{"location":"dialects/HighLevel/HighLevel/#parameters_19","title":"Parameters:","text":"Parameter C++ type Description elementType Type
quals CVRQualifiersAttr
"},{"location":"dialects/HighLevel/HighLevel/#enumtype","title":"EnumType","text":"Syntax:
!hl.enum<\n ::llvm::StringRef, # name\n CVQualifiersAttr # quals\n>\n
"},{"location":"dialects/HighLevel/HighLevel/#parameters_20","title":"Parameters:","text":"Parameter C++ type Description name ::llvm::StringRef
quals CVQualifiersAttr
"},{"location":"dialects/HighLevel/HighLevel/#float128type","title":"Float128Type","text":"Syntax:
!hl.float128<\n CVQualifiersAttr # quals\n>\n
"},{"location":"dialects/HighLevel/HighLevel/#parameters_21","title":"Parameters:","text":"Parameter C++ type Description quals CVQualifiersAttr
"},{"location":"dialects/HighLevel/HighLevel/#floattype","title":"FloatType","text":"Syntax:
!hl.float<\n CVQualifiersAttr # quals\n>\n
"},{"location":"dialects/HighLevel/HighLevel/#parameters_22","title":"Parameters:","text":"Parameter C++ type Description quals CVQualifiersAttr
"},{"location":"dialects/HighLevel/HighLevel/#halftype","title":"HalfType","text":"Syntax:
!hl.half<\n CVQualifiersAttr # quals\n>\n
"},{"location":"dialects/HighLevel/HighLevel/#parameters_23","title":"Parameters:","text":"Parameter C++ type Description quals CVQualifiersAttr
"},{"location":"dialects/HighLevel/HighLevel/#int128type","title":"Int128Type","text":"Syntax:
!hl.int128<\n UCVQualifiersAttr # quals\n>\n
"},{"location":"dialects/HighLevel/HighLevel/#parameters_24","title":"Parameters:","text":"Parameter C++ type Description quals UCVQualifiersAttr
"},{"location":"dialects/HighLevel/HighLevel/#inttype","title":"IntType","text":"Syntax:
!hl.int<\n UCVQualifiersAttr # quals\n>\n
"},{"location":"dialects/HighLevel/HighLevel/#parameters_25","title":"Parameters:","text":"Parameter C++ type Description quals UCVQualifiersAttr
"},{"location":"dialects/HighLevel/HighLevel/#lvaluetype","title":"LValueType","text":"Syntax:
!hl.lvalue<\n Type # elementType\n>\n
"},{"location":"dialects/HighLevel/HighLevel/#parameters_26","title":"Parameters:","text":"Parameter C++ type Description elementType Type
"},{"location":"dialects/HighLevel/HighLevel/#labeltype","title":"LabelType","text":"Syntax: !hl.label
Syntax:
!hl.longdouble<\n CVQualifiersAttr # quals\n>\n
"},{"location":"dialects/HighLevel/HighLevel/#parameters_27","title":"Parameters:","text":"Parameter C++ type Description quals CVQualifiersAttr
"},{"location":"dialects/HighLevel/HighLevel/#longlongtype","title":"LongLongType","text":"Syntax:
!hl.longlong<\n UCVQualifiersAttr # quals\n>\n
"},{"location":"dialects/HighLevel/HighLevel/#parameters_28","title":"Parameters:","text":"Parameter C++ type Description quals UCVQualifiersAttr
"},{"location":"dialects/HighLevel/HighLevel/#longtype","title":"LongType","text":"Syntax:
!hl.long<\n UCVQualifiersAttr # quals\n>\n
"},{"location":"dialects/HighLevel/HighLevel/#parameters_29","title":"Parameters:","text":"Parameter C++ type Description quals UCVQualifiersAttr
"},{"location":"dialects/HighLevel/HighLevel/#parentype","title":"ParenType","text":"Syntax:
!hl.paren<\n Type # elementType\n>\n
"},{"location":"dialects/HighLevel/HighLevel/#parameters_30","title":"Parameters:","text":"Parameter C++ type Description elementType Type
"},{"location":"dialects/HighLevel/HighLevel/#pointertype","title":"PointerType","text":"Syntax:
!hl.ptr<\n Type, # elementType\n CVRQualifiersAttr # quals\n>\n
"},{"location":"dialects/HighLevel/HighLevel/#parameters_31","title":"Parameters:","text":"Parameter C++ type Description elementType Type
quals CVRQualifiersAttr
"},{"location":"dialects/HighLevel/HighLevel/#rvaluetype","title":"RValueType","text":"Syntax:
!hl.rvalue<\n Type # elementType\n>\n
"},{"location":"dialects/HighLevel/HighLevel/#parameters_32","title":"Parameters:","text":"Parameter C++ type Description elementType Type
"},{"location":"dialects/HighLevel/HighLevel/#recordtype","title":"RecordType","text":"Syntax:
!hl.record<\n ::llvm::StringRef, # name\n CVQualifiersAttr # quals\n>\n
"},{"location":"dialects/HighLevel/HighLevel/#parameters_33","title":"Parameters:","text":"Parameter C++ type Description name ::llvm::StringRef
quals CVQualifiersAttr
"},{"location":"dialects/HighLevel/HighLevel/#referencetype","title":"ReferenceType","text":"Syntax:
!hl.reference<\n Type # elementType\n>\n
"},{"location":"dialects/HighLevel/HighLevel/#parameters_34","title":"Parameters:","text":"Parameter C++ type Description elementType Type
"},{"location":"dialects/HighLevel/HighLevel/#shorttype","title":"ShortType","text":"Syntax:
!hl.short<\n UCVQualifiersAttr # quals\n>\n
"},{"location":"dialects/HighLevel/HighLevel/#parameters_35","title":"Parameters:","text":"Parameter C++ type Description quals UCVQualifiersAttr
"},{"location":"dialects/HighLevel/HighLevel/#typeofexprtype","title":"TypeOfExprType","text":"Syntax:
!hl.typeof.expr<\n ::llvm::StringRef, # name\n CVRQualifiersAttr # quals\n>\n
"},{"location":"dialects/HighLevel/HighLevel/#parameters_36","title":"Parameters:","text":"Parameter C++ type Description name ::llvm::StringRef
quals CVRQualifiersAttr
"},{"location":"dialects/HighLevel/HighLevel/#typeoftypetype","title":"TypeOfTypeType","text":"Syntax:
!hl.typeof.type<\n Type, # unmodifiedType\n CVRQualifiersAttr # quals\n>\n
"},{"location":"dialects/HighLevel/HighLevel/#parameters_37","title":"Parameters:","text":"Parameter C++ type Description unmodifiedType Type
quals CVRQualifiersAttr
"},{"location":"dialects/HighLevel/HighLevel/#typedeftype","title":"TypedefType","text":"Syntax:
!hl.typedef<\n ::llvm::StringRef, # name\n CVRQualifiersAttr # quals\n>\n
"},{"location":"dialects/HighLevel/HighLevel/#parameters_38","title":"Parameters:","text":"Parameter C++ type Description name ::llvm::StringRef
quals CVRQualifiersAttr
"},{"location":"dialects/HighLevel/HighLevel/#voidtype","title":"VoidType","text":"Syntax:
!hl.void<\n CVQualifiersAttr # quals\n>\n
"},{"location":"dialects/HighLevel/HighLevel/#parameters_39","title":"Parameters:","text":"Parameter C++ type Description quals CVQualifiersAttr
"},{"location":"dialects/LowLevel/LowLevel/","title":"Low Level","text":""},{"location":"dialects/LowLevel/LowLevel/#ll-dialect","title":"'ll' Dialect","text":"A vast low-level dialect. This dialect serves as a bottom layer in VAST dialect tower. There should always exist a pass that lowers this dialect into LLVM Dialect.
Work in progress - new operations are still being added and existing can be changed or removed.
ll.br
(::vast::ll::Br)","text":"Direct branch.
Syntax:
operation ::= `ll.br` $dest (`(` $operands^ `:` type($operands) `)`)? attr-dict\n
Direct branch Traits: Terminator
Interfaces: BranchOpInterface
"},{"location":"dialects/LowLevel/LowLevel/#operands","title":"Operands:","text":"Operand Descriptionoperands
any type"},{"location":"dialects/LowLevel/LowLevel/#successors","title":"Successors:","text":"Successor Description dest
any successor"},{"location":"dialects/LowLevel/LowLevel/#llconcat-vastllconcat","title":"ll.concat
(::vast::ll::Concat)","text":"Concat integers together
Syntax:
operation ::= `ll.concat` operands attr-dict `:` functional-type(operands, results)\n
Concat operands together, where first argument occupies lsb.
"},{"location":"dialects/LowLevel/LowLevel/#operands_1","title":"Operands:","text":"Operand Descriptionargs
any type"},{"location":"dialects/LowLevel/LowLevel/#results","title":"Results:","text":"Result Description result
any type"},{"location":"dialects/LowLevel/LowLevel/#llcond_br-vastllcondbr","title":"ll.cond_br
(::vast::ll::CondBr)","text":"Conditional branch.
Syntax:
operation ::= `ll.cond_br` $cond `:` type($cond) `,`\n $trueDest (`(` $trueOperands^ `:` type($trueOperands) `)`)? `,`\n $falseDest (`(` $falseOperands^ `:` type($falseOperands) `)`)?\n attr-dict\n
Direct branch Traits: AttrSizedOperandSegments, Terminator
"},{"location":"dialects/LowLevel/LowLevel/#operands_2","title":"Operands:","text":"Operand Descriptioncond
any type trueOperands
any type falseOperands
any type"},{"location":"dialects/LowLevel/LowLevel/#successors_1","title":"Successors:","text":"Successor Description trueDest
any successor falseDest
any successor"},{"location":"dialects/LowLevel/LowLevel/#llcond_scope_ret-vastllcondscoperet","title":"ll.cond_scope_ret
(::vast::ll::CondScopeRet)","text":"Terminator of scope if condition is met, otherwise branch.
Syntax:
operation ::= `ll.cond_scope_ret` $cond `:` type($cond) `,`\n $dest (`(` $dest_operands^ `:` type($dest_operands) `)`)? attr-dict\n
Terminate or branch. Traits: Terminator
"},{"location":"dialects/LowLevel/LowLevel/#operands_3","title":"Operands:","text":"Operand Descriptioncond
any type dest_operands
any type"},{"location":"dialects/LowLevel/LowLevel/#successors_2","title":"Successors:","text":"Successor Description dest
any successor"},{"location":"dialects/LowLevel/LowLevel/#llextract-vastllextract","title":"ll.extract
(::vast::ll::Extract)","text":"Extracts value
Syntax:
operation ::= `ll.extract` operands attr-dict `:` functional-type(operands, results)\n
0
is lsb, [inc, exc)
from
::mlir::TypedAttr TypedAttr instance to
::mlir::TypedAttr TypedAttr instance"},{"location":"dialects/LowLevel/LowLevel/#operands_4","title":"Operands:","text":"Operand Description arg
any type"},{"location":"dialects/LowLevel/LowLevel/#results_1","title":"Results:","text":"Result Description result
any type"},{"location":"dialects/LowLevel/LowLevel/#llfunc-vastllfuncop","title":"ll.func
(::vast::ll::FuncOp)","text":"VAST function template
Syntax:
operation ::= `ll.func` $linkage $sym_name custom< FunctionSignatureAndBody >($function_type, attr-dict, $body)\n
Inspired by cir::FuncOp
and mlir::func::FuncOp
:
Operations within the function cannot implicitly capture values defined outside of the function, i.e. Functions are IsolatedFromAbove
. All external references must use function arguments or attributes that establish a symbolic connection (e.g. symbols referenced by name via a string attribute like SymbolRefAttr). An external function declaration (used when referring to a function declared in some other module) has no body.
The function linkage information is specified by linkage
, as defined by GlobalLinkageKind
attribute.
Traits: AutomaticAllocationScope, IsolatedFromAbove, NoTerminator
Interfaces: CallableOpInterface, FunctionOpInterface, RegionKindInterface, Symbol
"},{"location":"dialects/LowLevel/LowLevel/#attributes_1","title":"Attributes:","text":"Attribute MLIR Type Descriptionsym_name
::mlir::StringAttr string attribute function_type
::mlir::TypeAttr type attribute of function type linkage
::vast::core::GlobalLinkageKindAttr global linkage kind sym_visibility
::mlir::StringAttr string attribute arg_attrs
::mlir::ArrayAttr Array of dictionary attributes res_attrs
::mlir::ArrayAttr Array of dictionary attributes"},{"location":"dialects/LowLevel/LowLevel/#llgep-vastllstructgepop","title":"ll.gep
(::vast::ll::StructGEPOp)","text":"VAST struct gep operation
VAST struct gep operation
"},{"location":"dialects/LowLevel/LowLevel/#attributes_2","title":"Attributes:","text":"Attribute MLIR Type Descriptionidx
::mlir::IntegerAttr 32-bit signless integer attribute name
::mlir::StringAttr string attribute"},{"location":"dialects/LowLevel/LowLevel/#operands_5","title":"Operands:","text":"Operand Description record
any type"},{"location":"dialects/LowLevel/LowLevel/#results_2","title":"Results:","text":"Result Description element
any type"},{"location":"dialects/LowLevel/LowLevel/#llinitialize-vastllinitializevar","title":"ll.initialize
(::vast::ll::InitializeVar)","text":"Initialize a variable.
Syntax:
operation ::= `ll.initialize` operands attr-dict `:` functional-type(operands, results)\n
Initialize a variable - for now this operation is a direct lowering from hl.var initialization section. Later there will be need to discover how this ties to constructors.
"},{"location":"dialects/LowLevel/LowLevel/#operands_6","title":"Operands:","text":"Operand Descriptionvar
any type elements
any type"},{"location":"dialects/LowLevel/LowLevel/#results_3","title":"Results:","text":"Result Description result
any type"},{"location":"dialects/LowLevel/LowLevel/#llinline_scope-vastllinlinescope","title":"ll.inline_scope
(::vast::ll::InlineScope)","text":"Scope, that forwards (cond)scope return up.
Result of inlined if. Traits: NoRegionArguments
"},{"location":"dialects/LowLevel/LowLevel/#llreturn-vastllreturnop","title":"ll.return
(::vast::ll::ReturnOp)","text":"Syntax:
operation ::= `ll.return` ($result^ `:` type($result))? attr-dict\n
Traits: Terminator, return_trait
"},{"location":"dialects/LowLevel/LowLevel/#operands_7","title":"Operands:","text":"Operand Descriptionresult
any type"},{"location":"dialects/LowLevel/LowLevel/#llscope-vastllscope","title":"ll.scope
(::vast::ll::Scope)","text":"Scope, holds one region.
Syntax:
operation ::= `ll.scope` $body attr-dict\n
Scope that holds one region, each block should be terminated with either branch, scope return or their conditional variants. Traits: NoRegionArguments
"},{"location":"dialects/LowLevel/LowLevel/#llscope_recurse-vastllscoperecurse","title":"ll.scope_recurse
(::vast::ll::ScopeRecurse)","text":"Jump to first block of scope.
Syntax:
operation ::= `ll.scope_recurse` attr-dict\n
Modelling continue. Traits: Terminator
"},{"location":"dialects/LowLevel/LowLevel/#llscope_ret-vastllscoperet","title":"ll.scope_ret
(::vast::ll::ScopeRet)","text":"Terminator of scope.
Syntax:
operation ::= `ll.scope_ret` attr-dict\n
Terminator of scopes (for example during lowering of loops). Traits: Terminator
"},{"location":"dialects/LowLevel/LowLevel/#lluninitialized_var-vastlluninitializedvar","title":"ll.uninitialized_var
(::vast::ll::UninitializedVar)","text":"Declaration of variable that have not been initialized yet.
Syntax:
operation ::= `ll.uninitialized_var` attr-dict `:` type($result)\n
Declaration of variable that have not been initialized yet. Interfaces: VastSymbol
"},{"location":"dialects/LowLevel/LowLevel/#results_4","title":"Results:","text":"Result Descriptionresult
any type"},{"location":"dialects/Meta/Meta/","title":"Meta","text":""},{"location":"dialects/Meta/Meta/#meta-dialect","title":"'meta' Dialect","text":"A vast metadata dialect. This dialect intends capture user metadata that are kept accross transformations.
A metadata identifier.
Syntax:
#meta.id<\n identifier_t # value\n>\n
A metadata identifier can be used to relate operations to external metadata storage.
#meta.id<\"0x3A28213A\">\n
"},{"location":"dialects/Meta/Meta/#parameters","title":"Parameters:","text":"Parameter C++ type Description value identifier_t
"},{"location":"dialects/Unsupported/Unsupported/","title":"Unsupported","text":""},{"location":"dialects/Unsupported/Unsupported/#unsup-dialect","title":"'unsup' Dialect","text":"A vast unsupported dialect. This dialect defines a set of generic unsupported operation/types that can be used to lower AST Node that are yet not supported and can't be lowered by other dialects.
unsup.decl
(::vast::unsup::UnsupportedDecl)","text":"VAST unsupported decl
Syntax:
operation ::= `unsup.decl` $name attr-dict `:` $body\n
VAST unsupported decl Traits: NoTerminator
"},{"location":"dialects/Unsupported/Unsupported/#attributes","title":"Attributes:","text":"Attribute MLIR Type Descriptionname
::mlir::StringAttr string attribute"},{"location":"dialects/Unsupported/Unsupported/#unsupstmt-vastunsupunsupportedstmt","title":"unsup.stmt
(::vast::unsup::UnsupportedStmt)","text":"VAST unsupported statement
Syntax:
operation ::= `unsup.stmt` $name attr-dict `:` type($result) $children\n
VAST unsupported statement Traits: NoTerminator
"},{"location":"dialects/Unsupported/Unsupported/#attributes_1","title":"Attributes:","text":"Attribute MLIR Type Descriptionname
::mlir::StringAttr string attribute"},{"location":"dialects/Unsupported/Unsupported/#results","title":"Results:","text":"Result Description result
any type"},{"location":"dialects/Unsupported/Unsupported/#attribute-definition","title":"Attribute definition","text":""},{"location":"dialects/Unsupported/Unsupported/#unsupportedattr","title":"UnsupportedAttr","text":"Syntax:
#unsup.attr<\n ::mlir::StringAttr # spelling\n>\n
"},{"location":"dialects/Unsupported/Unsupported/#parameters","title":"Parameters:","text":"Parameter C++ type Description spelling ::mlir::StringAttr
"},{"location":"dialects/Unsupported/Unsupported/#type-definition","title":"Type definition","text":""},{"location":"dialects/Unsupported/Unsupported/#unsupportedtype","title":"UnsupportedType","text":"Syntax:
!unsup.type<\n ::llvm::StringRef # originName\n>\n
"},{"location":"dialects/Unsupported/Unsupported/#parameters_1","title":"Parameters:","text":"Parameter C++ type Description originName ::llvm::StringRef
"}]}
\ No newline at end of file
diff --git a/sitemap.xml b/sitemap.xml
new file mode 100644
index 0000000000..60155878ee
--- /dev/null
+++ b/sitemap.xml
@@ -0,0 +1,108 @@
+
+VAST is licensed according to the Apache 2.0 license. VAST links against and uses Clang and LLVM APIs. Clang is also licensed under Apache 2.0, with LLVM exceptions.
+This research was developed with funding from the Defense Advanced Research Projects Agency (DARPA). The views, opinions and/or findings expressed are those of the author and should not be interpreted as representing the official views or policies of the Department of Defense or the U.S. Government.
+Distribution Statement A – Approved for Public Release, Distribution Unlimited
+ + + + + + +