-
Notifications
You must be signed in to change notification settings - Fork 4.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[llvm] Fix LLVM JIT when used with multiple AppDomains. (#32219)
We currently reuse LLVM's command line parsing system to configure and enable passes. When using the default code generator pass configuration, the `ImplicitNullChecks` and `X86CallFrameOptimization` passes can only be enabled or disabled via the command line argument parser: the `cl::opt`s controlling these (and many other) passes are private to their translation units, and `TargetPassConfig`/`X86PassConfig` read from these `cl::opt`s with no other means to override these values. Unfortunately, some LLVM command line options have restrictions on the number of times they may be set, and running the LLVM command line argument parser more than once can fail, because the 'number of occurrences' counter is stored in each global `cl::opt`. This causes several tests to fail--one such test is unhandled-exception-7.cs. This change: - removes the lazy LLVM JIT initialization logic and instead runs this initialization once during `mini_init`, - moves some stray JIT-only code from mini-llvm.c to llvm-jit.cpp, - wraps the declarations in domain-internals.h with a `G_BEGIN_DECLS`/`G_END_DECLS` pair, so that they avoid name mangling when included in C++ source, and - removes `exception_cb` and `emitted_cb`: neither were actually used by live code.
- Loading branch information
1 parent
7c459ce
commit d4b06b1
Showing
7 changed files
with
67 additions
and
154 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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