Charms.Defm (charms v0.1.4)
Charms.Defm is a DSL for defining functions that can be JIT-compiled.
This module defines the defm
DSL syntax as macros and special forms.
Extending the defm
There are two kinds of functions in Charms
:
- Intrinsic: use
beaver
's DSL to define, which can be called in the function body of adefm
defm
: usedefm
to define, can be JIT-compiled Although they are different in terms of underline implementation, they share the same syntax to invoke.
Summary
Functions
call a local function with return
call a function defined in another Charms
module with return
cond
expression requires identical types for both branches
for loop
create an MLIR operation
create an MLIR operation and return the result value(s)
while loop