Skip to content
Merged
Show file tree
Hide file tree
Changes from 76 commits
Commits
Show all changes
77 commits
Select commit Hold shift + click to select a range
70db9ab
Add jl_invoke_api_t enum and use it in staticdata.c
xal-0 Oct 21, 2025
341bf40
Set JL_CI_FLAGS_SPECPTR_SPECIALIZED only on specsig in jl_update_all_…
xal-0 Oct 21, 2025
580d5e5
[JIT] Switch to post-compile linking
xal-0 Nov 4, 2025
da849ec
Add CodegenParams.unique_names so they can be enabled in llvmpasses t…
xal-0 Nov 4, 2025
f8ab8e9
Fix timing_print_module_names not capturing JL_TIMING_DEFAULT_BLOCK
xal-0 Nov 4, 2025
c88e5eb
Merge remote-tracking branch 'upstream/master' into local-names-linking
xal-0 Nov 13, 2025
91ea524
Use hand-written PLT thunks
xal-0 Nov 18, 2025
879d0c0
Merge remote-tracking branch 'upstream/master' into local-names-linking
xal-0 Nov 18, 2025
5f4a808
Use fallback PLT for i386
xal-0 Nov 19, 2025
7cb4632
Don't add Attribute::Naked unless using inline assembly PLT thunk
xal-0 Nov 19, 2025
f81c77b
Use TCK_MustTail in fallback PLT thunk
xal-0 Nov 19, 2025
6e05524
Merge remote-tracking branch 'upstream/master' into local-names-linking
xal-0 Nov 20, 2025
b924155
Remove jl_link_global emulation from jl_get_llvmf_defn_impl
xal-0 Nov 25, 2025
be9d60b
Merge remote-tracking branch 'upstream/master' into local-names-linking
xal-0 Dec 1, 2025
efdd5e9
Re-enable DLSymOptimizer for the time being
xal-0 Dec 11, 2025
4dc5ff6
Merge remote-tracking branch 'upstream/master' into local-names-linking
xal-0 Dec 11, 2025
1646f8e
Re-add JL_NOTSAFEPOINT_LEAVE/ENTER annotations on optimizeDLSyms
xal-0 Dec 11, 2025
84ba70d
Remove redundant separators between name and unique number; fix names…
xal-0 Dec 12, 2025
ed7c0ff
One extra fix for the names.jl llvmpass test
xal-0 Dec 12, 2025
5c6aec1
Remove Attribute::NoUnwind on new modules, generate for PLT thunks
xal-0 Dec 18, 2025
45db5fd
Allow inlining of PLT thunks if no efficient version is available
xal-0 Jan 7, 2026
744b80b
Generate trampolines for args1 -> specsig case in linkCallTarget
xal-0 Jan 16, 2026
b41456d
Annotate JuliaOJIT to reflect that we safepoint in materilization
xal-0 Jan 16, 2026
5a12aeb
Suppress silly -Werror=maybe-uninitialized
xal-0 Jan 16, 2026
0111742
Merge remote-tracking branch 'upstream/master' into local-names-linking
xal-0 Jan 16, 2026
f340ef7
Suppress GCChecker error on ExecutionSession::reportError
xal-0 Jan 16, 2026
f33ba41
Revert "Annotate JuliaOJIT to reflect that we safepoint in materiliza…
xal-0 Jan 16, 2026
51f6597
Release engine_lock, exit gc_safe region after compiling CIs
xal-0 Jan 16, 2026
343fea9
Add JLTrampolineMaterializationUnit, move compilation to materilize
xal-0 Jan 17, 2026
396fb87
Don't leave JuliaTaskDispatcher::work_until until all tasks finish
xal-0 Jan 21, 2026
a92c9cc
Set codeinst->time_compile once again
xal-0 Jan 21, 2026
18e4570
Use only jl_code_info_t from codeinfos in emit_always_inline (aotcomp…
xal-0 Jan 21, 2026
f4ddeb0
Merge remote-tracking branch 'upstream/master' into local-names-linking
xal-0 Jan 21, 2026
18083e8
Use global TaskQueue in JuliaTaskDispatcher, help other threads
xal-0 Jan 21, 2026
4045f73
Fail with better error when symbol lookup/compile fails; don't abort
xal-0 Jan 22, 2026
0933257
Simplify JuliaTaskDispatcher to avoid deadlock
xal-0 Jan 23, 2026
df93b85
Enter GC safe state when waiting in JuliaTaskDispatcher; fix GCChecker
xal-0 Jan 23, 2026
36404a6
Fix error message capturing Exports by reference (outside of lifetime)
xal-0 Jan 23, 2026
8eea69a
Re-enable optimizeDLSyms in the JIT
xal-0 Jan 26, 2026
72c66d9
Merge remote-tracking branch 'upstream/master' into local-names-linking
xal-0 Jan 27, 2026
d852c9b
Ignore sections of materialize() in GCChecker
xal-0 Jan 27, 2026
62c7451
Use a better symbol for tojlinvoke trampolines
xal-0 Jan 28, 2026
26655f0
Merge remote-tracking branch 'upstream/master' into local-names-linking
xal-0 Jan 29, 2026
a663f80
Attempt to detect deadlocks in JuliaTaskDispatcher
xal-0 Jan 29, 2026
338e0ee
Call set_value on promise even when lookup fails
xal-0 Jan 30, 2026
23c025c
Print error in JuliaOJIT::publishCIs
xal-0 Jan 30, 2026
fc54412
Hold LinkerMutex when it would be wrong for another thread to see the…
xal-0 Jan 30, 2026
0a659d3
Hold lock when checking future readiness
xal-0 Jan 31, 2026
708bf78
Remove broken deadlock detection from JuliaTaskDispatcher
xal-0 Jan 31, 2026
ee54f91
Add LinkerMutex to devdocs
xal-0 Feb 6, 2026
862a177
Disable JuliaTaskDispatcher::shutdown()
xal-0 Feb 10, 2026
914864c
Remove unused code for assertions
xal-0 Feb 10, 2026
6d4fb76
Merge branch 'master' into local-names-linking
xal-0 Feb 10, 2026
814f309
Remove TODO
xal-0 Feb 11, 2026
13e2328
When allocating a new CodeInstance, remove it from CISymbols
xal-0 Feb 12, 2026
f0c1ca5
Remove misleading jl_emit_oc_wrapper comments
xal-0 Feb 13, 2026
3973bcc
Add jl_jit_unregister_ci, and use it in jl_eval_thunk instead
xal-0 Feb 13, 2026
7ba4fba
Remove JuliaOJIT::addModule (unused)
xal-0 Feb 13, 2026
886af4f
Call jl_jit_unregister_ci even when throwing an exception
xal-0 Feb 13, 2026
081bb57
Mark jl_jit_unregister_mi as JL_NOTSAFEPOINT
xal-0 Feb 14, 2026
0b6e2b1
Update some out-of-date comments
xal-0 Feb 18, 2026
6bde4ea
Merge remote-tracking branch 'upstream/master' into local-names-linking
xal-0 Feb 18, 2026
603724c
Don't store references to call_targets in queue, since we may rehash
xal-0 Feb 18, 2026
5dffc89
Check return value of JIT.compileModule for failure in JLMaterializat…
xal-0 Feb 18, 2026
b3851a7
Check invoke_api in CISymbols before returning from linkCallTarget
xal-0 Feb 18, 2026
b2b42af
In jl_codegen_output_t, don't keep reference to owned TSM
xal-0 Feb 18, 2026
4ad8884
Add assertion to aot_link_output for documentation reasons
xal-0 Feb 18, 2026
175e0eb
Unregister toplevel CodeInstances before invoking, add tests
xal-0 Feb 19, 2026
70a5f23
Fix broken BuiltinInvokeTag check in get_item_for_reloc
xal-0 Feb 19, 2026
03dd273
Call jl_do_dump_compile in GC-unsafe region
xal-0 Feb 19, 2026
816e912
Remove some unused variables
xal-0 Feb 19, 2026
b6734b1
Remove commented-out jl_using_gdb_jitevents in JL_DEBUG_BUILD
xal-0 Feb 19, 2026
42277e9
In emit_always_inline, erase old decl when emitting inline version
xal-0 Feb 19, 2026
3d0a308
Fix GCChecker eror in JLMaterializationUnit::materialize (again)
xal-0 Feb 20, 2026
d3a9be5
Save and restore errno, last_error in jl_invoke_oneshot
xal-0 Feb 20, 2026
e88a612
Merge branch 'master' into local-names-linking
xal-0 Feb 23, 2026
a1ab491
Sleep after test_gc_codeinst()
xal-0 Feb 24, 2026
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
13 changes: 11 additions & 2 deletions base/reflection.jl
Original file line number Diff line number Diff line change
Expand Up @@ -183,19 +183,28 @@ struct CodegenParams
"""
sanitize_address::Cint

"""
When enabled, generate names that are globally unique in this Julia session,
across all code generated with this flag set. Intended for llvmpasses
tests.
"""
unique_names::Cint

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is this needed? Can't we adjust the names?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's just to support a quirk of how some of the test/llvmpasses tests work. Julia compiles every CodeInstance in its own module like usual, but we link everything together with llvm-link. Without it linking fails because of multiply-defined symbols.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We could change those tests? Perhaps even an opportunity to use JuliaC?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can try adapting the tests to use local names (it should be ok to concatenate all the IR output together). When I added this I thought it might help adapt consumers of Julia-generated LLVM IR to this change. If they can be updated to local names without much effort, I'll remove this flag entirely.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The complicated consumers are GPUCompiler and especially Enzyme, happy to chat about what needs to change there when you get there


function CodegenParams(; track_allocations::Bool=true, code_coverage::Bool=true,
prefer_specsig::Bool=false,
gnu_pubnames::Bool=true, debug_info_kind::Cint = default_debug_info_kind(),
debug_info_level::Cint = Cint(JLOptions().debug_level), safepoint_on_entry::Bool=true,
gcstack_arg::Bool=true, use_jlplt::Bool=true, force_emit_all::Bool=false,
sanitize_memory::Bool=false, sanitize_thread::Bool=false, sanitize_address::Bool=false)
sanitize_memory::Bool=false, sanitize_thread::Bool=false, sanitize_address::Bool=false,
unique_names::Bool=false)
return new(
Cint(track_allocations), Cint(code_coverage),
Cint(prefer_specsig),
Cint(gnu_pubnames), debug_info_kind,
debug_info_level, Cint(safepoint_on_entry),
Cint(gcstack_arg), Cint(use_jlplt), Cint(force_emit_all),
Cint(sanitize_memory), Cint(sanitize_thread), Cint(sanitize_address))
Cint(sanitize_memory), Cint(sanitize_thread), Cint(sanitize_address),
Cint(unique_names))
end
end

Expand Down
1 change: 1 addition & 0 deletions doc/src/devdocs/locks.md
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ exception frames, and taking/releasing locks.
* `jl_method_t.writelock`
* `typecache_lock`
* `libmap_lock`
* `JuliaOJIT.LinkerMutex` (`std::mutex`)

### Level 4

Expand Down
4 changes: 2 additions & 2 deletions src/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -406,7 +406,7 @@ $(BUILDDIR)/gc-alloc-profiler.o $(BUILDDIR)/gc-alloc-profiler.dbg.obj: $(SRCDIR)
$(BUILDDIR)/gc-page-profiler.o $(BUILDDIR)/gc-page-profiler.dbg.obj: $(SRCDIR)/gc-page-profiler.h
$(BUILDDIR)/init.o $(BUILDDIR)/init.dbg.obj: $(SRCDIR)/builtin_proto.h
$(BUILDDIR)/interpreter.o $(BUILDDIR)/interpreter.dbg.obj: $(SRCDIR)/builtin_proto.h
$(BUILDDIR)/jitlayers.o $(BUILDDIR)/jitlayers.dbg.obj: $(SRCDIR)/jitlayers.h $(SRCDIR)/llvm-codegen-shared.h $(SRCDIR)/llvm-julia-task-dispatcher.h
$(BUILDDIR)/jitlayers.o $(BUILDDIR)/jitlayers.dbg.obj: $(SRCDIR)/jitlayers.h $(SRCDIR)/llvm-codegen-shared.h $(SRCDIR)/julia-task-dispatcher.h
$(BUILDDIR)/jltypes.o $(BUILDDIR)/jltypes.dbg.obj: $(SRCDIR)/builtin_proto.h
$(build_shlibdir)/libllvmcalltest.$(SHLIB_EXT): $(SRCDIR)/llvm-codegen-shared.h $(BUILDDIR)/julia_version.h
$(BUILDDIR)/llvm-alloc-helpers.o $(BUILDDIR)/llvm-alloc-helpers.dbg.obj: $(SRCDIR)/llvm-codegen-shared.h $(SRCDIR)/llvm-pass-helpers.h $(SRCDIR)/llvm-alloc-helpers.h
Expand Down Expand Up @@ -552,7 +552,7 @@ ADDITIONAL_C_HEADERS := builtin_proto.h common_symbols1.inc common_symbols2.inc
support/htable.h support/htable.inc
ADDITIONAL_CXX_HEADERS := debug-registry.h debuginfo.h intrinsics.h jitlayers.h llvm-alloc-helpers.h \
llvm-codegen-shared.h llvm-gc-interface-passes.h llvm-julia-passes.inc \
llvm-julia-task-dispatcher.h llvm-pass-helpers.h passes.h processor.h
julia-task-dispatcher.h llvm-pass-helpers.h passes.h processor.h

# Included files that should be compiled using their including file's compiler settings
INCLUDED_C_FILES := \
Expand Down
819 changes: 316 additions & 503 deletions src/aotcompile.cpp

Large diffs are not rendered by default.

16 changes: 8 additions & 8 deletions src/ccall.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -91,10 +91,10 @@ static bool runtime_sym_gvs(jl_codectx_t &ctx, const native_sym_arg_t &symarg,
return false;
}

auto M = &ctx.emission_context.shared_module();
auto M = &ctx.emission_context.get_module();
bool runtime_lib = false;
GlobalVariable *libptrgv;
jl_codegen_params_t::SymMapGV *symMap;
jl_codegen_output_t::SymMapGV *symMap;
if ((intptr_t)f_lib == (intptr_t)JL_EXE_LIBNAME) {
libptrgv = prepare_global_in(M, jlexe_var);
symMap = &ctx.emission_context.symMapExe;
Expand Down Expand Up @@ -147,7 +147,7 @@ static bool runtime_sym_gvs(jl_codectx_t &ctx, const native_sym_arg_t &symarg,
}

static Value *runtime_sym_lookup(
jl_codegen_params_t &emission_context,
jl_codegen_output_t &emission_context,
IRBuilder<> &irbuilder,
jl_codectx_t *pctx,
const native_sym_arg_t &symarg, Function *f,
Expand Down Expand Up @@ -265,7 +265,7 @@ static GlobalVariable *emit_plt_thunk(
++PLTThunks;
bool shared = libptrgv != nullptr;
assert(shared && "not yet supported by runtime_sym_lookup");
Module *M = shared ? &ctx.emission_context.shared_module() : jl_Module;
auto M = &ctx.emission_context.get_module();
if (shared) {
assert(symarg.f_name);
libptrgv = prepare_global_in(M, libptrgv);
Expand Down Expand Up @@ -1192,7 +1192,7 @@ static jl_cgval_t emit_llvmcall(jl_codectx_t &ctx, jl_value_t **args, size_t nar
// save the module to be linked later.
// we cannot do this right now, because linking mutates the destination module,
// which might invalidate LLVM values cached in cgval_t's (specifically constant arrays)
ctx.llvmcall_modules.push_back(std::move(Mod));
ctx.emission_context.llvmcall_modules.push_back(std::move(Mod));

JL_GC_POP();

Expand Down Expand Up @@ -1257,9 +1257,9 @@ class function_sig_t {
jl_unionall_t *unionall_env; // UnionAll environment for `at` and `rt`
size_t nccallargs; // number of actual arguments
size_t nreqargs; // number of required arguments in ccall function definition
jl_codegen_params_t *ctx;
jl_codegen_output_t *ctx;

function_sig_t(const char *fname, Type *lrt, jl_value_t *rt, bool retboxed, bool gc_safe, jl_svec_t *at, jl_unionall_t *unionall_env, size_t nreqargs, CallingConv::ID cc, bool llvmcall, jl_codegen_params_t *ctx)
function_sig_t(const char *fname, Type *lrt, jl_value_t *rt, bool retboxed, bool gc_safe, jl_svec_t *at, jl_unionall_t *unionall_env, size_t nreqargs, CallingConv::ID cc, bool llvmcall, jl_codegen_output_t *ctx)
: lrt(lrt), retboxed(retboxed), gc_safe(gc_safe),
prt(NULL), sret(0), cc(cc), llvmcall(llvmcall),
at(at), rt(rt), unionall_env(unionall_env),
Expand Down Expand Up @@ -1485,7 +1485,7 @@ static bool verify_ref_type(jl_codectx_t &ctx, jl_value_t* ref, jl_unionall_t *u

static const std::string verify_ccall_sig(jl_value_t *&rt, jl_value_t *at,
jl_unionall_t *unionall_env, jl_svec_t *sparam_vals,
jl_codegen_params_t *ctx,
jl_codegen_output_t *ctx,
Type *&lrt, LLVMContext &ctxt,
bool &retboxed, bool &static_rt, bool llvmcall=false)
{
Expand Down
42 changes: 13 additions & 29 deletions src/cgutils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ AtomicOrdering get_llvm_atomic_order(enum jl_memory_order order)

// --- string constants ---
static Value *stringConstPtr(
jl_codegen_params_t &emission_context,
jl_codegen_output_t &emission_context,
IRBuilder<> &irbuilder,
const Twine &txt)
{
Expand Down Expand Up @@ -229,7 +229,7 @@ static DICompileUnit *getOrCreateJuliaCU(Module &M,
return CU;
}

static DIType *_julia_type_to_di(jl_codegen_params_t *ctx, jl_debugcache_t &debuginfo, jl_value_t *jt, DIBuilder *dbuilder, bool isboxed)
static DIType *_julia_type_to_di(jl_codegen_output_t *ctx, jl_debugcache_t &debuginfo, jl_value_t *jt, DIBuilder *dbuilder, bool isboxed)
{
jl_datatype_t *jdt = (jl_datatype_t*)jt;
if (isboxed || !jl_is_datatype(jt) || !jdt->isconcretetype)
Expand Down Expand Up @@ -568,10 +568,10 @@ static llvm::SmallVector<Value*,0> get_gc_roots_for(jl_codectx_t &ctx, const jl_

// --- emitting pointers directly into code ---

static void jl_temporary_root(jl_codegen_params_t &ctx, jl_value_t *val);
static void jl_temporary_root(jl_codegen_output_t &ctx, jl_value_t *val);
static void jl_temporary_root(jl_codectx_t &ctx, jl_value_t *val);

static Constant *julia_pgv(jl_codegen_params_t &params, Module *M, const char *cname, void *addr)
static Constant *julia_pgv(jl_codegen_output_t &params, Module *M, const char *cname, void *addr)
{
// emit a GlobalVariable for a jl_value_t named "cname"
// store the name given so we can reuse it (facilitating merging later)
Expand All @@ -580,8 +580,7 @@ static Constant *julia_pgv(jl_codegen_params_t &params, Module *M, const char *c
StringRef localname;
std::string gvname;
if (!gv) {
uint64_t id = jl_atomic_fetch_add_relaxed(&globalUniqueGeneratedNames, 1); // TODO: use params.global_targets.size()
raw_string_ostream(gvname) << cname << id;
gvname = params.make_name(cname);
localname = StringRef(gvname);
}
else {
Expand All @@ -603,7 +602,7 @@ static Constant *julia_pgv(jl_codegen_params_t &params, Module *M, const char *c
return gv;
}

static Constant *julia_pgv(jl_codegen_params_t &params, Module *M, const char *prefix, jl_sym_t *name, jl_module_t *mod, void *addr)
static Constant *julia_pgv(jl_codegen_output_t &params, Module *M, const char *prefix, jl_sym_t *name, jl_module_t *mod, void *addr)
{
// emit a GlobalVariable for a jl_value_t, using the prefix, name, and module to
// to create a readable name of the form prefixModA.ModB.name#
Expand Down Expand Up @@ -632,8 +631,9 @@ static Constant *julia_pgv(jl_codegen_params_t &params, Module *M, const char *p
}

static JuliaVariable *julia_const_gv(jl_value_t *val);
Constant *literal_pointer_val_slot(jl_codegen_params_t &params, Module *M, jl_value_t *p)
Constant *literal_pointer_val_slot(jl_codegen_output_t &params, jl_value_t *p)
{
Module *M = &params.get_module();
// emit a pointer to a jl_value_t* which will allow it to be valid across reloading code
// also, try to give it a nice name for gdb, for easy identification
if (JuliaVariable *gv = julia_const_gv(p)) {
Expand Down Expand Up @@ -743,7 +743,7 @@ static Value *literal_pointer_val(jl_codectx_t &ctx, jl_value_t *p)
{
if (p == NULL)
return Constant::getNullValue(ctx.types().T_pjlvalue);
Value *pgv = literal_pointer_val_slot(ctx.emission_context, jl_Module, p);
Value *pgv = literal_pointer_val_slot(ctx.emission_context, p);
jl_aliasinfo_t ai = jl_aliasinfo_t::fromTBAA(ctx, ctx.tbaa().tbaa_const);
auto load = ai.decorateInst(maybe_mark_load_dereferenceable(
ctx.builder.CreateAlignedLoad(ctx.types().T_pjlvalue, pgv, Align(sizeof(void*))),
Expand Down Expand Up @@ -805,9 +805,9 @@ static unsigned convert_struct_offset(jl_codectx_t &ctx, Type *lty, unsigned byt
return convert_struct_offset(ctx.builder.GetInsertBlock()->getModule()->getDataLayout(), lty, byte_offset);
}

static Type *_julia_struct_to_llvm(jl_codegen_params_t *ctx, LLVMContext &ctxt, jl_value_t *jt, bool *isboxed, bool llvmcall=false);
static Type *_julia_struct_to_llvm(jl_codegen_output_t *ctx, LLVMContext &ctxt, jl_value_t *jt, bool *isboxed, bool llvmcall=false);

static Type *_julia_type_to_llvm(jl_codegen_params_t *ctx, LLVMContext &ctxt, jl_value_t *jt, bool *isboxed, bool no_boxing)
static Type *_julia_type_to_llvm(jl_codegen_output_t *ctx, LLVMContext &ctxt, jl_value_t *jt, bool *isboxed, bool no_boxing)
{
// this function converts a Julia Type into the equivalent LLVM type
if (isboxed) *isboxed = false;
Expand Down Expand Up @@ -922,7 +922,7 @@ static StructType *get_memoryref_type(LLVMContext &ctxt, Type *T_size, const jl_
return get_jlmemoryref(ctxt, AS);
}

static Type *_julia_struct_to_llvm(jl_codegen_params_t *ctx, LLVMContext &ctxt, jl_value_t *jt, bool *isboxed, bool llvmcall)
static Type *_julia_struct_to_llvm(jl_codegen_output_t *ctx, LLVMContext &ctxt, jl_value_t *jt, bool *isboxed, bool llvmcall)
{
// this function converts a Julia Type into the equivalent LLVM struct
// use this where C-compatible (unboxed) structs are desired
Expand Down Expand Up @@ -1505,7 +1505,7 @@ static Value *emit_typeof(jl_codectx_t &ctx, const jl_cgval_t &p, bool maybenull
ptr = get_pointer_to_constant(ctx.emission_context, ConstantInt::get(expr_type, jt->smalltag << 4), Align(sizeof(jl_value_t*)), StringRef("_j_smalltag_") + jl_symbol_name(jt->name->name), *jl_Module);
}
else {
ptr = ConstantExpr::getBitCast(literal_pointer_val_slot(ctx.emission_context, jl_Module, (jl_value_t*)jt), datatype_or_p->getType());
ptr = ConstantExpr::getBitCast(literal_pointer_val_slot(ctx.emission_context, (jl_value_t*)jt), datatype_or_p->getType());
}
datatype_or_p = ctx.builder.CreateSelect(cmp, ptr, datatype_or_p);
setName(ctx.emission_context, datatype_or_p, "typetag_ptr");
Expand Down Expand Up @@ -4708,22 +4708,6 @@ static Value *emit_defer_signal(jl_codectx_t &ctx)
return emit_ptrgep(ctx, ptls, offsetof(jl_tls_states_t, defer_signal));
}

#ifndef JL_NDEBUG
static int compare_cgparams(const jl_cgparams_t *a, const jl_cgparams_t *b)
{
return
(a->track_allocations == b->track_allocations) &&
(a->code_coverage == b->code_coverage) &&
(a->prefer_specsig == b->prefer_specsig) &&
(a->gnu_pubnames == b->gnu_pubnames) &&
(a->debug_info_kind == b->debug_info_kind) &&
(a->safepoint_on_entry == b->safepoint_on_entry) &&
(a->gcstack_arg == b->gcstack_arg) &&
(a->use_jlplt == b->use_jlplt) &&
(a->force_emit_all == b->force_emit_all);
}
#endif

// Emit allocation for variable-length GenericMemory
// If zeroinit_nbytes is non-null, adds a zeroinit_indirect bundle to zero that many bytes
// via the data pointer (at offset 8 in the memory header)
Expand Down
8 changes: 8 additions & 0 deletions src/codegen-stubs.c
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,14 @@ JL_DLLEXPORT size_t jl_jit_total_bytes_fallback(void)
return 0;
}

JL_DLLEXPORT void jl_jit_register_ci_fallback(jl_code_instance_t *ci)
{
}

JL_DLLEXPORT void jl_jit_unregister_ci_fallback(jl_code_instance_t *ci)
{
}

JL_DLLEXPORT void *jl_create_native_fallback(LLVMOrcThreadSafeModuleRef llvmmod, int _trim, int _external_linkage, size_t _world, jl_array_t *_mod_array, jl_array_t *_worklist, int _all, jl_array_t *_module_init_order) UNAVAILABLE
JL_DLLEXPORT void *jl_emit_native_fallback(jl_array_t *codeinfos, LLVMOrcThreadSafeModuleRef llvmmod, const jl_cgparams_t *cgparams, int _external_linkage) UNAVAILABLE

Expand Down
Loading