angr.go.optimization_passes.arg_spill_remover

class angr.go.optimization_passes.arg_spill_remover.GoArgSpillRemover

Bases: OptimizationPass

Drop stores into the incoming-argument spill area that the function never reads back, and unread prologue saves of the link register and the frame pointer (arm64 stores x30 and x29 into its own frame).

Under Go’s register ABI the caller reserves a spill slot per register argument in its own frame, and the callee spills into those slots whenever it needs them (the morestack path, or every argument in unoptimized code). The slots sit above the return address, so the generic dead-store removal treats them as caller memory and keeps the stores. Nothing but this function ever reads them.

ARCHES = None
PLATFORMS = None
STAGE: OptimizationPassStage = 7
NAME = 'Remove unread Go argument spills'
__init__(func, manager, **kwargs)