Replies: 2 comments 5 replies
-
No, because JIT compilation is incremental. Any untouched code is seen as newly loaded.
It isn't feasible at JIT time due to its cost. Presumably some metadata information can be gathered at build time and helps the optimization with JIT, but turning the runtime to run in AOT way is a strong prerequisite. |
Beta Was this translation helpful? Give feedback.
-
I believe ILC (which drives the jit in NAOT compilation) already does some of this sort of analysis, eg sealing types that are not further derived from. There has been some preliminary discussion about approaches to building inteprocedural capabilities in the JIT for NAOT and (perhaps as hints) for the full runtime. With any luck we'll have something we can share before too long. |
Beta Was this translation helpful? Give feedback.
-
@stephentoub mentions:
Could the compiler have a flag for building JITted application (non-NativeAOT) indicating that the compiler sees the whole application? Meaning, that the application does not load assemblies that are not part of the build.
Would that enable some optimizations for the JITted apps? (like knowing all the types or if a type is used or not etc., devirtualization etc.)
Beta Was this translation helpful? Give feedback.
All reactions