inline

package standard library
v0.0.0 Latest Latest
Warning

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

Go to latest
Published: May 16, 2025 License: None detected not legal advice Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var InlineCall = func(callerfn *ir.Func, call *ir.CallExpr, fn *ir.Func, inlIndex int) *ir.InlinedCallExpr {
	base.Fatalf("inline.InlineCall not overridden")
	panic("unreachable")
}

InlineCall allows the inliner implementation to be overridden. If it returns nil, the function will not be inlined.

View Source
var SSADumpInline = func(*ir.Func) {}

SSADumpInline gives the SSA back end a chance to dump the function when producing output for debugging the compiler itself.

Functions

func CalleeEffects

func CalleeEffects(init *ir.Nodes, callee ir.Node)

CalleeEffects appends any side effects from evaluating callee to init.

func CanInline

func CanInline(fn *ir.Func, profile *pgoir.Profile)

CanInline determines whether fn is inlineable. If so, CanInline saves copies of fn.Body and fn.Dcl in fn.Inl. fn and fn.Body will already have been typechecked.

func CanInlineFuncs

func CanInlineFuncs(funcs []*ir.Func, profile *pgoir.Profile)

CanInlineFuncs computes whether a batch of functions are inlinable.

func HasPgoHotInline

func HasPgoHotInline(fn *ir.Func) bool

func InlineCallTarget

func InlineCallTarget(callerfn *ir.Func, call *ir.CallExpr, profile *pgoir.Profile) *ir.Func

InlineCallTarget returns the resolved-for-inlining target of a call. It does not necessarily guarantee that the target can be inlined, though obvious exclusions are applied.

func InlineImpossible

func InlineImpossible(fn *ir.Func) string

InlineImpossible returns a non-empty reason string if fn is impossible to inline regardless of cost or contents.

func IsBigFunc

func IsBigFunc(fn *ir.Func) bool

IsBigFunc reports whether fn is a "big" function.

Note: The criteria for "big" is heuristic and subject to change.

func IsPgoHotFunc

func IsPgoHotFunc(fn *ir.Func, profile *pgoir.Profile) bool

func PGOInlinePrologue

func PGOInlinePrologue(p *pgoir.Profile)

PGOInlinePrologue records the hot callsites from ir-graph.

func PostProcessCallSites

func PostProcessCallSites(profile *pgoir.Profile)

func TryInlineCall

func TryInlineCall(callerfn *ir.Func, call *ir.CallExpr, bigCaller bool, profile *pgoir.Profile, closureCalledOnce bool) *ir.InlinedCallExpr

TryInlineCall returns an inlined call expression for call, or nil if inlining is not possible.

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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