package inline
import "cmd/compile/internal/inline"
Index ¶
- Variables
- func CalleeEffects(init *ir.Nodes, callee ir.Node)
- func CanInline(fn *ir.Func, profile *pgoir.Profile)
- func CanInlineFuncs(funcs []*ir.Func, profile *pgoir.Profile)
- func HasPgoHotInline(fn *ir.Func) bool
- func InlineCallTarget(callerfn *ir.Func, call *ir.CallExpr, profile *pgoir.Profile) *ir.Func
- func InlineImpossible(fn *ir.Func) string
- func IsBigFunc(fn *ir.Func) bool
- func IsPgoHotFunc(fn *ir.Func, profile *pgoir.Profile) bool
- func PGOInlinePrologue(p *pgoir.Profile)
- func PostProcessCallSites(profile *pgoir.Profile)
- func TryInlineCall(callerfn *ir.Func, call *ir.CallExpr, bigCaller bool, profile *pgoir.Profile, closureCalledOnce bool) *ir.InlinedCallExpr
Variables ¶
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.
SSADumpInline gives the SSA back end a chance to dump the function when producing output for debugging the compiler itself.
Functions ¶
func CalleeEffects ¶
CalleeEffects appends any side effects from evaluating callee to init.
func CanInline ¶
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 ¶
CanInlineFuncs computes whether a batch of functions are inlinable.
func HasPgoHotInline ¶
func InlineCallTarget ¶
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 ¶
InlineImpossible returns a non-empty reason string if fn is impossible to inline regardless of cost or contents.
func IsBigFunc ¶
IsBigFunc reports whether fn is a "big" function.
Note: The criteria for "big" is heuristic and subject to change.
func IsPgoHotFunc ¶
func PGOInlinePrologue ¶
PGOInlinePrologue records the hot callsites from ir-graph.
func PostProcessCallSites ¶
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.
Source Files ¶
Directories ¶
Path | Synopsis |
---|---|
cmd/compile/internal/inline/inlheur | |
cmd/compile/internal/inline/interleaved | Package interleaved implements the interleaved devirtualization and inlining pass. |
- Version
- v1.24.0 (latest)
- Published
- Feb 10, 2025
- Platform
- linux/amd64
- Imports
- 14 packages
- Last checked
- 7 minutes ago –
Tools for package owners.