Skip to content

Commit cfcd7d8

Browse files
authored
Revert "Enable getting non-boxed LLVM type from Julia Type" (#59492)
Reverts #56890 @wsmoses it broke CI
1 parent 85f1b8c commit cfcd7d8

File tree

3 files changed

+4
-14
lines changed

3 files changed

+4
-14
lines changed

src/cgutils.cpp

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -628,13 +628,13 @@ static unsigned convert_struct_offset(jl_codectx_t &ctx, Type *lty, unsigned byt
628628

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

631-
static Type *_julia_type_to_llvm(jl_codegen_params_t *ctx, LLVMContext &ctxt, jl_value_t *jt, bool *isboxed, bool no_boxing)
631+
static Type *_julia_type_to_llvm(jl_codegen_params_t *ctx, LLVMContext &ctxt, jl_value_t *jt, bool *isboxed)
632632
{
633633
// this function converts a Julia Type into the equivalent LLVM type
634634
if (isboxed) *isboxed = false;
635635
if (jt == (jl_value_t*)jl_bottom_type || jt == (jl_value_t*)jl_typeofbottom_type || jt == (jl_value_t*)jl_typeofbottom_type->super)
636636
return getVoidTy(ctxt);
637-
if (jl_is_concrete_immutable(jt) || no_boxing) {
637+
if (jl_is_concrete_immutable(jt)) {
638638
if (jl_datatype_nbits(jt) == 0)
639639
return getVoidTy(ctxt);
640640
Type *t = _julia_struct_to_llvm(ctx, ctxt, jt, isboxed);
@@ -647,20 +647,13 @@ static Type *_julia_type_to_llvm(jl_codegen_params_t *ctx, LLVMContext &ctxt, jl
647647

648648
static Type *julia_type_to_llvm(jl_codectx_t &ctx, jl_value_t *jt, bool *isboxed)
649649
{
650-
return _julia_type_to_llvm(&ctx.emission_context, ctx.builder.getContext(), jt, isboxed, false);
650+
return _julia_type_to_llvm(&ctx.emission_context, ctx.builder.getContext(), jt, isboxed);
651651
}
652652

653653
extern "C" JL_DLLEXPORT_CODEGEN
654654
Type *jl_type_to_llvm_impl(jl_value_t *jt, LLVMContextRef ctxt, bool *isboxed)
655655
{
656-
return _julia_type_to_llvm(NULL, *unwrap(ctxt), jt, isboxed, false);
657-
}
658-
659-
660-
extern "C" JL_DLLEXPORT_CODEGEN
661-
Type *jl_struct_to_llvm_impl(jl_value_t *jt, LLVMContextRef ctxt, bool *isboxed)
662-
{
663-
return _julia_type_to_llvm(NULL, *unwrap(ctxt), jt, isboxed, true);
656+
return _julia_type_to_llvm(NULL, *unwrap(ctxt), jt, isboxed);
664657
}
665658

666659

src/codegen-stubs.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -117,8 +117,6 @@ JL_DLLEXPORT LLVMOrcThreadSafeModuleRef jl_get_llvm_module_fallback(void *native
117117

118118
JL_DLLEXPORT void *jl_type_to_llvm_fallback(jl_value_t *jt, LLVMContextRef llvmctxt, bool_t *isboxed) UNAVAILABLE
119119

120-
JL_DLLEXPORT void *jl_struct_to_llvm_fallback(jl_value_t *jt, LLVMContextRef llvmctxt, bool_t *isboxed) UNAVAILABLE
121-
122120
JL_DLLEXPORT jl_value_t *jl_get_libllvm_fallback(void) JL_NOTSAFEPOINT
123121
{
124122
return jl_nothing;

src/jl_exported_funcs.inc

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -535,7 +535,6 @@
535535
YY(jl_dump_fptr_asm) \
536536
YY(jl_emit_native) \
537537
YY(jl_get_function_id) \
538-
YY(jl_struct_to_llvm) \
539538
YY(jl_type_to_llvm) \
540539
YY(jl_getUnwindInfo) \
541540
YY(jl_get_libllvm) \

0 commit comments

Comments
 (0)