opt

package
v0.0.0-...-8df569a Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 27, 2026 License: GPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DeadCodeElimination

func DeadCodeElimination(function *gen.FunctionInfo) core.ResultList

func FileToDeadCodeElimination

func FileToDeadCodeElimination(file *gen.FileInfo) core.ResultList

func TransformFileToDeadCodeElimination

func TransformFileToDeadCodeElimination(
	data *transform.TargetData,
) (*transform.TargetData, core.ResultList)

Types

type CriticalInstruction

type CriticalInstruction struct{}

func (CriticalInstruction) IsCritical

type DCESupportedInstruction

type DCESupportedInstruction interface {
	gen.InstructionDefinition

	// Returns true if the instruction is a critical instruction, which means
	// it can't be removed by the dead code elimination process, by definition.
	//
	// A critical instruction might be a function call, a branch, an instruction
	// with a side effect, etc.
	IsCritical(info *gen.InstructionInfo) bool

	// Returns the registers that the instruction defines, directly or indirectly.
	Defines(info *gen.InstructionInfo) []*gen.RegisterInfo

	// Returns the registers that the instruction uses, directly or indirectly.
	Uses(info *gen.InstructionInfo) []*gen.RegisterInfo
}

type DefinesNothingInstruction

type DefinesNothingInstruction struct{}

func (DefinesNothingInstruction) Defines

type DefinesTargetsInstruction

type DefinesTargetsInstruction struct{}

func (DefinesTargetsInstruction) Defines

type NonCriticalInstruction

type NonCriticalInstruction struct{}

func (NonCriticalInstruction) IsCritical

type UsesArgumentsInstruction

type UsesArgumentsInstruction struct{}

func (UsesArgumentsInstruction) Uses

type UsesNothingInstruction

type UsesNothingInstruction struct{}

func (UsesNothingInstruction) Uses

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL