Documentation
¶
Overview ¶
Package irwalk provides the nil-guarded gIR traversal iterators shared by the analysis passes, the frontends' whole-program rewrites, and converter tests. Use them instead of hand-writing the four-deep `module → function → block → instruction` nest, where a pass can silently forget a nil check.
These are range-over-func iterators, so `continue`/`break`/`return` behaves as in a plain loop. Every consumer runs ONCE per scan, so the per-element closure call is not hot; the engine's per-(function × rule) inner loops are deliberately left as hand-written loops.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SetCallee ¶
func SetCallee(cc *ir.CallCommon, name string)
SetCallee rewrites a call's resolved callee to name, keeping the call's function-value operand (when it names a function) in sync — the two fields name the same callee, and a rewrite that updated only Callee would leave a stale FuncName behind for any pass that reads the operand.
Types ¶
This section is empty.