Skip to content

cmd/compile: PGO-driven indirect call specialization #59959

Closed
@prattmic

Description

@prattmic

For instance, adding a conditional direct call to the concrete type of the hottest callee of an interface call.

Converting:

iface.Bar()

to

t, ok := iface.(Concrete)
if ok {
	t.Bar()
} else {
	iface.Bar()
}

This can enable inlining of the hot path. It won't affect escape analysis because the fallback path still escapes.

cc @cherrymui @aclements @rajbarik @jinlin-bayarea

Metadata

Metadata

Assignees

Labels

FrozenDueToAgeNeedsFixThe path to resolution is known, but the work has not been done.compiler/runtimeIssues related to the Go compiler and/or runtime.

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions