Crossgen2 pipeline optimize (#51154)
authort-mustafin <66252296+t-mustafin@users.noreply.github.com>
Mon, 10 May 2021 19:43:32 +0000 (22:43 +0300)
committerGitHub <noreply@github.com>
Mon, 10 May 2021 19:43:32 +0000 (12:43 -0700)
commit4e2e990229f27b4200249f08e6789f1fe3dbd54c
tree8a7726387539ca7ffce6713578d4bcac55a27f5f
parentf525dcd5d4abef2925a6004149872e03b1135dfa
Crossgen2 pipeline optimize (#51154)

* Initial implementation of crossgen2 pipeline mode

- 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.

* [crossgen2] Optimize pipeline mode

Load input and reference modules only once by crossgen2 start.

Signed-off-by: Timur Mustafin <t.mustafin@partner.samsung.com>
* Feedback: make typeSystemContext with opened files

Construct new typeSystemContext with already opened PEReaders and PDBReaders.

Signed-off-by: Timur Mustafin <t.mustafin@partner.samsung.com>
Co-authored-by: Gleb Balykov <g.balykov@samsung.com>
src/coreclr/tools/Common/Compiler/CompilerTypeSystemContext.cs
src/coreclr/tools/aot/ILCompiler.ReadyToRun/Compiler/ReadyToRunCodegenCompilationBuilder.cs
src/coreclr/tools/aot/ILCompiler.ReadyToRun/Compiler/ReadyToRunCompilerContext.cs
src/coreclr/tools/aot/crossgen2/CommandLineOptions.cs
src/coreclr/tools/aot/crossgen2/Program.cs
src/coreclr/tools/aot/crossgen2/Properties/Resources.resx