Skip to content

JIT: Remove VNFOA_SharedStatic, ValueNumStore::IsSharedStatic, and shared-static column from valuenumfuncs.h#126796

Open
Copilot wants to merge 4 commits intomainfrom
copilot/remove-vnfoa-sharedstatic
Open

JIT: Remove VNFOA_SharedStatic, ValueNumStore::IsSharedStatic, and shared-static column from valuenumfuncs.h#126796
Copilot wants to merge 4 commits intomainfrom
copilot/remove-vnfoa-sharedstatic

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Apr 11, 2026

  • Remove VNFOA_SharedStatic enum value, shift constant, and static_assert from valuenum.h
  • Remove IsSharedStatic(ValueNum vn) declaration and implementation
  • Remove sharedStatic parameter from GetOpAttribsForFunc and all ValueNumFuncDef macros
  • Remove the last column (is-shared-static) from all entries in valuenumfuncs.h
  • Fix clang-format errors: collapse GetOpAttribsForFunc signature to single line, collapse ValueNumFuncDef table-init macro to single line, fix trailing whitespace in validation macro, wrap long comment in valuenumfuncs.h
  • Build verified (release + checked, 0 warnings, 0 errors)

…static column from valuenumfuncs.h

Agent-Logs-Url: https://github.com/dotnet/runtime/sessions/e3e4eb92-f590-4ca6-b837-014040cf3e03

Co-authored-by: EgorBo <523221+EgorBo@users.noreply.github.com>
@EgorBo EgorBo marked this pull request as ready for review April 11, 2026 20:12
Copilot AI review requested due to automatic review settings April 11, 2026 20:12
@github-actions github-actions bot added the area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI label Apr 11, 2026
@dotnet-policy-service
Copy link
Copy Markdown
Contributor

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

Copy link
Copy Markdown
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 removes an unused “shared-static” value-numbering function attribute from the CoreCLR JIT value numbering infrastructure, simplifying the VN function metadata and related tables.

Changes:

  • Removes VNFOA_SharedStatic / related shift + asserts and drops ValueNumStore::IsSharedStatic.
  • Updates ValueNumFuncDef macro shape and GetOpAttribsForFunc to no longer carry the shared-static boolean.
  • Updates valuenumfuncs.h entries (including HW intrinsic expansions) to remove the final boolean column.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.

File Description
src/coreclr/jit/valuenumfuncs.h Drops the shared-static column from all ValueNumFuncDef entries and updates the header comment accordingly.
src/coreclr/jit/valuenum.h Removes the shared-static op-attrib bit and the IsSharedStatic API, and updates the ValueNumFuncDef macro signature.
src/coreclr/jit/valuenum.cpp Removes IsSharedStatic implementation and updates op-attrib generation/validation/name macros for the new ValueNumFuncDef shape.

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings April 11, 2026 20:43
Copy link
Copy Markdown
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 removes an unused “shared static” value-numbering attribute and all associated plumbing in the CoreCLR JIT value numbering subsystem, simplifying the VN function metadata macros and attribute encoding.

Changes:

  • Removed VNFOA_SharedStatic (and shift/static_assert) and the unused ValueNumStore::IsSharedStatic(ValueNum) API.
  • Simplified VN function attribute computation by dropping the sharedStatic parameter from GetOpAttribsForFunc and ValueNumFuncDef macro usage.
  • Updated valuenumfuncs.h to remove the “is-shared-static” column from all ValueNumFuncDef entries (including HW intrinsic expansions and RISC-V entries) and adjusted the header comment accordingly.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.

File Description
src/coreclr/jit/valuenumfuncs.h Removes the shared-static boolean column from ValueNumFuncDef entries and updates the header comment.
src/coreclr/jit/valuenum.h Drops the VNFOA_SharedStatic flag/shift/assert, removes IsSharedStatic declaration, and updates ValueNumFuncDef macro signature.
src/coreclr/jit/valuenum.cpp Removes IsSharedStatic implementation and threads the reduced ValueNumFuncDef/GetOpAttribsForFunc signatures through attribute tables and debug helpers.

