Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LLVM: Activate typed pointers through the API instead of a global option. #51840

Merged
merged 3 commits into from
Oct 25, 2023
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 0 additions & 11 deletions src/codegen.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9310,17 +9310,6 @@ extern "C" void jl_init_llvm(void)
if (clopt && clopt->getNumOccurrences() == 0)
cl::ProvidePositionalOption(clopt, "4", 1);

maleadt marked this conversation as resolved.
Show resolved Hide resolved
#if JL_LLVM_VERSION >= 150000
clopt = llvmopts.lookup("opaque-pointers");
if (clopt && clopt->getNumOccurrences() == 0) {
#ifdef JL_LLVM_OPAQUE_POINTERS
cl::ProvidePositionalOption(clopt, "true", 1);
#else
cl::ProvidePositionalOption(clopt, "false", 1);
#endif
}
#endif

jl_ExecutionEngine = new JuliaOJIT();

bool jl_using_gdb_jitevents = false;
Expand Down
6 changes: 6 additions & 0 deletions src/jitlayers.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1629,6 +1629,12 @@ JuliaOJIT::JuliaOJIT()
DLSymOpt(std::make_unique<DLSymOptimizer>(false)),
ContextPool([](){
auto ctx = std::make_unique<LLVMContext>();
if (!ctx->hasSetOpaquePointersValue())
vtjnash marked this conversation as resolved.
Show resolved Hide resolved
#ifndef JL_LLVM_OPAQUE_POINTERS
ctx->setOpaquePointers(false);
#else
ctx->setOpaquePointers(true);
#endif
maleadt marked this conversation as resolved.
Show resolved Hide resolved
maleadt marked this conversation as resolved.
Show resolved Hide resolved
return orc::ThreadSafeContext(std::move(ctx));
}),
#ifdef JL_USE_JITLINK
Expand Down