Skip to content

Conversation

@VSadov
Copy link
Member

@VSadov VSadov commented Jul 12, 2025

A trivial change.

Closes: #115264

The switch may still be useful for testing/investigating issues, but not as interesting in benchmarking. Thus does not need to be release switch.

Copilot AI review requested due to automatic review settings July 12, 2025 22:34
@dotnet-policy-service
Copy link
Contributor

Tagging subscribers to this area: @mangod9
See info in area-owners.md if you want to be subscribed.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR makes JitOptimizeAwait a regular JIT configuration option instead of a release-only switch and updates the importer to apply await optimization by default in release builds.

  • Changed the configuration macro for JitOptimizeAwait in jitconfigvalues.h
  • Updated importer.cpp to remove the release-only guard around JitOptimizeAwait

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
src/coreclr/jit/jitconfigvalues.h Changed JitOptimizeAwait from a RELEASE_CONFIG_INTEGER to an OPT_CONFIG_INTEGER
src/coreclr/jit/importer.cpp Wrapped the JitOptimizeAwait() check under #ifdef DEBUG, enabling the optimization in release
Comments suppressed due to low confidence (2)

src/coreclr/jit/jitconfigvalues.h:587

  • [nitpick] Since JitOptimizeAwait is now a regular configurable option, consider updating any related documentation or comments to reflect its broader availability beyond release switches.
OPT_CONFIG_INTEGER(JitOptimizeAwait, "JitOptimizeAwait", 1) // Perform optimization of Await intrinsics

src/coreclr/jit/importer.cpp:9105

  • Removing the runtime check for JitOptimizeAwait() in release causes impMatchTaskAwaitPattern to run on every async method, which may impact JIT throughput; please benchmark or consider retaining a lightweight guard.
                    if (compIsAsync())

@VSadov VSadov force-pushed the JitOptimizeAwait branch from 4ee646e to 2c88aac Compare July 14, 2025 19:17
@VSadov VSadov enabled auto-merge (squash) July 14, 2025 19:18
@VSadov VSadov disabled auto-merge July 15, 2025 15:40
@VSadov
Copy link
Member Author

VSadov commented Jul 15, 2025

/ba-g Android timeout

@VSadov VSadov merged commit 516ec66 into dotnet:main Jul 15, 2025
109 of 111 checks passed
@github-actions github-actions bot locked and limited conversation to collaborators Aug 15, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[RuntimeAsync] Remove JitOptimizeAwait knob (or make checked), eventually.

2 participants