-
Notifications
You must be signed in to change notification settings - Fork 5.3k
Add IsKnownConstant jit helper and optimize 'str == ""' with str.StartsWith('c') #63734
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 6 commits
Commits
Show all changes
26 commits
Select commit
Hold shift + click to select a range
9f55fa6
Don't reuse args in EnC
EgorBo 7d3ef94
Merge branch 'main' of https://github.com/dotnet/runtime into fix-enc…
EgorBo 0a717aa
Introduce RuntimeHelpers.IsKnownConstant and use for 'str == ""'
EgorBo 407a953
Remove unrelated change, add gtFoldExpr
EgorBo 9d45461
Also, optimize String.StartsWith
EgorBo 2f8a034
Update comment
EgorBo 4883a46
Update src/libraries/System.Private.CoreLib/src/System/String.Compari…
EgorBo aa88cf9
Delay expansion to morph, replace generic signature with overloads
EgorBo 64843f0
Merge branch 'jit-isknownconstant' of https://github.com/EgorBo/runti…
EgorBo 2ebdae9
Make string overload nullable
EgorBo e264d27
Use GTF_ALL_EFFECT
EgorBo f08a182
Address feedback
EgorBo 8e5fd0d
fix copy-paste
EgorBo e2ebf30
Update src/coreclr/jit/compiler.hpp
EgorBo 895abc4
Update src/coreclr/jit/compiler.hpp
EgorBo 45bfe7c
Address feedback
EgorBo 80f9ddd
Remove [MethodImpl(MethodImplOptions.AggressiveInlining)], handle it …
EgorBo eebd8d1
clean up
EgorBo e0e3e51
Only boost for constant-arg cases
EgorBo 5b2fbfe
Remove redundant opts.OptimizationEnabled()s
EgorBo 30e1855
Update importer.cpp
EgorBo 3cb8402
Update String.Comparison.cs
EgorBo 7c7c264
Update String.Comparison.cs
EgorBo a9b85fc
Add tests
EgorBo a3e5f3c
Merge branch 'jit-isknownconstant' of https://github.com/EgorBo/runti…
EgorBo 4947947
Fix unrelated invalid IR, we should not import TYP_USHORT constant
EgorBo File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.