[mono] Don't use recursion in mono_ssa_rename_vars#61677
Merged
radekdoulik merged 4 commits intodotnet:mainfrom Nov 23, 2021
Merged
[mono] Don't use recursion in mono_ssa_rename_vars#61677radekdoulik merged 4 commits intodotnet:mainfrom
radekdoulik merged 4 commits intodotnet:mainfrom
Conversation
Implements dotnet#60266 Avoid deep recursion in mono_ssa_rename_vars, change the way we traverse dominated bb's. Instead of using recursion, use stack like array to store information about stack history and the traversal. The performance remains the same (or is slightly better) than before. Times for the compilation of repro from dotnet#57141 (JIT time minimum from 5 runs): Before: LLVM output file: './Uno.UI.FluentTheme.dll.bc.tmp'. JIT time: 4810 ms, Generation time: 2040 ms, Assembly+Link time: 2 ms. After: LLVM output file: './Uno.UI.FluentTheme.dll.bc.tmp'. JIT time: 4781 ms, Generation time: 2017 ms, Assembly+Link time: 2 ms.
lewing
approved these changes
Nov 17, 2021
Member
lewing
left a comment
There was a problem hiding this comment.
This looks ok to me, it would be nice if someone on the runtime side took look.
Member
|
/azp run runtime-manual |
|
Azure Pipelines successfully started running 1 pipeline(s). |
Member
|
/azp run runtime-manual |
|
Azure Pipelines successfully started running 1 pipeline(s). |
Contributor
imhameed
suggested changes
Nov 22, 2021
Contributor
There was a problem hiding this comment.
Looks fine. I've added some minor stylistic suggestions. And it would be nice if we had a dedicated dynamic array data structure (instead of needing to roll one from scratch, like is done here), but I don't think this PR should be blocked on that.
Co-authored-by: imhameed <imhameed@microsoft.com>
imhameed
approved these changes
Nov 23, 2021
This was referenced Nov 29, 2021
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
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Implements #60266
Avoid deep recursion in
mono_ssa_rename_vars, change the way we traversedominated bb's. Instead of using recursion, use stack-like array to
store information about stack history and the traversal.
The performance remains the same (or is slightly better) than before.
Times for the compilation of repro from #57141
(JIT time minimum from 5 runs):
Before:
After: