LLZK 0.1.0
Veridise's ZK Language IR
Loading...
Searching...
No Matches
LLZKInlineStructsPass.h File Reference
#include <llzk/Dialect/Struct/IR/Ops.h>
#include <mlir/IR/SymbolTable.h>
#include <mlir/Support/LogicalResult.h>
Include dependency graph for LLZKInlineStructsPass.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Typedefs

using InliningPlan
 Maps caller struct to callees that should be inlined.

Functions

mlir::LogicalResult performInlining (mlir::SymbolTableCollection &tables, InliningPlan &plan)

Typedef Documentation

◆ InliningPlan

using InliningPlan
Initial value:
mlir::SmallVector<
std::pair<llzk::component::StructDefOp, mlir::SmallVector<llzk::component::StructDefOp>>>

Maps caller struct to callees that should be inlined.

The outer SmallVector preserves the ordering from the bottom-up traversal that builds the InliningPlan so performing inlining in the order given will not lose any or require doing any more than once. Note: Applying in the opposite direction would reduce making repeated clones of the ops within the inlined struct functions (as they are inlined further and further up the tree) but that would require updating some mapping in the plan along the way to ensure it's done properly.

Definition at line 23 of file LLZKInlineStructsPass.h.

Function Documentation

◆ performInlining()

mlir::LogicalResult performInlining ( mlir::SymbolTableCollection & tables,
InliningPlan & plan )