-
Notifications
You must be signed in to change notification settings - Fork 21
Open
Labels
availableWelcome to claim it and implement itWelcome to claim it and implement iteffort:lowLow effort to accomplish itLow effort to accomplish it
Description
Currently, optimize.go implements three types of optimizations. After these optimizations are applied, some functions may become redundant and can be removed.
For instance, consider the following optimization:
if ctx, skip := otel_trampoline_before(&arg); skip {
otel_trampoline_after(ctx, &retval)
return ...
} else {
;
...
}
=>
if false {
;
} else {
defer otel_trampoline_after(&HookContext{...}, &retval)
...
}
As a result of this transformation, the otel_trampoline_before function is no longer called, allowing us to remove its definition entirely.
In addition to this case, the other two optimizations can create similar opportunities for dead code elimination. This helps to reduce the final binary size and improve instruction cache performance.
Metadata
Metadata
Assignees
Labels
availableWelcome to claim it and implement itWelcome to claim it and implement iteffort:lowLow effort to accomplish itLow effort to accomplish it