diff options
author | Michal Strehovský <MichalStrehovsky@users.noreply.github.com> | 2017-06-15 05:05:12 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-06-15 05:05:12 +0300 |
commit | c81b2daed7a1afc1152ac6f7f4d8646e55682236 (patch) | |
tree | 706ce0db8a3a2c1626fc2f4baa792de17fb3d0a9 /src/ILCompiler.CppCodeGen | |
parent | 962401ec638db2073d16d45eb8e0b1a3167452ba (diff) |
Enable IL scanner and use it to provide VTable information (#3884)
This exposes a command line switch to enable IL scanner. When IL scanner is enabled, it determines the shape of all VTables to be used during compilation, allowing codegen to generate inline vtable lookups (instead of calling an assembly helper that does the lookup).
* Factoring of Compilation and ILScanner so that they both can provide lists of compiled methods and generated EETypes
* `IMethodBodyNode` to mark the node that represents a method body in a given compilation.
* Diff the results of scanning and compilation phases to find potential issues in the scanner.
* Native layout is asking for vtables of RuntimeDetermined things. Switching it over to ask for the canon versions.
Known analysis discrepancies:
* SIMD intrinsics not getting recognized as intrinsics in the scanner. There's just too many of them. Worked around by ignoring all scan/compilation diffs in the SIMD module.
* Type system entities injected by interop/reflection not surviving across scan/compile phases. For now, ignoring them under an active issue (#3873)
Diffstat (limited to 'src/ILCompiler.CppCodeGen')
-rw-r--r-- | src/ILCompiler.CppCodeGen/src/Compiler/CppCodegenCompilation.cs | 2 | ||||
-rw-r--r-- | src/ILCompiler.CppCodeGen/src/Compiler/DependencyAnalysis/CppMethodCodeNode.cs | 2 |
2 files changed, 3 insertions, 1 deletions
diff --git a/src/ILCompiler.CppCodeGen/src/Compiler/CppCodegenCompilation.cs b/src/ILCompiler.CppCodeGen/src/Compiler/CppCodegenCompilation.cs index 6abae2392..83efd8e69 100644 --- a/src/ILCompiler.CppCodeGen/src/Compiler/CppCodegenCompilation.cs +++ b/src/ILCompiler.CppCodeGen/src/Compiler/CppCodegenCompilation.cs @@ -50,6 +50,8 @@ namespace ILCompiler { _cppWriter = new CppWriter(this, outputFile); + _dependencyGraph.ComputeMarkedNodes(); + var nodes = _dependencyGraph.MarkedNodeList; _cppWriter.OutputCode(nodes, NodeFactory); diff --git a/src/ILCompiler.CppCodeGen/src/Compiler/DependencyAnalysis/CppMethodCodeNode.cs b/src/ILCompiler.CppCodeGen/src/Compiler/DependencyAnalysis/CppMethodCodeNode.cs index aa29a89b9..16ab08d5d 100644 --- a/src/ILCompiler.CppCodeGen/src/Compiler/DependencyAnalysis/CppMethodCodeNode.cs +++ b/src/ILCompiler.CppCodeGen/src/Compiler/DependencyAnalysis/CppMethodCodeNode.cs @@ -13,7 +13,7 @@ using Internal.TypeSystem; namespace ILCompiler.DependencyAnalysis { - internal class CppMethodCodeNode : DependencyNodeCore<NodeFactory>, IMethodNode + internal class CppMethodCodeNode : DependencyNodeCore<NodeFactory>, IMethodBodyNode { private MethodDesc _method; private string _methodCode; |