-
Notifications
You must be signed in to change notification settings - Fork 4.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adding new ReadyToRun helper for static cctor (#76898)
* Adding new ReadyToRun helper for static cctor When accessing a static field the static cctor of the class is called. Then the helper CORINFO_HELP_READYTORUN_STATIC_BASE was printed twice during the same block, the first for the cctor and the second for the getter, as if they were two calls for the same method. * Removing helper CORINFO_HELP_STRCNS_CURRENT_MODULE * Removing CORINFO_HELP_STRCNS_CURRENT_MODULE * Changing TYP_BYREF to TYP_VOID * Formatting files * Splitting up R2R STATIC_BASE in more helpers * Updating STATIC_BASE R2R helper with new helpers * Extending getReadyToRunHelper support Consider the new R2R helpers that were group in CORINFO_HELP_READYTORUN_STATIC_BASE. * Keeping the preffered R2R helper constructor In some cases the R2R helpers already call to the constructor. In those cases we can insert a repeated call that will be eliminated by CSE. There are still cases in which we may need to call the constructor. * Extending value numbering with new helpers * Renaming helper * Replacing STATIC_BASE helper in ilc for NON_GC * Fixing helper order * Refactoring code * Supporting R2R_STATIC_BASE helper in nativeaot * Moving compiler var initialization to compCompile * Using new helper names in ILC * Encapsulating common method * Removing CORINFO_HELP_READYTORUN_STATIC_BASE helper * Removing comment * Moving new helper function to shared code * Setting undef helper as default * Repeating same helper call for CSE optimization Avoid hardcoding the Non-GC helper call, which is used just to trigger the constructor if it is needed, and use the existing helper call in the code, so CSE would persist only one. * Update src/coreclr/jit/compiler.cpp Co-authored-by: Jakob Botsch Nielsen <Jakob.botsch.nielsen@gmail.com> * Update src/coreclr/tools/Common/Compiler/DependencyAnalysis/CorInfoHelpers.cs Co-authored-by: Jakob Botsch Nielsen <Jakob.botsch.nielsen@gmail.com> * Update src/coreclr/tools/aot/ILCompiler.RyuJit/JitInterface/CorInfoImpl.RyuJit.cs Co-authored-by: Michal Strehovský <MichalStrehovsky@users.noreply.github.com> * Update src/coreclr/tools/aot/ILCompiler.ReadyToRun/JitInterface/CorInfoImpl.ReadyToRun.cs Co-authored-by: Michal Strehovský <MichalStrehovsky@users.noreply.github.com> * Formatting jithelpers.h * Renaming function * Moving CorInfoHelper function to R2R/AOT interface * Updating preferred helper when is not thread type * Removing some helper value nums Static base helper was removed and cctor returns void. * Formatting file * Ensuring void return when the helper is cctor * Updating preferred helper when when classes matches * Removing cctor trigger helper from aot,vm and jit * Updating m_prefferedInitCctor default value It is initialized with CORINFO_HELP_UNDEF and set to R2R GC or NON GC Static Base later. * Updating comments * Updating comments Co-authored-by: Brian Bohe <brianbohe@microsoft.com> Co-authored-by: Jakob Botsch Nielsen <Jakob.botsch.nielsen@gmail.com> Co-authored-by: Michal Strehovský <MichalStrehovsky@users.noreply.github.com>
- Loading branch information
1 parent
ba3ee73
commit c635ae2
Showing
16 changed files
with
138 additions
and
47 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.