optimize
Apply optimization passes like dead store elimination, branch folding, and memory dependency analysis to a VTIL IL tree, returning an optimized IL for downstream use.
Instructions
Run VTIL optimization passes over a lifted IL tree.
Args:
il: the IL tree produced by :func:lift_handler
passes: list of pass names to apply in order. The canonical
set is dead_store_elimination, branch_folding,
mem_dependency; pass names are the C++ enum names
in VTIL's optimizer::pass_index.
Returns::
{"il": <optimized il>, "passes_applied": [...]}The output IL is in the same shape as the input — drop-in
replacement for downstream emit calls.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"il": "<il>"
},
"name": "optimize"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| il | Yes | ||
| passes | No |