Crossgen2 pipeline optimize#51154
Merged
davidwrighton merged 3 commits intodotnet:mainfrom May 10, 2021
Merged
Conversation
- Add --out-near-input option, which adds .ni. suffix to input filepath and stores resulting ni.dll near original dll. In this mode --out option can be skipped. - Add --single-file-compilation mode, which allows to compile all input files separately.
Load input and reference modules only once by crossgen2 start. Signed-off-by: Timur Mustafin <[email protected]>
jkotas
reviewed
Apr 13, 2021
Contributor
Author
|
Speedscope performance profiles of Pipeline and Pipeline optimized states. |
Contributor
Author
|
Feedback time:
|
0097096 to
d70569a
Compare
src/coreclr/tools/aot/ILCompiler.ReadyToRun/Compiler/ReadyToRunCompilerContext.cs
Outdated
Show resolved
Hide resolved
Construct new typeSystemContext with already opened PEReaders and PDBReaders. Signed-off-by: Timur Mustafin <[email protected]>
d70569a to
6ad1935
Compare
Member
|
assume this is good to merge? |
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.
This commit optimizes crossgen2 pipeline mode described in #37411. The optimization consists of loop-invariant-code-motion: move input dll loading out from loop.
Crossgen2 compilation of system dlls time compare
Time measurement details
Time is first
realline oftimecommand output.Script
Command line to measure time:
ngen_r2r.shfirst compilesSystem.Private.CoreLib.dll, thencrossgen2/*.dll, then all other dlls.Runtime state is 8fc5789.
Pipeline
Command line to measure time:
Runtime state as in script + Initial implementation of crossgen2 pipeline mode.
Pipeline optimize
Same cmdline as Pipeline.
Runtime state as in pipeline + [crossgen2] Optimize pipeline mode.
Crossgen2 compilation of system dlls time compare with options
--inputbubble --compilebubblegenericsTime measurement details
Script
Command line to measure time:
Script for armel compiles
ILCompiler.ReadyToRun.dllandILCompiler.TypeSystem.ReadyToRun.dllwithout--inputbubble --compilebubblegenericsdue to issue #48466.Pipeline
Command line to measure time:
Pipeline optimize
Same cmdline as Pipeline.
As part of work on pipeline mode we fixed a memory leak #49764, it allows us to finish compilation of all system dlls at one crossgen2 start and obtain time compare.
cc @jkotas @davidwrighton @MichalStrehovsky @gbalykov @alpencolt