@EgorBo
Copy link
Copy Markdown
Member

EgorBo commented Apr 11, 2026

@copilot please fix formatting errors:

clang-format: there are formatting errors in /__w/runtime/runtime/runtime/src/coreclr/jit/valuenum.cpp
At Line 10599 Before:
/* static */ constexpr uint8_t ValueNumStore::GetOpAttribsForFunc(int  arity,
After:
/* static */ constexpr uint8_t ValueNumStore::GetOpAttribsForFunc(int arity,
At Line 10599 Before:
/* static */ constexpr uint8_t ValueNumStore::GetOpAttribsForFunc(int arity,
                                                                  bool commute,
After:
/* static */ constexpr uint8_t ValueNumStore::GetOpAttribsForFunc(int arity, bool commute,
At Line 10599 Before:
/* static */ constexpr uint8_t ValueNumStore::GetOpAttribsForFunc(int arity, bool commute,
                                                                  bool knownNonNull)
After:
/* static */ constexpr uint8_t ValueNumStore::GetOpAttribsForFunc(int arity, bool commute, bool knownNonNull)
At Line 10613 Before:
#define ValueNumFuncDef(vnf, arity, commute, knownNonNull)                                                               \
    GetOpAttribsForFunc(arity, commute, knownNonNull),
After:
#define ValueNumFuncDef(vnf, arity, commute, knownNonNull) GetOpAttribsForFunc(arity, commute, knownNonNull),
At Line 10668 Before:
#define ValueNumFuncDef(vnf, arity, commute, knownNonNull)                                                               \
    if (commute)                                                                                                       \
After:
#define ValueNumFuncDef(vnf, arity, commute, knownNonNull)                                                             \
    if (commute)                                                                                                       \


clang-format: there are formatting errors in /__w/runtime/runtime/runtime/src/coreclr/jit/valuenumfuncs.h
At Line 5 Before:
// ValueNumFuncDef(<name of function>, <arity (-1, 0-4; -1 for variadic HW intrinsics)>, <is-commutative (for arity = 2)>, <non-null (for gc functions)>)
After:
// ValueNumFuncDef(<name of function>, <arity (-1, 0-4; -1 for variadic HW intrinsics)>, <is-commutative (for arity =
// 2)>, <non-null (for gc functions)>)

Clang-format found formatting errors.

Copy link
Copy Markdown
Contributor Author

Copilot AI commented Apr 11, 2026

@copilot please fix formatting errors:

clang-format: there are formatting errors in /__w/runtime/runtime/runtime/src/coreclr/jit/valuenum.cpp

...

Fixed in 95c733b — collapsed GetOpAttribsForFunc signature to single line, collapsed the ValueNumFuncDef table-init macro to single line, fixed trailing whitespace in the validation macro, and wrapped the long comment in valuenumfuncs.h.

Copilot AI review requested due to automatic review settings April 12, 2026 18:20
Copy link
Copy Markdown
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 simplifies JIT value-numbering metadata by removing the unused “shared static” attribute plumbing from VN function definitions and associated tables, reducing table width and related helper APIs.

Changes:

  • Remove VNFOA_SharedStatic (enum value, shift, and static_assert) and drop the ValueNumStore::IsSharedStatic API.
  • Update GetOpAttribsForFunc and all ValueNumFuncDef macro definitions/usages to remove the sharedStatic parameter.
  • Update valuenumfuncs.h to remove the shared-static column from all entries and adjust related comments/formatting.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.

File Description
src/coreclr/jit/valuenumfuncs.h Drops the shared-static column from all ValueNumFuncDef entries and updates the header comment accordingly.
src/coreclr/jit/valuenum.h Removes VNFOA_SharedStatic, its shift/assert, and the IsSharedStatic declaration; updates ValueNumFuncDef macro signature.
src/coreclr/jit/valuenum.cpp Removes IsSharedStatic implementation; updates GetOpAttribsForFunc signature and all ValueNumFuncDef table/macro uses.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants