Beaver.MLIR.SymbolTable (beaver v0.4.8)

Copy Markdown

This module provides utilities for MLIR symbol table.

Summary

Functions

Returns the name of the attribute used for symbol names as atom.

Creates a new symbol table and attaches it to the given operation. The operation is expected to have the SymbolTable trait.

Destroys the given symbol table.

Erases a symbol from the given symbol table.

Inserts an operation into a symbol table.

Looks up a symbol with the given name in the symbol table.

Replaces all uses of a symbol with another symbol.

Returns the name of the attribute used for symbol visibility as atom.

Types

t()

@type t() :: %Beaver.MLIR.SymbolTable{ref: term()}

Functions

attribute_name()

Returns the name of the attribute used for symbol names as atom.

Examples

iex> MLIR.SymbolTable.attribute_name() :sym_name

create(operation)

Creates a new symbol table and attaches it to the given operation. The operation is expected to have the SymbolTable trait.

destroy(symbol_table)

Destroys the given symbol table.

erase(symbol_table, operation)

Erases a symbol from the given symbol table.

insert(symbol_table, operation)

Inserts an operation into a symbol table.

lookup(symbol_table, name)

Looks up a symbol with the given name in the symbol table.

make(value)

replace_all_symbol_uses(old_symbol, new_symbol, from)

Replaces all uses of a symbol with another symbol.

visibility_attribute_name()

Returns the name of the attribute used for symbol visibility as atom.

Examples

iex> MLIR.SymbolTable.visibility_attribute_name() :sym_visibility