Beaver.DSL.Pattern (beaver v0.2.11)

Link to this section Summary

Functions

The difference between a pdl.operation creation in a match body and a rewrite body

generate PDL ops for types and attributes

generate arguments for prototype dispatch

transform a macro's call to PDL operations to match operands, attributes, results. Every Prototype form within the block should be transformed to create a PDL operation.

transform a do block to PDL rewrite operation. Every Prototype form within the block should be transformed to create a PDL operation. The last expression will be replaced by the root op in the match by default. TODO: wrap this function with a macro rewrite/1, so that it could be use in a independent function

Link to this section Functions

Link to this function

create_operation(op_name, prototype, arg)

The difference between a pdl.operation creation in a match body and a rewrite body:

  • in a match body, pdl.attribute/pdl.operand/pdl.result will be generated for unbound variables
  • in a rewrite body, all variables are considered bound before creation pdl ops
Link to this function

gen_attribute_names(attributes_keys)

Link to this function

gen_pdl(env, type)

generate PDL ops for types and attributes

Link to this function

gen_prototype_args(map_args)

generate arguments for prototype dispatch

Link to this function

gen_prototype_args(kind, map_args)

Link to this function

result(env, v, i)

Link to this function

transform_match(caller, ast)

transform a macro's call to PDL operations to match operands, attributes, results. Every Prototype form within the block should be transformed to create a PDL operation.

Link to this function

transform_rewrite(caller, ast)

transform a do block to PDL rewrite operation. Every Prototype form within the block should be transformed to create a PDL operation. The last expression will be replaced by the root op in the match by default. TODO: wrap this function with a macro rewrite/1, so that it could be use in a independent function