Stop building JIT as altjit or not altjit #41643
Labels
area-CodeGen-coreclr
CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI
Milestone
Currently, a JIT is built with the
ALT_JIT
define if it is intended to be used as an "altjit". Only when this is defined can a JIT defineopts.altJit
totrue
. This alters what functions are compiled by the JIT, and whatCOMPlus
variables apply to the JIT versus the non-altjit.This is problematic because we would like to be able to use any JIT in "altjit position" without this special build.
Proposal: the determination about whether a JIT is an altjit should be made via the JIT/EE interface. When the VM invokes the JIT, such as
invokeCompileMethodHelper
, it knows it is invoking an altjit:It should either tell the JIT (probably by a new method in the
ICorJitCompiler
interface; we typically can't change thecompileMethod
signature), or the JIT should use a callback on the JIT/EE interface to ask if it is an altjit.This should help scenarios such as crossgen2, where all the cross-compilers could be built as "normal" JITs, and used both for crossgen2 cross-compilation as well as in altjit position for SuperPMI, for example. See #41126.
category:implementation
theme:altjit
skill-level:beginner
cost:small
The text was updated successfully, but these errors were encountered: