angr.go.optimization_passes.check_remover¶
- angr.go.optimization_passes.check_remover.is_go_check_panic_name(name)¶
- angr.go.optimization_passes.check_remover.is_go_write_barrier_name(name)¶
- class angr.go.optimization_passes.check_remover.GoCheckRemover¶
Bases:
OptimizationPass,CFGTransformationMixinRemove compiler-inserted checks whose failure path is a panic stub, and GC write-barrier slow paths.
A bounds/division check branches to a sink block that only spills the operands and calls a
runtime.panic*helper; the block and the branch to it are dropped, sos[i]reads as an index expression again. A pointer store compiles toif runtime.writeBarrier.enabled { gcWriteBarrierN(); buf[...] = ... }followed by the real store on the join block; the barrier block only records the old and new pointers for the GC, so it and the branch are dropped as well.- ARCHES = None¶
- PLATFORMS = None¶
- STAGE: OptimizationPassStage = 1¶
- NAME = 'Remove Go bounds/division checks and write barriers'¶
- __init__(func, manager, **kwargs)¶