Skip to content

Commit 5beace6

Browse files
authored
JIT: Enable tail await optimization in async versions in tier 0 (#130181)
Otherwise we will allocate continuations for paths that are going to be allocation free in tier 1. This shows up in traces when running TechEmpower benchmarks as a large amount of allocation happening until everything gets tiered up. Diff on alloc metrics on platform-json: ```diff -| Max Allocation Rate (B/sec) | 110,580,952 | +| Max Allocation Rate (B/sec) | 8,030,616 | ```
1 parent a45588c commit 5beace6

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/coreclr/jit/importercalls.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7290,7 +7290,7 @@ void Compiler::impSetupAsyncCall(
72907290
}
72917291
else
72927292
{
7293-
if (opts.OptimizationEnabled() && ((prefixFlags & PREFIX_IS_ASYNC_VERSION_TAIL_AWAIT) != 0) &&
7293+
if (opts.Tier0OptimizationEnabled() && ((prefixFlags & PREFIX_IS_ASYNC_VERSION_TAIL_AWAIT) != 0) &&
72947294
(call->gtReturnType == info.compRetType))
72957295
{
72967296
CORINFO_METHOD_HANDLE exactCalleeHnd =

0 commit comments

Comments
 (0)