diff --git a/.github/workflows/build-and-test-template.yml b/.github/workflows/build-and-test-template.yml index 6f2fa5c..9d9fbea 100644 --- a/.github/workflows/build-and-test-template.yml +++ b/.github/workflows/build-and-test-template.yml @@ -110,7 +110,7 @@ jobs: include("../common.jl") - src_name, src_version, sources, script, platforms, products, dependencies = configure_build([], version; update_sdk=false, assert=true, experimental_platforms=true, git_path=git_path=git_path="https://github.com/llvm/llvm-project.git", git_ver=ENV["LLVM_VERSION"]) + src_name, src_version, sources, script, platforms, products, dependencies = configure_build([], version; update_sdk=false, assert=true, experimental_platforms=true, git_path=git_path=git_path="https://github.com/JuliaLang/llvm-project.git", git_ver=ENV["LLVM_VERSION"]) products = Product[] build_tarballs(["--verbose", "${{ inputs.target }}", "--skip-audit"], src_name, src_version, sources, script, platforms, products, dependencies; preferred_gcc_version=v"10", preferred_llvm_version=v"16", julia_compat="1.6") ' @@ -118,7 +118,7 @@ jobs: id: julia_patches run: | set -o xtrace - cd binarybuilder_storage/downloads/clones/llvm-project.git-1df819a03ecf6890e3787b27bfd4f160aeeeeacd50a98d003be8b0893f11a9be # https://github.com/JuliaPackaging/BinaryBuilderBase.jl/blob/b77c32e367f6db32517967d2b3c41f2c9850806b/src/Sources.jl#L209 + cd binarybuilder_storage/downloads/clones/llvm-project.git-5a9787eb535c2edc5dea030cc221c1d60f38c9f42344f410e425ea2139e233aa # https://github.com/JuliaPackaging/BinaryBuilderBase.jl/blob/b77c32e367f6db32517967d2b3c41f2c9850806b/src/Sources.jl#L209 JULIA_PATCHES_TO_APPLY=() for patch in $GITHUB_WORKSPACE/julia-patches/*; do @@ -187,6 +187,7 @@ jobs: echo $(git rev-parse HEAD) git remote add fork https://github.com/Zentrik/julia git fetch --all # https://jvns.ca/blog/2023/11/10/how-cherry-pick-and-revert-work/ + git checkout -b llvm-20 fork/llvm-20 for patch in ${{ needs.build_llvm_assert.outputs.JULIA_PATCHES_TO_APPLY }}; do git apply $GITHUB_WORKSPACE/julia-patches/$patch -v --3way @@ -234,13 +235,14 @@ jobs: echo $(git rev-parse HEAD) git remote add fork https://github.com/Zentrik/julia git fetch --all # https://jvns.ca/blog/2023/11/10/how-cherry-pick-and-revert-work/ + git checkout -b llvm-20 fork/llvm-20 for patch in ${{ needs.build_llvm_assert.outputs.JULIA_PATCHES_TO_APPLY }}; do git apply $GITHUB_WORKSPACE/julia-patches/$patch -v --3way done mkdir -p deps/srccache - JULIA_LLVM_VERSION=$(grep 'version' stdlib/libLLVM_jll/Project.toml | sed 's/version = "\(.*\)"/\1/') + JULIA_LLVM_VERSION=$(grep 'version' stdlib/libLLVM_jll/Project.toml | sed 's/version = "\(.*\)"/\1/') mv ../LLVM_full_assert.v${LLVM_VERSION_MAJOR}.0.0.${{ inputs.target }}.tar.gz deps/srccache/libLLVM.v$JULIA_LLVM_VERSION.${{ inputs.target }}.tar.gz make -j4 FORCE_ASSERTIONS=1 LLVM_ASSERTIONS=1 VERBOSE=1 LLVM_JLL_TAGS= LLVM_SHARED_LIB_VER_SUFFIX=${LLVM_VERSION_MAJOR}jl JULIA_CPU_TARGET="generic;sandybridge,-xsaveopt,clone_all;haswell,-rdrnd,base(1)" diff --git a/.github/workflows/build-and-test.yml b/.github/workflows/build-and-test.yml index ead8e56..c14c1ed 100644 --- a/.github/workflows/build-and-test.yml +++ b/.github/workflows/build-and-test.yml @@ -34,9 +34,9 @@ jobs: run: | set -o xtrace if [ -z "$LLVM_VERSION" ]; then - LLVM_VERSION=$(git ls-remote https://github.com/llvm/llvm-project.git | grep 'refs/heads/main$' | awk '{print $1}') + LLVM_VERSION=$(git ls-remote https://github.com/JuliaLang/llvm-project.git | grep 'refs/heads/julia-release/20.x$' | awk '{print $1}') fi - LLVM_VERSION_MAJOR=$(curl -s https://raw.githubusercontent.com/llvm/llvm-project/$LLVM_VERSION/cmake/Modules/LLVMVersion.cmake | grep -oP 'set\(LLVM_VERSION_MAJOR \K[0-9]+') + LLVM_VERSION_MAJOR=$(curl -s https://raw.githubusercontent.com/JuliaLang/llvm-project/$LLVM_VERSION/cmake/Modules/LLVMVersion.cmake | grep -oP 'set\(LLVM_VERSION_MAJOR \K[0-9]+') echo "LLVM_VERSION=$LLVM_VERSION" >> "$GITHUB_OUTPUT" echo "LLVM_VERSION_MAJOR=$LLVM_VERSION_MAJOR" >> "$GITHUB_OUTPUT" build: diff --git a/julia-patches/1b7b3b8d354a28f5fb1381c61c5663819d29a974 b/julia-patches/1b7b3b8d354a28f5fb1381c61c5663819d29a974 deleted file mode 100644 index b9ec052..0000000 --- a/julia-patches/1b7b3b8d354a28f5fb1381c61c5663819d29a974 +++ /dev/null @@ -1,25 +0,0 @@ -From 6d83e9e2e243b714ff130153b7be43490a94228a Mon Sep 17 00:00:00 2001 -From: Zentrik -Date: Fri, 8 Nov 2024 21:02:11 +0000 -Subject: [PATCH] 1b7b3b8d354a28f5fb1381c61c5663819d29a974 - ---- - src/ccall.cpp | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/src/ccall.cpp b/src/ccall.cpp -index 6c03f9532d..ce7806ae1e 100644 ---- a/src/ccall.cpp -+++ b/src/ccall.cpp -@@ -2095,7 +2095,7 @@ jl_cgval_t function_sig_t::emit_a_ccall( - } - else if (f_name.starts_with("llvm.")) { - // compute and verify auto-mangling for intrinsic name -- auto ID = Function::lookupIntrinsicID(f_name); -+ auto ID = Intrinsic::lookupIntrinsicID(f_name); - if (ID != Intrinsic::not_intrinsic) { - // Accumulate an array of overloaded types for the given intrinsic - // and compute the new name mangling schema --- -2.34.1 - diff --git a/julia-patches/29441e4f5fa5f5c7709f7cf180815ba97f611297 b/julia-patches/29441e4f5fa5f5c7709f7cf180815ba97f611297 deleted file mode 100644 index 19c1b59..0000000 --- a/julia-patches/29441e4f5fa5f5c7709f7cf180815ba97f611297 +++ /dev/null @@ -1,107 +0,0 @@ -From cfc9b63f66317462eb1c888541a6434b6b135fd3 Mon Sep 17 00:00:00 2001 -From: Zentrik -Date: Tue, 4 Feb 2025 20:44:02 +0000 -Subject: [PATCH] 29441e4f5fa5f5c7709f7cf180815ba97f611297 - -Adapt to removal of NoCapture ---- - src/codegen.cpp | 20 ++++++++++---------- - 1 file changed, 10 insertions(+), 10 deletions(-) - -diff --git a/src/codegen.cpp b/src/codegen.cpp -index b3724e33d2..adfc338d1d 100644 ---- a/src/codegen.cpp -+++ b/src/codegen.cpp -@@ -614,7 +614,7 @@ static AttributeList get_func_attrs(LLVMContext &C) - AttributeSet(), - Attributes(C, {Attribute::NonNull}), - {AttributeSet(), -- Attributes(C, {Attribute::NoAlias, Attribute::ReadOnly, Attribute::NoCapture, Attribute::NoUndef})}); -+ Attributes(C, {Attribute::NoAlias, Attribute::ReadOnly, Attribute::NoUndef}, {Attribute::getWithCaptureInfo(C, CaptureInfo::none())})}); - } - - static AttributeList get_donotdelete_func_attrs(LLVMContext &C) -@@ -1017,7 +1017,7 @@ static const auto jllockvalue_func = new JuliaFunction<>{ - [](LLVMContext &C) { return AttributeList::get(C, - AttributeSet(), - AttributeSet(), -- {Attributes(C, {Attribute::NoCapture})}); }, -+ {Attributes(C, {}, {Attribute::getWithCaptureInfo(C, CaptureInfo::none())})}); }, - }; - static const auto jlunlockvalue_func = new JuliaFunction<>{ - XSTR(jl_unlock_value), -@@ -1026,7 +1026,7 @@ static const auto jlunlockvalue_func = new JuliaFunction<>{ - [](LLVMContext &C) { return AttributeList::get(C, - AttributeSet(), - AttributeSet(), -- {Attributes(C, {Attribute::NoCapture})}); }, -+ {Attributes(C, {}, {Attribute::getWithCaptureInfo(C, CaptureInfo::none())})}); }, - }; - static const auto jllockfield_func = new JuliaFunction<>{ - XSTR(jl_lock_field), -@@ -1035,7 +1035,7 @@ static const auto jllockfield_func = new JuliaFunction<>{ - [](LLVMContext &C) { return AttributeList::get(C, - AttributeSet(), - AttributeSet(), -- {Attributes(C, {Attribute::NoCapture})}); }, -+ {Attributes(C, {}, {Attribute::getWithCaptureInfo(C, CaptureInfo::none())})}); }, - }; - static const auto jlunlockfield_func = new JuliaFunction<>{ - XSTR(jl_unlock_field), -@@ -1044,7 +1044,7 @@ static const auto jlunlockfield_func = new JuliaFunction<>{ - [](LLVMContext &C) { return AttributeList::get(C, - AttributeSet(), - AttributeSet(), -- {Attributes(C, {Attribute::NoCapture})}); }, -+ {Attributes(C, {}, {Attribute::getWithCaptureInfo(C, CaptureInfo::none())})}); }, - }; - static const auto jlenter_func = new JuliaFunction<>{ - XSTR(jl_enter_handler), -@@ -1514,7 +1514,7 @@ static const auto gc_loaded_func = new JuliaFunction<>{ - RetAttrs.addAttribute(Attribute::NonNull); - RetAttrs.addAttribute(Attribute::NoUndef); - return AttributeList::get(C, AttributeSet::get(C,FnAttrs), AttributeSet::get(C,RetAttrs), -- { Attributes(C, {Attribute::NonNull, Attribute::NoUndef, Attribute::ReadNone, Attribute::NoCapture}), -+ { Attributes(C, {Attribute::NonNull, Attribute::NoUndef, Attribute::ReadNone}, {Attribute::getWithCaptureInfo(C, CaptureInfo::none())}), - Attributes(C, {Attribute::NonNull, Attribute::NoUndef, Attribute::ReadNone}) }); - }, - }; -@@ -8367,7 +8367,7 @@ static jl_returninfo_t get_specsig_function(jl_codegen_params_t ¶ms, Module - AttrBuilder param(M->getContext()); - param.addStructRetAttr(srt); - param.addAttribute(Attribute::NoAlias); -- param.addAttribute(Attribute::NoCapture); -+ param.addCapturesAttr(llvm::CaptureInfo::none()); - param.addAttribute(Attribute::NoUndef); - attrs.push_back(AttributeSet::get(M->getContext(), param)); - assert(fsig.size() == 1); -@@ -8375,7 +8375,7 @@ static jl_returninfo_t get_specsig_function(jl_codegen_params_t ¶ms, Module - if (props.cc == jl_returninfo_t::Union) { - AttrBuilder param(M->getContext()); - param.addAttribute(Attribute::NoAlias); -- param.addAttribute(Attribute::NoCapture); -+ param.addCapturesAttr(llvm::CaptureInfo::none()); - param.addAttribute(Attribute::NoUndef); - attrs.push_back(AttributeSet::get(M->getContext(), param)); - assert(fsig.size() == 1); -@@ -8384,7 +8384,7 @@ static jl_returninfo_t get_specsig_function(jl_codegen_params_t ¶ms, Module - if (props.return_roots) { - AttrBuilder param(M->getContext()); - param.addAttribute(Attribute::NoAlias); -- param.addAttribute(Attribute::NoCapture); -+ param.addCapturesAttr(llvm::CaptureInfo::none()); - param.addAttribute(Attribute::NoUndef); - attrs.push_back(AttributeSet::get(M->getContext(), param)); - fsig.push_back(getPointerTy(M->getContext())); -@@ -8417,7 +8417,7 @@ static jl_returninfo_t get_specsig_function(jl_codegen_params_t ¶ms, Module - AttrBuilder param(M->getContext()); - Type *ty = et; - if (et == nullptr || et->isAggregateType()) { // aggregate types are passed by pointer -- param.addAttribute(Attribute::NoCapture); -+ param.addCapturesAttr(llvm::CaptureInfo::none()); - param.addAttribute(Attribute::ReadOnly); - ty = PointerType::get(M->getContext(), AddressSpace::Derived); - } --- -2.34.1 - diff --git a/julia-patches/29e467fc78eb8b4308b57272ca4ad0d1f744f25f b/julia-patches/29e467fc78eb8b4308b57272ca4ad0d1f744f25f deleted file mode 100644 index db92806..0000000 --- a/julia-patches/29e467fc78eb8b4308b57272ca4ad0d1f744f25f +++ /dev/null @@ -1,406 +0,0 @@ -From ea139ae833743fae1e9b02f58ff2b1bb9de7d5b7 Mon Sep 17 00:00:00 2001 -From: Zentrik -Date: Sat, 4 Jan 2025 16:48:45 +0000 -Subject: [PATCH] 29e467fc78eb8b4308b57272ca4ad0d1f744f25f - -Adapt to "Deprecate Type::getPointerTo()" ---- - src/aotcompile.cpp | 10 +++++----- - src/ccall.cpp | 10 +++++----- - src/cgutils.cpp | 4 ++-- - src/codegen.cpp | 24 ++++++++++++------------ - src/intrinsics.cpp | 6 +++--- - src/llvm-codegen-shared.h | 14 +++++--------- - src/llvm-final-gc-lowering.cpp | 2 +- - src/llvm-late-gc-lowering.cpp | 4 ++-- - src/llvm-multiversioning.cpp | 6 +++--- - src/llvm-pass-helpers.cpp | 2 +- - src/llvm-ptls.cpp | 2 +- - 11 files changed, 40 insertions(+), 44 deletions(-) - -diff --git a/src/aotcompile.cpp b/src/aotcompile.cpp -index d91da9c64c..d0adcb2136 100644 ---- a/src/aotcompile.cpp -+++ b/src/aotcompile.cpp -@@ -1698,7 +1698,7 @@ static void construct_vars(Module &M, Partition &partition, StringRef suffix) { - - // Now commit the fvars, gvars, and idxs - auto T_size = M.getDataLayout().getIntPtrType(M.getContext()); -- emit_table(M, fvars, "jl_fvars", T_size->getPointerTo()); -+ emit_table(M, fvars, "jl_fvars", PointerType::getUnqual(T_size->getContext())); - emit_offset_table(M, T_size, gvars, "jl_gvar", suffix); - auto fidxs = ConstantDataArray::get(M.getContext(), fvar_idxs); - auto fidxs_var = new GlobalVariable(M, fidxs->getType(), true, -@@ -2077,7 +2077,7 @@ void jl_dump_native_impl(void *native_code, - dataM.setPICLevel(PICLevel::BigPIC); - auto &Context = dataM.getContext(); - -- Type *T_psize = dataM.getDataLayout().getIntPtrType(Context)->getPointerTo(); -+ Type *T_psize = PointerType::getUnqual(Context); - - // This should really be in jl_create_native, but we haven't - // yet set the target triple binary format correctly at that -@@ -2183,9 +2183,9 @@ void jl_dump_native_impl(void *native_code, - GlobalValue *jlRTLD_DEFAULT_var = jl_emit_RTLD_DEFAULT_var(&metadataM); - - Type *T_size = DL.getIntPtrType(Context); -- Type *T_psize = T_size->getPointerTo(); -+ Type *T_psize = PointerType::getUnqual(T_size->getContext()); - -- auto FT = FunctionType::get(Type::getInt8Ty(Context)->getPointerTo()->getPointerTo(), {}, false); -+ auto FT = FunctionType::get(PointerType::getUnqual(Context), {}, false); - auto F = Function::Create(FT, Function::ExternalLinkage, "get_jl_RTLD_DEFAULT_handle_addr", metadataM); - llvm::IRBuilder<> builder(BasicBlock::Create(Context, "top", F)); - builder.CreateRet(jlRTLD_DEFAULT_var); -@@ -2197,7 +2197,7 @@ void jl_dump_native_impl(void *native_code, - // Windows expect that the function `_DllMainStartup` is present in an dll. - // Normal compilers use something like Zig's crtdll.c instead we provide a - // a stub implementation. -- auto T_pvoid = Type::getInt8Ty(Context)->getPointerTo(); -+ auto T_pvoid = PointerType::getUnqual(Context); - auto T_int32 = Type::getInt32Ty(Context); - auto FT = FunctionType::get(T_int32, {T_pvoid, T_int32, T_pvoid}, false); - auto F = Function::Create(FT, Function::ExternalLinkage, "_DllMainCRTStartup", metadataM); -diff --git a/src/ccall.cpp b/src/ccall.cpp -index e5ef822286..0c0c39cf88 100644 ---- a/src/ccall.cpp -+++ b/src/ccall.cpp -@@ -105,7 +105,7 @@ static bool runtime_sym_gvs(jl_codectx_t &ctx, const char *f_lib, const char *f_ - name += f_name; - name += "_"; - name += std::to_string(jl_atomic_fetch_add_relaxed(&globalUniqueGeneratedNames, 1)); -- auto T_pvoidfunc = JuliaType::get_pvoidfunc_ty(M->getContext()); -+ auto T_pvoidfunc = getPointerTy(M->getContext()); - llvmgv = new GlobalVariable(*M, T_pvoidfunc, false, - GlobalVariable::ExternalLinkage, - Constant::getNullValue(T_pvoidfunc), name); -@@ -133,7 +133,7 @@ static Value *runtime_sym_lookup( - // *llvmgv = jl_load_and_lookup(f_lib, f_name, libptrgv); - // } - // return (*llvmgv) -- auto T_pvoidfunc = JuliaType::get_pvoidfunc_ty(irbuilder.getContext()); -+ auto T_pvoidfunc = getPointerTy(irbuilder.getContext()); - BasicBlock *enter_bb = irbuilder.GetInsertBlock(); - BasicBlock *dlsym_lookup = BasicBlock::Create(irbuilder.getContext(), "dlsym"); - BasicBlock *ccall_bb = BasicBlock::Create(irbuilder.getContext(), "ccall"); -@@ -197,7 +197,7 @@ static Value *runtime_sym_lookup( - PointerType *funcptype, const char *f_lib, jl_value_t *lib_expr, - const char *f_name, Function *f) - { -- auto T_pvoidfunc = JuliaType::get_pvoidfunc_ty(ctx.builder.getContext()); -+ auto T_pvoidfunc = getPointerTy(ctx.builder.getContext()); - GlobalVariable *libptrgv; - GlobalVariable *llvmgv; - bool runtime_lib; -@@ -244,7 +244,7 @@ static GlobalVariable *emit_plt_thunk( - plt->setAttributes(attrs); - if (cc != CallingConv::C) - plt->setCallingConv(cc); -- auto T_pvoidfunc = JuliaType::get_pvoidfunc_ty(M->getContext()); -+ auto T_pvoidfunc = getPointerTy(M->getContext()); - GlobalVariable *got = new GlobalVariable(*M, T_pvoidfunc, false, - GlobalVariable::ExternalLinkage, - plt, -@@ -2128,7 +2128,7 @@ jl_cgval_t function_sig_t::emit_a_ccall( - } - else if (symarg.fptr != NULL) { - ++LiteralCCalls; -- Type *funcptype = functype->getPointerTo(0); -+ Type *funcptype = PointerType::getUnqual(functype->getContext()); - llvmf = literal_static_pointer_val((void*)(uintptr_t)symarg.fptr, funcptype); - setName(ctx.emission_context, llvmf, "ccall_fptr"); - } -diff --git a/src/cgutils.cpp b/src/cgutils.cpp -index c1796d907e..03335cf156 100644 ---- a/src/cgutils.cpp -+++ b/src/cgutils.cpp -@@ -123,7 +123,7 @@ static Value *stringConstPtr( - // Doesn't need to be aligned, we shouldn't operate on these like julia objects - GlobalVariable *gv = get_pointer_to_constant(emission_context, Data, Align(1), "_j_str_" + StringRef(ctxt.data(), ctxt.size()), *M); - // AddrSpaceCast in case globals are in non-0 AS -- return irbuilder.CreateAddrSpaceCast(gv, gv->getValueType()->getPointerTo(0)); -+ return irbuilder.CreateAddrSpaceCast(gv, PointerType::getUnqual(gv->getContext())); - } - - -@@ -1336,7 +1336,7 @@ static Value *emit_typeof(jl_codectx_t &ctx, const jl_cgval_t &p, bool maybenull - Value *tindex = ctx.builder.CreateAnd(p.TIndex, ConstantInt::get(getInt8Ty(ctx.builder.getContext()), 0x7f)); - bool allunboxed = is_uniontype_allunboxed(p.typ); - Type *expr_type = justtag ? ctx.types().T_size : ctx.types().T_pjlvalue; -- Value *datatype_or_p = Constant::getNullValue(expr_type->getPointerTo()); -+ Value *datatype_or_p = Constant::getNullValue(PointerType::getUnqual(expr_type->getContext())); - unsigned counter = 0; - for_each_uniontype_small( - [&](unsigned idx, jl_datatype_t *jt) { -diff --git a/src/codegen.cpp b/src/codegen.cpp -index baa05fbc30..b3724e33d2 100644 ---- a/src/codegen.cpp -+++ b/src/codegen.cpp -@@ -824,7 +824,7 @@ static const auto jlhasnofield_func = new JuliaFunction<>{ - static const auto jlboundserrorv_func = new JuliaFunction{ - XSTR(jl_bounds_error_ints), - [](LLVMContext &C, Type *T_size) { return FunctionType::get(getVoidTy(C), -- {PointerType::get(JuliaType::get_jlvalue_ty(C), AddressSpace::CalleeRooted), T_size->getPointerTo(), T_size}, false); }, -+ {PointerType::get(JuliaType::get_jlvalue_ty(C), AddressSpace::CalleeRooted), PointerType::getUnqual(T_size->getContext()), T_size}, false); }, - get_attrs_noreturn, - }; - static const auto jlboundserror_func = new JuliaFunction{ -@@ -1292,13 +1292,13 @@ static const auto memcmp_func = new JuliaFunction{ - }; - static const auto jldlsym_func = new JuliaFunction<>{ - XSTR(jl_load_and_lookup), -- [](LLVMContext &C) { return FunctionType::get(JuliaType::get_pvoidfunc_ty(C), -- {getPointerTy(C), getPointerTy(C), PointerType::get(getPointerTy(C), 0)}, false); }, -+ [](LLVMContext &C) { return FunctionType::get(getPointerTy(C), -+ {getPointerTy(C), getPointerTy(C), getPointerTy(C)}, false); }, - nullptr, - }; - static const auto jllazydlsym_func = new JuliaFunction<>{ - XSTR(jl_lazy_load_and_lookup), -- [](LLVMContext &C) { return FunctionType::get(JuliaType::get_pvoidfunc_ty(C), -+ [](LLVMContext &C) { return FunctionType::get(getPointerTy(C), - {JuliaType::get_prjlvalue_ty(C), getPointerTy(C)}, false); }, - nullptr, - }; -@@ -1365,7 +1365,7 @@ static const auto jlgetcfunctiontrampoline_func = new JuliaFunction<>{ - T_pjlvalue, // result - getPointerTy(C), // cache - T_pjlvalue, // fill -- FunctionType::get(getPointerTy(C), { getPointerTy(C), T_ppjlvalue }, false)->getPointerTo(), // trampoline -+ getPointerTy(C), // trampoline - T_pjlvalue, // env - T_derived, // vals - }, false); -@@ -1444,7 +1444,7 @@ static const auto box_ssavalue_func = new JuliaFunction{ - }; - static const auto jlgetbuiltinfptr_func = new JuliaFunction<>{ - XSTR(jl_get_builtin_fptr), -- [](LLVMContext &C) { return FunctionType::get(get_func_sig(C)->getPointerTo(), -+ [](LLVMContext &C) { return FunctionType::get(getPointerTy(C), - {JuliaType::get_prjlvalue_ty(C)}, false); }, - nullptr, - }; -@@ -1535,7 +1535,7 @@ static const auto julia_call = new JuliaFunction<>{ - [](LLVMContext &C) { - auto T_prjlvalue = JuliaType::get_prjlvalue_ty(C); - return FunctionType::get(T_prjlvalue, -- {get_func_sig(C)->getPointerTo(), -+ {getPointerTy(C), - T_prjlvalue}, // %f - true); }, // %args - get_attrs_basic, -@@ -1548,7 +1548,7 @@ static const auto julia_call2 = new JuliaFunction<>{ - [](LLVMContext &C) { - auto T_prjlvalue = JuliaType::get_prjlvalue_ty(C); - return FunctionType::get(T_prjlvalue, -- {get_func2_sig(C)->getPointerTo(), -+ {getPointerTy(C), - T_prjlvalue, // %arg1 - T_prjlvalue}, // %f - true); }, // %args -@@ -1562,7 +1562,7 @@ static const auto julia_call3 = new JuliaFunction<>{ - auto T_prjlvalue = JuliaType::get_prjlvalue_ty(C); - Type *T = PointerType::get(JuliaType::get_jlvalue_ty(C), AddressSpace::Derived); - return FunctionType::get(T_prjlvalue, -- {get_func3_sig(C)->getPointerTo(), -+ {getPointerTy(C), - T}, // %f - true); }, // %args - get_attrs_basic, -@@ -5534,7 +5534,7 @@ static jl_cgval_t emit_call_specfun_boxed(jl_codectx_t &ctx, jl_value_t *jlretty - std::string namep("p"); - namep += specFunctionObject; - GlobalVariable *GV = cast_or_null(jl_Module->getNamedValue(namep)); -- Type *pfunc = ctx.types().T_jlfunc->getPointerTo(); -+ Type *pfunc = PointerType::getUnqual(ctx.builder.getContext()); - if (GV == nullptr) { - GV = new GlobalVariable(*jl_Module, pfunc, false, - GlobalVariable::ExternalLinkage, -@@ -8319,7 +8319,7 @@ static jl_returninfo_t get_specsig_function(jl_codegen_params_t ¶ms, Module - if (props.union_bytes) { - props.cc = jl_returninfo_t::Union; - Type *AT = ArrayType::get(getInt8Ty(M->getContext()), props.union_bytes); -- fsig.push_back(AT->getPointerTo()); -+ fsig.push_back(PointerType::getUnqual(M->getContext())); - argnames.push_back("union_bytes_return"); - Type *pair[] = { T_prjlvalue, getInt8Ty(M->getContext()) }; - rt = StructType::get(M->getContext(), ArrayRef(pair)); -@@ -8348,7 +8348,7 @@ static jl_returninfo_t get_specsig_function(jl_codegen_params_t ¶ms, Module - props.union_align = props.union_minalign = julia_alignment(jlrettype); - // sret is always passed from alloca - assert(M); -- fsig.push_back(rt->getPointerTo(M->getDataLayout().getAllocaAddrSpace())); -+ fsig.push_back(PointerType::get(M->getContext(), M->getDataLayout().getAllocaAddrSpace())); - argnames.push_back("sret_return"); - srt = rt; - rt = getVoidTy(M->getContext()); -diff --git a/src/intrinsics.cpp b/src/intrinsics.cpp -index c4bcb85e43..52ccbcbd1f 100644 ---- a/src/intrinsics.cpp -+++ b/src/intrinsics.cpp -@@ -790,7 +790,7 @@ static jl_cgval_t emit_pointerref(jl_codectx_t &ctx, ArrayRef argv) - Type *ptrty = julia_type_to_llvm(ctx, ety, &isboxed); - assert(!isboxed); - if (!type_is_ghost(ptrty)) { -- Value *thePtr = emit_unbox(ctx, ptrty->getPointerTo(), e, e.typ); -+ Value *thePtr = emit_unbox(ctx, PointerType::getUnqual(ptrty->getContext()), e, e.typ); - thePtr = ctx.builder.CreateInBoundsGEP(ptrty, thePtr, im1); - auto load = typed_load(ctx, thePtr, nullptr, ety, ctx.tbaa().tbaa_data, nullptr, isboxed, AtomicOrdering::NotAtomic, false, align_nb); - setName(ctx.emission_context, load.V, "pointerref"); -@@ -982,7 +982,7 @@ static jl_cgval_t emit_atomic_pointerref(jl_codectx_t &ctx, ArrayRef - Type *ptrty = julia_type_to_llvm(ctx, ety, &isboxed); - assert(!isboxed); - if (!type_is_ghost(ptrty)) { -- Value *thePtr = emit_unbox(ctx, ptrty->getPointerTo(), e, e.typ); -+ Value *thePtr = emit_unbox(ctx, PointerType::getUnqual(ptrty->getContext()), e, e.typ); - auto load = typed_load(ctx, thePtr, nullptr, ety, ctx.tbaa().tbaa_data, nullptr, isboxed, llvm_order, false, nb); - setName(ctx.emission_context, load.V, "atomic_pointerref"); - return load; -@@ -1076,7 +1076,7 @@ static jl_cgval_t emit_atomic_pointerop(jl_codectx_t &ctx, intrinsic f, ArrayRef - assert(!isboxed); - Value *thePtr; - if (!type_is_ghost(ptrty)) -- thePtr = emit_unbox(ctx, ptrty->getPointerTo(), e, e.typ); -+ thePtr = emit_unbox(ctx, PointerType::getUnqual(ptrty->getContext()), e, e.typ); - else - thePtr = nullptr; // could use any value here, since typed_store will not use it - jl_cgval_t ret = typed_store(ctx, thePtr, x, y, ety, ctx.tbaa().tbaa_data, nullptr, nullptr, isboxed, -diff --git a/src/llvm-codegen-shared.h b/src/llvm-codegen-shared.h -index ff6f5a9729..ecf02a8f57 100644 ---- a/src/llvm-codegen-shared.h -+++ b/src/llvm-codegen-shared.h -@@ -34,19 +34,19 @@ namespace JuliaType { - } - - static inline llvm::PointerType* get_pjlvalue_ty(llvm::LLVMContext &C, unsigned addressSpace=0) { -- return llvm::PointerType::get(get_jlvalue_ty(C), addressSpace); -+ return llvm::PointerType::get(C, addressSpace); - } - - static inline llvm::PointerType* get_prjlvalue_ty(llvm::LLVMContext &C) { -- return llvm::PointerType::get(get_jlvalue_ty(C), AddressSpace::Tracked); -+ return llvm::PointerType::get(C, AddressSpace::Tracked); - } - - static inline llvm::PointerType* get_ppjlvalue_ty(llvm::LLVMContext &C) { -- return llvm::PointerType::get(get_pjlvalue_ty(C), 0); -+ return llvm::PointerType::get(C, 0); - } - - static inline llvm::PointerType* get_pprjlvalue_ty(llvm::LLVMContext &C) { -- return llvm::PointerType::get(get_prjlvalue_ty(C), 0); -+ return llvm::PointerType::get(C, 0); - } - - static inline auto get_jlfunc_ty(llvm::LLVMContext &C) { -@@ -95,10 +95,6 @@ namespace JuliaType { - static inline auto get_voidfunc_ty(llvm::LLVMContext &C) { - return llvm::FunctionType::get(llvm::Type::getVoidTy(C), /*isVarArg*/false); - } -- -- static inline auto get_pvoidfunc_ty(llvm::LLVMContext &C) { -- return get_voidfunc_ty(C)->getPointerTo(); -- } - } - - // return how many Tracked pointers are in T (count > 0), -@@ -228,7 +224,7 @@ static inline void emit_gc_safepoint(llvm::IRBuilder<> &builder, llvm::Type *T_s - else { - Function *F = M->getFunction("julia.safepoint"); - if (!F) { -- FunctionType *FT = FunctionType::get(Type::getVoidTy(C), {T_size->getPointerTo()}, false); -+ FunctionType *FT = FunctionType::get(Type::getVoidTy(C), {PointerType::getUnqual(T_size->getContext())}, false); - F = Function::Create(FT, Function::ExternalLinkage, "julia.safepoint", M); - F->setMemoryEffects(MemoryEffects::inaccessibleOrArgMemOnly()); - } -diff --git a/src/llvm-final-gc-lowering.cpp b/src/llvm-final-gc-lowering.cpp -index 76dcd94489..4e539fea8f 100644 ---- a/src/llvm-final-gc-lowering.cpp -+++ b/src/llvm-final-gc-lowering.cpp -@@ -22,7 +22,7 @@ void FinalLowerGC::lowerNewGCFrame(CallInst *target, Function &F) - auto gcframe_alloca = builder.CreateAlloca(T_prjlvalue, ConstantInt::get(Type::getInt32Ty(F.getContext()), nRoots + 2)); - gcframe_alloca->setAlignment(Align(16)); - // addrspacecast as needed for non-0 alloca addrspace -- auto gcframe = cast(builder.CreateAddrSpaceCast(gcframe_alloca, T_prjlvalue->getPointerTo(0))); -+ auto gcframe = cast(builder.CreateAddrSpaceCast(gcframe_alloca, PointerType::getUnqual(T_prjlvalue->getContext()))); - gcframe->takeName(target); - - // Zero out the GC frame. -diff --git a/src/llvm-late-gc-lowering.cpp b/src/llvm-late-gc-lowering.cpp -index e03fbd8ccd..317e89d46a 100644 ---- a/src/llvm-late-gc-lowering.cpp -+++ b/src/llvm-late-gc-lowering.cpp -@@ -1993,7 +1993,7 @@ bool LateLowerGCFrame::CleanupIR(Function &F, State *S, bool *CFGModified) { - AllocaInst *Frame = nullptr; - unsigned allocaAddressSpace = F.getParent()->getDataLayout().getAllocaAddrSpace(); - if (T_prjlvalue) { -- T_pprjlvalue = T_prjlvalue->getPointerTo(); -+ T_pprjlvalue = PointerType::getUnqual(T_prjlvalue->getContext()); - Frame = new AllocaInst(T_prjlvalue, allocaAddressSpace, - ConstantInt::get(T_int32, maxframeargs), "jlcallframe", StartOff->getIterator()); - } -@@ -2184,7 +2184,7 @@ bool LateLowerGCFrame::CleanupIR(Function &F, State *S, bool *CFGModified) { - } - ReplacementArgs.push_back(nframeargs == 0 ? - (llvm::Value*)ConstantPointerNull::get(T_pprjlvalue) : -- Builder.CreateAddrSpaceCast(Frame, T_prjlvalue->getPointerTo(0))); -+ Builder.CreateAddrSpaceCast(Frame, PointerType::getUnqual(T_prjlvalue->getContext()))); - ReplacementArgs.push_back(ConstantInt::get(T_int32, nframeargs)); - if (callee == call2_func) { - // move trailing arg to the end now -diff --git a/src/llvm-multiversioning.cpp b/src/llvm-multiversioning.cpp -index 2961a77e08..61058f7af0 100644 ---- a/src/llvm-multiversioning.cpp -+++ b/src/llvm-multiversioning.cpp -@@ -884,11 +884,11 @@ static void emit_table(Module &M, Type *T_size, ArrayRef vars, String - uint32_t nvars = vars.size(); - SmallVector castvars(nvars); - for (size_t i = 0; i < nvars; i++) -- castvars[i] = ConstantExpr::getBitCast(vars[i], T_size->getPointerTo()); -+ castvars[i] = ConstantExpr::getBitCast(vars[i], PointerType::getUnqual(T_size->getContext())); - auto gv = new GlobalVariable(M, T_size, true, GlobalValue::ExternalLinkage, ConstantInt::get(T_size, nvars), name + "_count" + suffix); - gv->setVisibility(GlobalValue::HiddenVisibility); - gv->setDSOLocal(true); -- ArrayType *vars_type = ArrayType::get(T_size->getPointerTo(), nvars); -+ ArrayType *vars_type = ArrayType::get(PointerType::getUnqual(T_size->getContext()), nvars); - gv = new GlobalVariable(M, vars_type, false, - GlobalVariable::ExternalLinkage, - ConstantArray::get(vars_type, castvars), -@@ -962,7 +962,7 @@ void CloneCtx::emit_metadata() - { - SmallVector idxs; - SmallVector fptrs; -- Type *Tfptr = T_size->getPointerTo(); -+ Type *Tfptr = PointerType::getUnqual(T_size->getContext()); - for (uint32_t i = 0; i < ntargets; i++) { - auto tgt = linearized[i]; - auto &spec = specs[i]; -diff --git a/src/llvm-pass-helpers.cpp b/src/llvm-pass-helpers.cpp -index ca25251040..202b0991fd 100644 ---- a/src/llvm-pass-helpers.cpp -+++ b/src/llvm-pass-helpers.cpp -@@ -234,7 +234,7 @@ namespace jl_intrinsics { - SAFEPOINT_NAME, - [](Type *T_size) { - auto &ctx = T_size->getContext(); -- auto T_psize = T_size->getPointerTo(); -+ auto T_psize = PointerType::getUnqual(ctx); - auto intrinsic = Function::Create( - FunctionType::get( - Type::getVoidTy(ctx), -diff --git a/src/llvm-ptls.cpp b/src/llvm-ptls.cpp -index 52d324ec4c..90f3050835 100644 ---- a/src/llvm-ptls.cpp -+++ b/src/llvm-ptls.cpp -@@ -307,7 +307,7 @@ bool LowerPTLS::run(bool *CFGModified) - assert(sizeof(jl_pgcstack_key_t) == sizeof(uintptr_t)); - FT_pgcstack_getter = FunctionType::get(FT_pgcstack_getter->getReturnType(), {T_size}, false); - } -- T_pgcstack_getter = FT_pgcstack_getter->getPointerTo(); -+ T_pgcstack_getter = PointerType::getUnqual(FT_pgcstack_getter->getContext()); - T_pppjlvalue = cast(FT_pgcstack_getter->getReturnType()); - if (imaging_mode) { - pgcstack_func_slot = create_hidden_global(T_pgcstack_getter, "jl_pgcstack_func_slot"); --- -2.34.1 - diff --git a/julia-patches/2f50b280dc8e995ef67ad31a5f71adc4c270890d b/julia-patches/2f50b280dc8e995ef67ad31a5f71adc4c270890d deleted file mode 100644 index 605833d..0000000 --- a/julia-patches/2f50b280dc8e995ef67ad31a5f71adc4c270890d +++ /dev/null @@ -1,278 +0,0 @@ -From 243665861478f19406709f6af417fed8858a256d Mon Sep 17 00:00:00 2001 -From: Zentrik -Date: Fri, 8 Nov 2024 21:02:11 +0000 -Subject: [PATCH] 2f50b280dc8e995ef67ad31a5f71adc4c270890d - ---- - src/codegen.cpp | 2 +- - src/llvm-alloc-opt.cpp | 10 +++++----- - src/llvm-julia-licm.cpp | 2 +- - src/llvm-late-gc-lowering.cpp | 22 +++++++++++----------- - src/llvm-lower-handlers.cpp | 14 +++++++------- - src/llvm-multiversioning.cpp | 6 +++--- - src/llvm-ptls.cpp | 4 ++-- - 7 files changed, 30 insertions(+), 30 deletions(-) - -diff --git a/src/codegen.cpp b/src/codegen.cpp -index 39b5770e11..8df985bd6d 100644 ---- a/src/codegen.cpp -+++ b/src/codegen.cpp -@@ -2362,7 +2362,7 @@ static GlobalVariable *get_pointer_to_constant(jl_codegen_params_t &emission_con - static AllocaInst *emit_static_alloca(jl_codectx_t &ctx, Type *lty, Align align) - { - ++EmittedAllocas; -- return new AllocaInst(lty, ctx.topalloca->getModule()->getDataLayout().getAllocaAddrSpace(), nullptr, align, "", /*InsertBefore=*/ctx.topalloca); -+ return new AllocaInst(lty, ctx.topalloca->getModule()->getDataLayout().getAllocaAddrSpace(), nullptr, align, "", /*InsertBefore=*/ctx.topalloca->getIterator()); - } - - static AllocaInst *emit_static_alloca(jl_codectx_t &ctx, unsigned nb, Align align) -diff --git a/src/llvm-alloc-opt.cpp b/src/llvm-alloc-opt.cpp -index 7dd794a4d8..7928d6824f 100644 ---- a/src/llvm-alloc-opt.cpp -+++ b/src/llvm-alloc-opt.cpp -@@ -427,12 +427,12 @@ void Optimizer::insertLifetimeEnd(Value *ptr, Constant *sz, Instruction *insert) - } - break; - } -- CallInst::Create(pass.lifetime_end, {sz, ptr}, "", insert); -+ CallInst::Create(pass.lifetime_end, {sz, ptr}, "", insert->getIterator()); - } - - void Optimizer::insertLifetime(Value *ptr, Constant *sz, Instruction *orig) - { -- CallInst::Create(pass.lifetime_start, {sz, ptr}, "", orig); -+ CallInst::Create(pass.lifetime_start, {sz, ptr}, "", orig->getIterator()); - BasicBlock *def_bb = orig->getParent(); - std::set bbs{def_bb}; - auto &DT = getDomTree(); -@@ -630,7 +630,7 @@ void Optimizer::replaceIntrinsicUseWith(IntrinsicInst *call, Intrinsic::ID ID, - auto newF = Intrinsic::getDeclaration(call->getModule(), ID, overloadTys); - assert(newF->getFunctionType() == newfType); - newF->setCallingConv(call->getCallingConv()); -- auto newCall = CallInst::Create(newF, args, "", call); -+ auto newCall = CallInst::Create(newF, args, "", call->getIterator()); - newCall->setTailCallKind(call->getTailCallKind()); - auto old_attrs = call->getAttributes(); - newCall->setAttributes(AttributeList::get(pass.getLLVMContext(), getFnAttrs(old_attrs), -@@ -795,7 +795,7 @@ void Optimizer::moveToStack(CallInst *orig_inst, size_t sz, bool has_ref, AllocF - SmallVector IdxOperands(gep->idx_begin(), gep->idx_end()); - auto new_gep = GetElementPtrInst::Create(gep->getSourceElementType(), - new_i, IdxOperands, -- gep->getName(), gep); -+ gep->getName(), gep->getIterator()); - new_gep->setIsInBounds(gep->isInBounds()); - new_gep->takeName(gep); - new_gep->copyMetadata(*gep); -@@ -1238,7 +1238,7 @@ void Optimizer::splitOnStack(CallInst *orig_inst) - bundle = OperandBundleDef("jl_roots", std::move(operands)); - break; - } -- auto new_call = CallInst::Create(call, bundles, call); -+ auto new_call = CallInst::Create(call, bundles, call->getIterator()); - new_call->takeName(call); - call->replaceAllUsesWith(new_call); - call->eraseFromParent(); -diff --git a/src/llvm-julia-licm.cpp b/src/llvm-julia-licm.cpp -index baf844dffa..e09f5cad92 100644 ---- a/src/llvm-julia-licm.cpp -+++ b/src/llvm-julia-licm.cpp -@@ -238,7 +238,7 @@ struct JuliaLICM : public JuliaPassContext { - }); - for (unsigned i = 1; i < exit_pts.size(); i++) { - // Clone exit -- auto CI = CallInst::Create(call, {}, exit_pts[i]); -+ auto CI = CallInst::Create(call, {}, exit_pts[i]->getIterator()); - exit_pts[i] = CI; - createNewInstruction(CI, call, MSSAU); - LLVM_DEBUG(dbgs() << "Cloned and sunk gc_preserve_end: " << *CI << "\n"); -diff --git a/src/llvm-late-gc-lowering.cpp b/src/llvm-late-gc-lowering.cpp -index a254ecafab..e03fbd8ccd 100644 ---- a/src/llvm-late-gc-lowering.cpp -+++ b/src/llvm-late-gc-lowering.cpp -@@ -359,10 +359,10 @@ void LateLowerGCFrame::LiftSelect(State &S, SelectInst *SI) { - if (isa(Cond->getType())) { - Cond = ExtractElementInst::Create(Cond, - ConstantInt::get(Type::getInt32Ty(Cond->getContext()), i), -- "", SI); -+ "", SI->getIterator()); - } - assert(FalseElem->getType() == TrueElem->getType()); -- SelectInst *SelectBase = SelectInst::Create(Cond, TrueElem, FalseElem, "gclift", SI); -+ SelectInst *SelectBase = SelectInst::Create(Cond, TrueElem, FalseElem, "gclift", SI->getIterator()); - int Number = ++S.MaxPtrNumber; - S.AllPtrNumbering[SelectBase] = Number; - S.ReversePtrNumbering[Number] = SelectBase; -@@ -400,7 +400,7 @@ void LateLowerGCFrame::LiftPhi(State &S, PHINode *Phi) { - Numbers.resize(NumRoots); - } - for (unsigned i = 0; i < NumRoots; ++i) { -- PHINode *lift = PHINode::Create(T_prjlvalue, Phi->getNumIncomingValues(), "gclift", Phi); -+ PHINode *lift = PHINode::Create(T_prjlvalue, Phi->getNumIncomingValues(), "gclift", Phi->getIterator()); - int Number = ++S.MaxPtrNumber; - S.AllPtrNumbering[lift] = Number; - S.ReversePtrNumbering[Number] = lift; -@@ -1995,7 +1995,7 @@ bool LateLowerGCFrame::CleanupIR(Function &F, State *S, bool *CFGModified) { - if (T_prjlvalue) { - T_pprjlvalue = T_prjlvalue->getPointerTo(); - Frame = new AllocaInst(T_prjlvalue, allocaAddressSpace, -- ConstantInt::get(T_int32, maxframeargs), "jlcallframe", StartOff); -+ ConstantInt::get(T_int32, maxframeargs), "jlcallframe", StartOff->getIterator()); - } - SmallVector write_barriers; - for (BasicBlock &BB : F) { -@@ -2036,13 +2036,13 @@ bool LateLowerGCFrame::CleanupIR(Function &F, State *S, bool *CFGModified) { - /* No replacement */ - } else if (pointer_from_objref_func != nullptr && callee == pointer_from_objref_func) { - auto *obj = CI->getOperand(0); -- auto *ASCI = new AddrSpaceCastInst(obj, CI->getType(), "", CI); -+ auto *ASCI = new AddrSpaceCastInst(obj, CI->getType(), "", CI->getIterator()); - ASCI->takeName(CI); - CI->replaceAllUsesWith(ASCI); - UpdatePtrNumbering(CI, ASCI, S); - } else if (gc_loaded_func != nullptr && callee == gc_loaded_func) { - auto *obj = CI->getOperand(1); -- auto *ASCI = new AddrSpaceCastInst(obj, CI->getType(), "", CI); -+ auto *ASCI = new AddrSpaceCastInst(obj, CI->getType(), "", CI->getIterator()); - ASCI->takeName(CI); - CI->replaceAllUsesWith(ASCI); - UpdatePtrNumbering(CI, ASCI, S); -@@ -2195,7 +2195,7 @@ bool LateLowerGCFrame::CleanupIR(Function &F, State *S, bool *CFGModified) { - FunctionType *FTy = callee == call3_func ? JuliaType::get_jlfunc3_ty(CI->getContext()) : - callee == call2_func ? JuliaType::get_jlfunc2_ty(CI->getContext()) : - JuliaType::get_jlfunc_ty(CI->getContext()); -- CallInst *NewCall = CallInst::Create(FTy, new_callee, ReplacementArgs, "", CI); -+ CallInst *NewCall = CallInst::Create(FTy, new_callee, ReplacementArgs, "", CI->getIterator()); - NewCall->setTailCallKind(CI->getTailCallKind()); - auto callattrs = CI->getAttributes(); - callattrs = AttributeList::get(CI->getContext(), getFnAttrs(callattrs), getRetAttrs(callattrs), {}); -@@ -2211,7 +2211,7 @@ bool LateLowerGCFrame::CleanupIR(Function &F, State *S, bool *CFGModified) { - ++it; - continue; - } else { -- CallInst *NewCall = CallInst::Create(CI, None, CI); -+ CallInst *NewCall = CallInst::Create(CI, None, CI->getIterator()); - NewCall->takeName(CI); - NewCall->copyMetadata(*CI); - CI->replaceAllUsesWith(NewCall); -@@ -2277,14 +2277,14 @@ void LateLowerGCFrame::PlaceGCFrameStore(State &S, unsigned R, unsigned MinColor - auto slotAddress = CallInst::Create( - getOrDeclare(jl_intrinsics::getGCFrameSlot), - {GCFrame, ConstantInt::get(Type::getInt32Ty(InsertBefore->getContext()), Colors[R] + MinColorRoot)}, -- "gc_slot_addr_" + StringRef(std::to_string(Colors[R] + MinColorRoot)), InsertBefore); -+ "gc_slot_addr_" + StringRef(std::to_string(Colors[R] + MinColorRoot)), InsertBefore->getIterator()); - - Value *Val = GetPtrForNumber(S, R, InsertBefore); - // Pointee types don't have semantics, so the optimizer is - // free to rewrite them if convenient. We need to change - // it back here for the store. - assert(Val->getType() == T_prjlvalue); -- new StoreInst(Val, slotAddress, InsertBefore); -+ new StoreInst(Val, slotAddress, InsertBefore->getIterator()); - } - - void LateLowerGCFrame::PlaceGCFrameReset(State &S, unsigned R, unsigned MinColorRoot, -@@ -2445,7 +2445,7 @@ void LateLowerGCFrame::PlaceRootsAndUpdateCalls(ArrayRef Colors, int PreAss - assert(Elem->getType() == T_prjlvalue); - //auto Idxs = ArrayRef(Tracked[i]); - //Value *Elem = ExtractScalar(Base, true, Idxs, SI); -- Value *shadowStore = new StoreInst(Elem, slotAddress, SI); -+ Value *shadowStore = new StoreInst(Elem, slotAddress, SI->getIterator()); - (void)shadowStore; - // TODO: shadowStore->setMetadata(LLVMContext::MD_tbaa, tbaa_gcframe); - AllocaSlot++; -diff --git a/src/llvm-lower-handlers.cpp b/src/llvm-lower-handlers.cpp -index c359bf6c11..5beeedfd05 100644 ---- a/src/llvm-lower-handlers.cpp -+++ b/src/llvm-lower-handlers.cpp -@@ -171,7 +171,7 @@ static bool lowerExcHandlers(Function &F) { - unsigned allocaAddressSpace = F.getParent()->getDataLayout().getAllocaAddrSpace(); - for (int i = 0; i < MaxDepth; ++i) { - auto *buff = new AllocaInst(Type::getInt8Ty(F.getContext()), allocaAddressSpace, -- handler_sz, Align(16), "", firstInst); -+ handler_sz, Align(16), "", firstInst->getIterator()); - if (allocaAddressSpace) { - AddrSpaceCastInst *buff_casted = new AddrSpaceCastInst(buff, PointerType::get(F.getContext(), AddressSpace::Generic)); - buff_casted->insertAfter(buff); -@@ -186,17 +186,17 @@ static bool lowerExcHandlers(Function &F) { - assert(it.second >= 0); - Instruction *buff = buffs[it.second]; - CallInst *enter = it.first; -- auto new_enter = CallInst::Create(jlenter_func, {enter->getArgOperand(0), buff}, "", enter); -+ auto new_enter = CallInst::Create(jlenter_func, {enter->getArgOperand(0), buff}, "", enter->getIterator()); - Value *lifetime_args[] = { - handler_sz64, - buff - }; -- CallInst::Create(lifetime_start, lifetime_args, "", new_enter); -+ CallInst::Create(lifetime_start, lifetime_args, "", new_enter->getIterator()); - CallInst *sj; - if (!TT.isOSWindows()) { -- sj = CallInst::Create(setjmp_func, {buff, ConstantInt::get(Type::getInt32Ty(F.getContext()), 0)}, "", enter); -+ sj = CallInst::Create(setjmp_func, {buff, ConstantInt::get(Type::getInt32Ty(F.getContext()), 0)}, "", enter->getIterator()); - } else { -- sj = CallInst::Create(setjmp_func, buff, "", enter); -+ sj = CallInst::Create(setjmp_func, buff, "", enter->getIterator()); - } - // We need to mark this on the call site as well. See issue #6757 - sj->setCanReturnTwice(); -@@ -219,8 +219,8 @@ static bool lowerExcHandlers(Function &F) { - for (auto *EEI : ToErase) - EEI->eraseFromParent(); - if (!enter->use_empty()) { -- Value *agg = InsertValueInst::Create(UndefValue::get(enter->getType()), sj, ArrayRef(0), "", enter); -- agg = InsertValueInst::Create(agg, buff, ArrayRef(1), "", enter); -+ Value *agg = InsertValueInst::Create(UndefValue::get(enter->getType()), sj, ArrayRef(0), "", enter->getIterator()); -+ agg = InsertValueInst::Create(agg, buff, ArrayRef(1), "", enter->getIterator()); - enter->replaceAllUsesWith(agg); - } - enter->eraseFromParent(); -diff --git a/src/llvm-multiversioning.cpp b/src/llvm-multiversioning.cpp -index a76d076ebd..2961a77e08 100644 ---- a/src/llvm-multiversioning.cpp -+++ b/src/llvm-multiversioning.cpp -@@ -767,7 +767,7 @@ std::pair CloneCtx::get_reloc_slot(Function *F) const - } - - template --static Value *rewrite_inst_use(const Stack& stack, Type *T_size, Value *replace, Instruction *insert_before) -+static Value *rewrite_inst_use(const Stack& stack, Type *T_size, Value *replace, InsertPosition& insert_before) - { - SmallVector args; - uint32_t nlevel = stack.size(); -@@ -828,9 +828,9 @@ static void replaceUsesWithLoad(Function &F, Type *T_size, I2GV should_replace, - GlobalVariable *slot = should_replace(*use_i); - if (!slot) - continue; -- Instruction *insert_before = use_i; -+ InsertPosition insert_before = use_i->getIterator(); - if (auto phi = dyn_cast(use_i)) -- insert_before = phi->getIncomingBlock(*info.use)->getTerminator(); -+ insert_before = phi->getIncomingBlock(*info.use)->getTerminator()->getIterator(); - Instruction *ptr = new LoadInst(F.getType(), slot, "", false, insert_before); - ptr->setMetadata(llvm::LLVMContext::MD_tbaa, tbaa_const); - ptr->setMetadata(llvm::LLVMContext::MD_invariant_load, MDNode::get(ptr->getContext(), None)); -diff --git a/src/llvm-ptls.cpp b/src/llvm-ptls.cpp -index e361368595..52d324ec4c 100644 ---- a/src/llvm-ptls.cpp -+++ b/src/llvm-ptls.cpp -@@ -190,7 +190,7 @@ void LowerPTLS::fix_pgcstack_use(CallInst *pgcstack, Function *pgcstack_getter, - phi->addIncoming(pgcstack, fastTerm->getParent()); - // emit pre-return cleanup - if (CountTrackedPointers(pgcstack->getParent()->getParent()->getReturnType()).count == 0) { -- auto last_gc_state = PHINode::Create(Type::getInt8Ty(pgcstack->getContext()), 2, "", phi); -+ auto last_gc_state = PHINode::Create(Type::getInt8Ty(pgcstack->getContext()), 2, "", phi->getIterator()); - // if we called jl_adopt_thread, we must end this cfunction back in the safe-state - last_gc_state->addIncoming(ConstantInt::get(Type::getInt8Ty(M->getContext()), JL_GC_STATE_SAFE), slowTerm->getParent()); - last_gc_state->addIncoming(prior, fastTerm->getParent()); -@@ -277,7 +277,7 @@ void LowerPTLS::fix_pgcstack_use(CallInst *pgcstack, Function *pgcstack_getter, - if (TargetTriple.isOSDarwin()) { - assert(sizeof(k) == sizeof(uintptr_t)); - Constant *key = ConstantInt::get(T_size, (uintptr_t)k); -- auto new_pgcstack = CallInst::Create(FT_pgcstack_getter, val, {key}, "", pgcstack); -+ auto new_pgcstack = CallInst::Create(FT_pgcstack_getter, val, {key}, "", pgcstack->getIterator()); - new_pgcstack->takeName(pgcstack); - pgcstack->replaceAllUsesWith(new_pgcstack); - pgcstack->eraseFromParent(); --- -2.34.1 - diff --git a/julia-patches/390300d9f41df6ad71f0f4196ef4885d4bd5dc48 b/julia-patches/390300d9f41df6ad71f0f4196ef4885d4bd5dc48 deleted file mode 100644 index 99020ce..0000000 --- a/julia-patches/390300d9f41df6ad71f0f4196ef4885d4bd5dc48 +++ /dev/null @@ -1,35 +0,0 @@ -From ad2b34c78ffe06e6351b5b311f9e93a5b1c4a270 Mon Sep 17 00:00:00 2001 -From: Zentrik -Date: Fri, 8 Nov 2024 21:33:31 +0000 -Subject: [PATCH] 390300d9f41df6ad71f0f4196ef4885d4bd5dc48 - -Adapt to "Add ThinOrFullLTOPhase to optimizer pipeline" ---- - src/pipeline.cpp | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/src/pipeline.cpp b/src/pipeline.cpp -index 5e29b56675..4523c80033 100644 ---- a/src/pipeline.cpp -+++ b/src/pipeline.cpp -@@ -250,7 +250,7 @@ namespace { - std::enable_if_t(nullptr))::value, void> invokeOptimizerEarlyCallbacks(ModulePassManager &MPM, PB_t *PB, OptimizationLevel O) JL_NOTSAFEPOINT { - static_assert(std::is_same::value, "Expected PassBuilder as second argument!"); - if (!PB) return; -- PB->invokeOptimizerEarlyEPCallbacks(MPM, O); -+ PB->invokeOptimizerEarlyEPCallbacks(MPM, O, ThinOrFullLTOPhase::None); - } - template - std::enable_if_t(nullptr))::value, void> invokeLateLoopOptimizationCallbacks(LoopPassManager &LPM, PB_t *PB, OptimizationLevel O) JL_NOTSAFEPOINT { -@@ -280,7 +280,7 @@ namespace { - std::enable_if_t(nullptr))::value, void> invokeOptimizerLastCallbacks(ModulePassManager &MPM, PB_t *PB, OptimizationLevel O) JL_NOTSAFEPOINT { - static_assert(std::is_same::value, "Expected PassBuilder as second argument!"); - if (!PB) return; -- PB->invokeOptimizerLastEPCallbacks(MPM, O); -+ PB->invokeOptimizerLastEPCallbacks(MPM, O, ThinOrFullLTOPhase::None); - } - - // Fallbacks --- -2.34.1 - diff --git a/julia-patches/52c338daece1ea5556865373c777bdad79a05fd8 b/julia-patches/52c338daece1ea5556865373c777bdad79a05fd8 deleted file mode 100644 index 89e6517..0000000 --- a/julia-patches/52c338daece1ea5556865373c777bdad79a05fd8 +++ /dev/null @@ -1,24 +0,0 @@ -From 82941079e3d04278e89bdee95cd40b826aef8994 Mon Sep 17 00:00:00 2001 -From: Zentrik -Date: Sat, 8 Feb 2025 18:50:22 +0000 -Subject: [PATCH] 52c338daece1ea5556865373c777bdad79a05fd8 - ---- - deps/csl.mk | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/deps/csl.mk b/deps/csl.mk -index fef950aa41..240089372f 100644 ---- a/deps/csl.mk -+++ b/deps/csl.mk -@@ -120,6 +120,7 @@ ifeq ($(OS),WINNT) - GCC_VERSION = 14 - install-csl: - mkdir -p $(build_private_libdir)/ -+ cp -a $(build_shlibdir)/$(call versioned_libname,libstdc++,6) $(build_shlibdir)/libstdc++.$(SHLIB_EXT) - cp -a $(build_libdir)/gcc/$(BB_TRIPLET)/$(GCC_VERSION)/libgcc_s.a $(build_private_libdir)/ - cp -a $(build_libdir)/gcc/$(BB_TRIPLET)/$(GCC_VERSION)/libgcc.a $(build_private_libdir)/ - cp -a $(build_libdir)/gcc/$(BB_TRIPLET)/$(GCC_VERSION)/libmsvcrt.a $(build_private_libdir)/ --- -2.34.1 - diff --git a/julia-patches/8aa8c0590c09a52737787ed7c35befa3fbede231 b/julia-patches/8aa8c0590c09a52737787ed7c35befa3fbede231 new file mode 100644 index 0000000..8227a93 --- /dev/null +++ b/julia-patches/8aa8c0590c09a52737787ed7c35befa3fbede231 @@ -0,0 +1,25 @@ +From 88a846f9c512eaa6788459d158b319ad63e0b5c6 Mon Sep 17 00:00:00 2001 +From: Valentin Churavy +Date: Fri, 21 Feb 2025 14:21:52 +0100 +Subject: [PATCH] Enable VPlan native-path for outer loop vectorization + +--- + src/codegen.cpp | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/src/codegen.cpp b/src/codegen.cpp +index a504bb189bdfd..0e1dcec527d6e 100644 +--- a/src/codegen.cpp ++++ b/src/codegen.cpp +@@ -10465,6 +10465,10 @@ extern "C" void jl_init_llvm(void) + clopt = llvmopts.lookup("combiner-store-merge-dependence-limit"); + if (clopt && clopt->getNumOccurrences() == 0) + cl::ProvidePositionalOption(clopt, "4", 1); ++ // Enable VPlan native path for outer loop vectorization ++ clopt = llvmopts.lookup("enable-vplan-native-path"); ++ if (clopt->getNumOccurrences() == 0) ++ cl::ProvidePositionalOption(clopt, "1", 1); + + clopt = llvmopts.lookup("time-passes"); + if (clopt && clopt->getNumOccurrences() > 0) + diff --git a/julia-patches/9a258664024d12a06ba8eb9344e270a9bb5f5d87 b/julia-patches/9a258664024d12a06ba8eb9344e270a9bb5f5d87 deleted file mode 100644 index ca1ca13..0000000 --- a/julia-patches/9a258664024d12a06ba8eb9344e270a9bb5f5d87 +++ /dev/null @@ -1,45 +0,0 @@ -From e98e0b96bfd1dea6039babd5a47a7a0569b179f3 Mon Sep 17 00:00:00 2001 -From: Zentrik -Date: Fri, 8 Nov 2024 21:02:10 +0000 -Subject: [PATCH] 9a258664024d12a06ba8eb9344e270a9bb5f5d87 - ---- - src/codegen.cpp | 9 ++++++--- - 1 file changed, 6 insertions(+), 3 deletions(-) - -diff --git a/src/codegen.cpp b/src/codegen.cpp -index 16cedabed1..39b5770e11 100644 ---- a/src/codegen.cpp -+++ b/src/codegen.cpp -@@ -76,6 +76,7 @@ - #include "llvm/Support/Path.h" // for llvm::sys::path - #include - #include -+#include - - #ifdef USE_ITTAPI - #include "ittapi/ittnotify.h" -@@ -10585,15 +10586,17 @@ namespace llvm { - class MachineBasicBlock; - class MachineFunction; - raw_ostream& operator<<(raw_ostream &OS, const MachineBasicBlock &MBB); -- void printMIR(raw_ostream &OS, const MachineFunction &MF); -+ void printMIR(raw_ostream &OS, const MachineModuleInfo &MMI, -+ const MachineFunction &MF); - } - extern "C" void jl_dump_llvm_mbb(void *v) - { - errs() << *(llvm::MachineBasicBlock*)v; - } --extern "C" void jl_dump_llvm_mfunction(void *v) -+extern "C" void jl_dump_llvm_mfunction(void *m, void *v) - { -- llvm::printMIR(errs(), *(llvm::MachineFunction*)v); -+ llvm::printMIR(errs(), *(llvm::MachineModuleInfo*)v, -+ *(llvm::MachineFunction*)v); - } - - --- -2.34.1 - diff --git a/julia-patches/b1aa0b0b88a0bca2553f8c6d6c52ec3b7205064b b/julia-patches/b1aa0b0b88a0bca2553f8c6d6c52ec3b7205064b deleted file mode 100644 index 4596950..0000000 --- a/julia-patches/b1aa0b0b88a0bca2553f8c6d6c52ec3b7205064b +++ /dev/null @@ -1,25 +0,0 @@ -From 8674a7f59e975de99d8ab801ecd70b090c3480f0 Mon Sep 17 00:00:00 2001 -From: Zentrik -Date: Fri, 8 Nov 2024 21:02:10 +0000 -Subject: [PATCH] b1aa0b0b88a0bca2553f8c6d6c52ec3b7205064b - ---- - src/jitlayers.cpp | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/src/jitlayers.cpp b/src/jitlayers.cpp -index 80642bef95..5671027fac 100644 ---- a/src/jitlayers.cpp -+++ b/src/jitlayers.cpp -@@ -1956,7 +1956,7 @@ void fixupTM(TargetMachine &TM) { - llvm::DataLayout jl_create_datalayout(TargetMachine &TM) { - // Mark our address spaces as non-integral - auto jl_data_layout = TM.createDataLayout(); -- jl_data_layout.reset(jl_data_layout.getStringRepresentation() + "-ni:10:11:12:13"); -+ jl_data_layout = DataLayout(jl_data_layout.getStringRepresentation() + "-ni:10:11:12:13"); - return jl_data_layout; - } - --- -2.34.1 - diff --git a/julia-patches/bb3f5e1fed7c6ba733b7f273e93f5d3930976185 b/julia-patches/bb3f5e1fed7c6ba733b7f273e93f5d3930976185 deleted file mode 100644 index a0d32df..0000000 --- a/julia-patches/bb3f5e1fed7c6ba733b7f273e93f5d3930976185 +++ /dev/null @@ -1,52 +0,0 @@ -From d794bc20557769f11fa1e9dc1992429ca4a62871 Mon Sep 17 00:00:00 2001 -From: Zentrik -Date: Sat, 16 Nov 2024 15:30:41 +0000 -Subject: [PATCH] bb3f5e1fed7c6ba733b7f273e93f5d3930976185 - -Rename `LLVMTargetMachine` to `CodeGenCommonTMImpl` to adapt to bb3f5e1fed7c6ba733b7f273e93f5d3930976185 ---- - src/disasm.cpp | 7 ++++--- - 1 file changed, 4 insertions(+), 3 deletions(-) - -diff --git a/src/disasm.cpp b/src/disasm.cpp -index 6a7985bd7e..f705930ac5 100644 ---- a/src/disasm.cpp -+++ b/src/disasm.cpp -@@ -99,6 +99,7 @@ - // for outputting assembly - #include - #include -+#include - #include - #include - #include -@@ -1135,7 +1136,7 @@ static void jl_dump_asm_internal( - - /// addPassesToX helper drives creation and initialization of TargetPassConfig. - static MCContext * --addPassesToGenerateCode(LLVMTargetMachine *TM, PassManagerBase &PM) { -+addPassesToGenerateCode(CodeGenTargetMachineImpl *TM, PassManagerBase &PM) { - TargetPassConfig *PassConfig = TM->createPassConfig(PM); - PassConfig->setDisableVerify(false); - PM.add(PassConfig); -@@ -1236,7 +1237,7 @@ jl_value_t *jl_dump_function_asm_impl(jl_llvmf_dump_t* dump, char emit_mc, const - f->addFnAttr(Attribute::NoUnwind); - }); - auto TMBase = jl_ExecutionEngine->cloneTargetMachine(); -- LLVMTargetMachine *TM = static_cast(TMBase.get()); -+ CodeGenTargetMachineImpl *TM = static_cast(TMBase.get()); - legacy::PassManager PM; - addTargetPasses(&PM, TM->getTargetTriple(), TM->getTargetIRAnalysis()); - if (emit_mc) { -@@ -1254,7 +1255,7 @@ jl_value_t *jl_dump_function_asm_impl(jl_llvmf_dump_t* dump, char emit_mc, const - if (!Context) - return jl_an_empty_string; - Context->setGenDwarfForAssembly(false); -- // Duplicate LLVMTargetMachine::addAsmPrinter here so we can set the asm dialect and add the custom annotation printer -+ // Duplicate CodeGenTargetMachineImpl::addAsmPrinter here so we can set the asm dialect and add the custom annotation printer - const MCSubtargetInfo &STI = *TM->getMCSubtargetInfo(); - const MCAsmInfo &MAI = *TM->getMCAsmInfo(); - const MCRegisterInfo &MRI = *TM->getMCRegisterInfo(); --- -2.34.1 - diff --git a/julia-patches/dc11c0601577afb8f67513d041ee25dabe3555b9 b/julia-patches/dc11c0601577afb8f67513d041ee25dabe3555b9 deleted file mode 100644 index 5ba2af0..0000000 --- a/julia-patches/dc11c0601577afb8f67513d041ee25dabe3555b9 +++ /dev/null @@ -1,25 +0,0 @@ -From 8c43970aede1f780cf03dd728abd82ab52f4bf24 Mon Sep 17 00:00:00 2001 -From: Zentrik -Date: Mon, 11 Nov 2024 21:03:05 +0000 -Subject: [PATCH] dc11c0601577afb8f67513d041ee25dabe3555b9 - -Adapt to move of `absoluteSymbols` ---- - src/jitlayers.cpp | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/src/jitlayers.cpp b/src/jitlayers.cpp -index 5671027fac..74b5975582 100644 ---- a/src/jitlayers.cpp -+++ b/src/jitlayers.cpp -@@ -14,6 +14,7 @@ - #include - #include - #include -+#include "llvm/ExecutionEngine/Orc/AbsoluteSymbols.h" - #if JL_LLVM_VERSION >= 180000 - #include - #include --- -2.34.1 - diff --git a/julia-patches/dc45ff1d2a01ff68326c6444dba683cf66d80651 b/julia-patches/dc45ff1d2a01ff68326c6444dba683cf66d80651 deleted file mode 100644 index b08b70a..0000000 --- a/julia-patches/dc45ff1d2a01ff68326c6444dba683cf66d80651 +++ /dev/null @@ -1,25 +0,0 @@ -From f2f6babfe7d5239524b43b8a755b3529704f75a6 Mon Sep 17 00:00:00 2001 -From: Zentrik -Date: Fri, 8 Nov 2024 21:31:19 +0000 -Subject: [PATCH] dc45ff1d2a01ff68326c6444dba683cf66d80651 - ---- - src/pipeline.cpp | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/src/pipeline.cpp b/src/pipeline.cpp -index 39f896ba65..5e29b56675 100644 ---- a/src/pipeline.cpp -+++ b/src/pipeline.cpp -@@ -238,7 +238,7 @@ namespace { - std::enable_if_t(nullptr))::value, void> invokeEarlySimplificationCallbacks(ModulePassManager &MPM, PB_t *PB, OptimizationLevel O) JL_NOTSAFEPOINT { - static_assert(std::is_same::value, "Expected PassBuilder as second argument!"); - if (!PB) return; -- PB->invokePipelineEarlySimplificationEPCallbacks(MPM, O); -+ PB->invokePipelineEarlySimplificationEPCallbacks(MPM, O, ThinOrFullLTOPhase::None); - } - template - std::enable_if_t(nullptr))::value, void> invokeCGSCCCallbacks(CGSCCPassManager &CGPM, PB_t *PB, OptimizationLevel O) JL_NOTSAFEPOINT { --- -2.34.1 - diff --git a/julia-patches/f3d2609af3031ddb54030548e86335f295cf49ca b/julia-patches/f3d2609af3031ddb54030548e86335f295cf49ca deleted file mode 100644 index 60511c5..0000000 --- a/julia-patches/f3d2609af3031ddb54030548e86335f295cf49ca +++ /dev/null @@ -1,98 +0,0 @@ -From 3a9db11a913a2ad1f62b0289d781b4a9b4415391 Mon Sep 17 00:00:00 2001 -From: Zentrik -Date: Fri, 8 Nov 2024 21:02:10 +0000 -Subject: [PATCH] f3d2609af3031ddb54030548e86335f295cf49ca - ---- - src/llvm-late-gc-lowering.cpp | 27 ++++++++++++++++++++++++++- - test/llvmpasses/late-lower-gc.ll | 15 +++++++++++++++ - 2 files changed, 41 insertions(+), 1 deletion(-) - -diff --git a/src/llvm-late-gc-lowering.cpp b/src/llvm-late-gc-lowering.cpp -index 7d6fba65a7..a254ecafab 100644 ---- a/src/llvm-late-gc-lowering.cpp -+++ b/src/llvm-late-gc-lowering.cpp -@@ -1,6 +1,7 @@ - // This file is a part of Julia. License is MIT: https://julialang.org/license - - #include "llvm-gc-interface-passes.h" -+#include "llvm/IR/Intrinsics.h" - - #define DEBUG_TYPE "late_lower_gcroot" - -@@ -204,7 +205,17 @@ static std::pair FindBaseValue(const State &S, Value *V, bool UseCac - } - // In general a load terminates a walk - break; -- } -+ } else if (II->getIntrinsicID() == Intrinsic::vector_extract) { -+ if (auto VTy = dyn_cast(II->getType())) { -+ if (hasLoadedTy(VTy->getElementType())) { -+ // TODO: For now, only support constant index. -+ auto IdxOp = cast(II->getOperand(1)); -+ fld_idx = IdxOp->getLimitedValue(INT_MAX); -+ CurrentV = II->getOperand(0); -+ } -+ } -+ } else -+ break; - } - else if (auto CI = dyn_cast(CurrentV)) { - auto callee = CI->getCalledFunction(); -@@ -518,6 +529,16 @@ SmallVector LateLowerGCFrame::NumberAllBase(State &S, Value *CurrentV) { - Numbers = NumberAll(S, IEI->getOperand(0)); - int ElNumber = Number(S, IEI->getOperand(1)); - Numbers[idx] = ElNumber; -+ } else if (auto * VII = dyn_cast(CurrentV)) { -+ if (VII->getIntrinsicID() == Intrinsic::vector_insert) { -+ Numbers = NumberAll(S, VII->getOperand(0)); -+ int first_idx = cast(VII->getOperand(2))->getZExtValue(); -+ SmallVector Numbers2 = NumberAll(S, VII->getOperand(1)); -+ for (unsigned i = 0; i < Numbers2.size(); ++i) { -+ dbgs() << Numbers2[i] << " "<< first_idx + i << "\n"; -+ Numbers[first_idx + i] = Numbers2[i]; -+ } -+ } - } else if (auto *IVI = dyn_cast(CurrentV)) { - Numbers = NumberAll(S, IVI->getAggregateOperand()); - auto Tracked = TrackCompositeType(IVI->getType()); -@@ -1150,6 +1171,10 @@ State LateLowerGCFrame::LocalScan(Function &F) { - } - } - } -+ if (II->getIntrinsicID() == Intrinsic::vector_extract || II->getIntrinsicID() == Intrinsic::vector_insert) { -+ // These are not real defs -+ continue; -+ } - } - auto callee = CI->getCalledFunction(); - if (callee && callee == typeof_func) { -diff --git a/test/llvmpasses/late-lower-gc.ll b/test/llvmpasses/late-lower-gc.ll -index d294847db8..c66c25562c 100644 ---- a/test/llvmpasses/late-lower-gc.ll -+++ b/test/llvmpasses/late-lower-gc.ll -@@ -150,6 +150,21 @@ define {} addrspace(10)* @gclift_switch({} addrspace(13)* addrspace(10)* %input, - ret {} addrspace(10)* %ret - } - -+; Shouldn't hang -+define void @vector_insert(<4 x {} addrspace(10)* > %0, <2 x {} addrspace(10)* > %1) { -+top: -+ %pgcstack = call ptr @julia.get_pgcstack() -+ %2 = call <4 x {} addrspace(10)*> @llvm.vector.insert.v4p10.v2p10(<4 x {} addrspace(10)*> %0, <2 x {} addrspace(10)*> %1, i64 2) -+ ret void -+} -+ -+define void @vector_extract(<4 x {} addrspace(10)* > %0, <2 x {} addrspace(10)* > %1) { -+top: -+ %pgcstack = call ptr @julia.get_pgcstack() -+ %2 = call <2 x {} addrspace(10)*> @llvm.vector.extract.v2p10.v4p10(<4 x {} addrspace(10)* > %0, i64 2) -+ ret void -+} -+ - define void @decayar([2 x {} addrspace(10)* addrspace(11)*] %ar) { - %v2 = call {}*** @julia.get_pgcstack() - %e0 = extractvalue [2 x {} addrspace(10)* addrspace(11)*] %ar, 0 --- -2.34.1 - diff --git a/julia-patches/f6b0555a433cea1d32a6904c120516cd94b8f3db b/julia-patches/f6b0555a433cea1d32a6904c120516cd94b8f3db deleted file mode 100644 index f71d695..0000000 --- a/julia-patches/f6b0555a433cea1d32a6904c120516cd94b8f3db +++ /dev/null @@ -1,79 +0,0 @@ -From 5243a374eadb5986177fea7f6a790d187e24241c Mon Sep 17 00:00:00 2001 -From: Zentrik -Date: Sat, 8 Feb 2025 18:50:47 +0000 -Subject: [PATCH] f6b0555a433cea1d32a6904c120516cd94b8f3db - ---- - src/disasm.cpp | 21 ++------------------- - 1 file changed, 2 insertions(+), 19 deletions(-) - -diff --git a/src/disasm.cpp b/src/disasm.cpp -index f705930ac5..25b0e7995b 100644 ---- a/src/disasm.cpp -+++ b/src/disasm.cpp -@@ -100,7 +100,6 @@ - #include - #include - #include --#include - #include - #include - #include -@@ -1150,11 +1149,7 @@ addPassesToGenerateCode(CodeGenTargetMachineImpl *TM, PassManagerBase &PM) { - return &MMIWP->getMMI().getContext(); - } - --#if JL_LLVM_VERSION >= 190000 --class LineNumberPrinterHandler : public DebugHandlerBase { --#else - class LineNumberPrinterHandler : public AsmPrinterHandler { --#endif - MCStreamer &S; - LineNumberAnnotatedWriter LinePrinter; - std::string Buffer; -@@ -1163,11 +1158,7 @@ class LineNumberPrinterHandler : public AsmPrinterHandler { - - public: - LineNumberPrinterHandler(AsmPrinter &Printer, const char *debuginfo) -- : --#if JL_LLVM_VERSION >= 190000 -- DebugHandlerBase(&Printer), --#endif -- S(*Printer.OutStreamer), -+ : S(*Printer.OutStreamer), - LinePrinter("; ", true, debuginfo), - RawStream(Buffer), - Stream(RawStream) {} -@@ -1186,20 +1177,12 @@ public: - //virtual void beginModule(Module *M) override {} - virtual void endModule() override {} - /// note that some AsmPrinter implementations may not call beginFunction at all --#if JL_LLVM_VERSION >= 190000 -- virtual void beginFunctionImpl(const MachineFunction *MF) override { --#else - virtual void beginFunction(const MachineFunction *MF) override { --#endif - LinePrinter.emitFunctionAnnot(&MF->getFunction(), Stream); - emitAndReset(); - } - //virtual void markFunctionEnd() override {} --#if JL_LLVM_VERSION >= 190000 -- virtual void endFunctionImpl(const MachineFunction *MF) override { --#else - virtual void endFunction(const MachineFunction *MF) override { --#endif - LinePrinter.emitEnd(Stream); - emitAndReset(); - } -@@ -1285,7 +1268,7 @@ jl_value_t *jl_dump_function_asm_impl(jl_llvmf_dump_t* dump, char emit_mc, const - std::unique_ptr Printer( - TM->getTarget().createAsmPrinter(*TM, std::move(S))); - #if JL_LLVM_VERSION >= 190000 -- Printer->addDebugHandler( -+ Printer->addAsmPrinterHandler( - std::make_unique(*Printer, debuginfo)); - #else - Printer->addAsmPrinterHandler(AsmPrinter::HandlerInfo( --- -2.34.1 - diff --git a/julia-patches/fa789dffb1e12c2aece0187aeacc48dfb1768340 b/julia-patches/fa789dffb1e12c2aece0187aeacc48dfb1768340 deleted file mode 100644 index 7299313..0000000 --- a/julia-patches/fa789dffb1e12c2aece0187aeacc48dfb1768340 +++ /dev/null @@ -1,276 +0,0 @@ -From d55775f3f02ceff92e18a8105052f8974716a743 Mon Sep 17 00:00:00 2001 -From: Zentrik -Date: Fri, 8 Nov 2024 21:02:11 +0000 -Subject: [PATCH] fa789dffb1e12c2aece0187aeacc48dfb1768340 - ---- - src/ccall.cpp | 2 +- - src/cgutils.cpp | 10 +++++----- - src/codegen.cpp | 10 +++++----- - src/intrinsics.cpp | 28 ++++++++++++++-------------- - src/llvm-alloc-opt.cpp | 6 +++--- - src/llvm-lower-handlers.cpp | 4 ++-- - src/llvm-propagate-addrspaces.cpp | 4 ++-- - 7 files changed, 32 insertions(+), 32 deletions(-) - -diff --git a/src/ccall.cpp b/src/ccall.cpp -index ce7806ae1e..e5ef822286 100644 ---- a/src/ccall.cpp -+++ b/src/ccall.cpp -@@ -2107,7 +2107,7 @@ jl_cgval_t function_sig_t::emit_a_ccall( - if (res == Intrinsic::MatchIntrinsicTypes_Match) { - bool matchvararg = !Intrinsic::matchIntrinsicVarArg(functype->isVarArg(), TableRef); - if (matchvararg) { -- Function *intrinsic = Intrinsic::getDeclaration(jl_Module, ID, overloadTys); -+ Function *intrinsic = Intrinsic::getOrInsertDeclaration(jl_Module, ID, overloadTys); - assert(intrinsic->getFunctionType() == functype); - if (intrinsic->getName() == f_name || Intrinsic::getBaseName(ID) == f_name) - llvmf = intrinsic; -diff --git a/src/cgutils.cpp b/src/cgutils.cpp -index 3987950359..c1796d907e 100644 ---- a/src/cgutils.cpp -+++ b/src/cgutils.cpp -@@ -3672,7 +3672,7 @@ static Value *box_union(jl_codectx_t &ctx, const jl_cgval_t &vinfo, const SmallB - ctx.builder.CreateBr(postBB); - } - else if (!vinfo.Vboxed) { -- Function *trap_func = Intrinsic::getDeclaration( -+ Function *trap_func = Intrinsic::getOrInsertDeclaration( - ctx.f->getParent(), - Intrinsic::trap); - ctx.builder.CreateCall(trap_func); -@@ -3716,7 +3716,7 @@ static Function *mangleIntrinsic(IntrinsicInst *call) //mangling based on replac - assert(matchvararg); - (void)matchvararg; - } -- auto newF = Intrinsic::getDeclaration(call->getModule(), ID, overloadTys); -+ auto newF = Intrinsic::getOrInsertDeclaration(call->getModule(), ID, overloadTys); - assert(newF->getFunctionType() == newfType); - newF->setCallingConv(call->getCallingConv()); - return newF; -@@ -3852,7 +3852,7 @@ static void emit_unionmove(jl_codectx_t &ctx, Value *dest, MDNode *tbaa_dst, con - if (nb > 0) { - if (!src_ptr) { - Function *trap_func = -- Intrinsic::getDeclaration(ctx.f->getParent(), Intrinsic::trap); -+ Intrinsic::getOrInsertDeclaration(ctx.f->getParent(), Intrinsic::trap); - ctx.builder.CreateCall(trap_func); - ctx.builder.CreateUnreachable(); - return; -@@ -3867,7 +3867,7 @@ static void emit_unionmove(jl_codectx_t &ctx, Value *dest, MDNode *tbaa_dst, con - counter); - ctx.builder.SetInsertPoint(defaultBB); - if (!skip && allunboxed && (src.V == NULL || isa(src.V))) { -- Function *trap_func = Intrinsic::getDeclaration( -+ Function *trap_func = Intrinsic::getOrInsertDeclaration( - ctx.f->getParent(), - Intrinsic::trap); - ctx.builder.CreateCall(trap_func); -@@ -4694,7 +4694,7 @@ static jl_cgval_t emit_memoryref(jl_codectx_t &ctx, const jl_cgval_t &ref, jl_cg - Value *boffset; - #if 0 - if (bc) { -- auto *MulF = Intrinsic::getDeclaration(jl_Module, Intrinsic::smul_with_overflow, offset->getType()); -+ auto *MulF = Intrinsic::getOrInsertDeclaration(jl_Module, Intrinsic::smul_with_overflow, offset->getType()); - CallInst *Mul = ctx.builder.CreateCall(MulF, {offset, elsz}); - boffset = ctx.builder.CreateExtractValue(Mul, 0); - ovflw = ctx.builder.CreateExtractValue(Mul, 1); -diff --git a/src/codegen.cpp b/src/codegen.cpp -index 8df985bd6d..baa05fbc30 100644 ---- a/src/codegen.cpp -+++ b/src/codegen.cpp -@@ -2636,7 +2636,7 @@ static void alloc_def_flag(jl_codectx_t &ctx, jl_varinfo_t& vi) - static void CreateTrap(IRBuilder<> &irbuilder, bool create_new_block) - { - Function *f = irbuilder.GetInsertBlock()->getParent(); -- Function *trap_func = Intrinsic::getDeclaration( -+ Function *trap_func = Intrinsic::getOrInsertDeclaration( - f->getParent(), - Intrinsic::trap); - irbuilder.CreateCall(trap_func); -@@ -2659,7 +2659,7 @@ static void CreateConditionalAbort(IRBuilder<> &irbuilder, Value *test) - BasicBlock *postBB = BasicBlock::Create(irbuilder.getContext(), "post_abort", f); - irbuilder.CreateCondBr(test, abortBB, postBB); - irbuilder.SetInsertPoint(abortBB); -- Function *trap_func = Intrinsic::getDeclaration( -+ Function *trap_func = Intrinsic::getOrInsertDeclaration( - f->getParent(), - Intrinsic::trap); - irbuilder.CreateCall(trap_func); -@@ -3625,7 +3625,7 @@ static Value *emit_bitsunion_compare(jl_codectx_t &ctx, const jl_cgval_t &arg1, - counter); - assert(allunboxed); (void)allunboxed; - ctx.builder.SetInsertPoint(defaultBB); -- Function *trap_func = Intrinsic::getDeclaration( -+ Function *trap_func = Intrinsic::getOrInsertDeclaration( - ctx.f->getParent(), - Intrinsic::trap); - ctx.builder.CreateCall(trap_func); -@@ -7967,8 +7967,8 @@ static Function *gen_cfun_wrapper( - Function::arg_iterator AI = cw_make->arg_begin(); - Argument *Tramp = &*AI; ++AI; - Argument *NVal = &*AI; ++AI; -- Function *init_trampoline = Intrinsic::getDeclaration(cw_make->getParent(), Intrinsic::init_trampoline); -- Function *adjust_trampoline = Intrinsic::getDeclaration(cw_make->getParent(), Intrinsic::adjust_trampoline); -+ Function *init_trampoline = Intrinsic::getOrInsertDeclaration(cw_make->getParent(), Intrinsic::init_trampoline); -+ Function *adjust_trampoline = Intrinsic::getOrInsertDeclaration(cw_make->getParent(), Intrinsic::adjust_trampoline); - cwbuilder.CreateCall(init_trampoline, { - Tramp, - cw, -diff --git a/src/intrinsics.cpp b/src/intrinsics.cpp -index 4006397d08..c4bcb85e43 100644 ---- a/src/intrinsics.cpp -+++ b/src/intrinsics.cpp -@@ -1539,7 +1539,7 @@ static Value *emit_untyped_intrinsic(jl_codectx_t &ctx, intrinsic f, ArrayRefgetType() == x->getType()); - assert(z->getType() == y->getType()); -- FunctionCallee fmaintr = Intrinsic::getDeclaration(jl_Module, Intrinsic::fma, ArrayRef(t)); -+ FunctionCallee fmaintr = Intrinsic::getOrInsertDeclaration(jl_Module, Intrinsic::fma, ArrayRef(t)); - return ctx.builder.CreateCall(fmaintr, {x, y, z}); - } - case muladd_float: { -@@ -1569,7 +1569,7 @@ static Value *emit_untyped_intrinsic(jl_codectx_t &ctx, intrinsic f, ArrayRef(t)); -+ FunctionCallee intr = Intrinsic::getOrInsertDeclaration(jl_Module, intr_id, ArrayRef(t)); - Value *tupval = ctx.builder.CreateCall(intr, {x, y}); - - jl_value_t *params[2]; -@@ -1680,30 +1680,30 @@ static Value *emit_untyped_intrinsic(jl_codectx_t &ctx, intrinsic f, ArrayRef(t)); //TODO: Move to deduction guides -+ FunctionCallee bswapintr = Intrinsic::getOrInsertDeclaration(jl_Module, Intrinsic::bswap, ArrayRef(t)); //TODO: Move to deduction guides - return ctx.builder.CreateCall(bswapintr, x); // when we drop LLVM 15 - } - case ctpop_int: { -- FunctionCallee ctpopintr = Intrinsic::getDeclaration(jl_Module, Intrinsic::ctpop, ArrayRef(t)); -+ FunctionCallee ctpopintr = Intrinsic::getOrInsertDeclaration(jl_Module, Intrinsic::ctpop, ArrayRef(t)); - return ctx.builder.CreateCall(ctpopintr, x); - } - case ctlz_int: { -- FunctionCallee ctlz = Intrinsic::getDeclaration(jl_Module, Intrinsic::ctlz, ArrayRef(t)); -+ FunctionCallee ctlz = Intrinsic::getOrInsertDeclaration(jl_Module, Intrinsic::ctlz, ArrayRef(t)); - y = ConstantInt::get(getInt1Ty(ctx.builder.getContext()), 0); - return ctx.builder.CreateCall(ctlz, {x, y}); - } - case cttz_int: { -- FunctionCallee cttz = Intrinsic::getDeclaration(jl_Module, Intrinsic::cttz, ArrayRef(t)); -+ FunctionCallee cttz = Intrinsic::getOrInsertDeclaration(jl_Module, Intrinsic::cttz, ArrayRef(t)); - y = ConstantInt::get(getInt1Ty(ctx.builder.getContext()), 0); - return ctx.builder.CreateCall(cttz, {x, y}); - } - - case abs_float: { -- FunctionCallee absintr = Intrinsic::getDeclaration(jl_Module, Intrinsic::fabs, ArrayRef(t)); -+ FunctionCallee absintr = Intrinsic::getOrInsertDeclaration(jl_Module, Intrinsic::fabs, ArrayRef(t)); - return ctx.builder.CreateCall(absintr, x); - } - case copysign_float: { -- FunctionCallee copyintr = Intrinsic::getDeclaration(jl_Module, Intrinsic::copysign, ArrayRef(t)); -+ FunctionCallee copyintr = Intrinsic::getOrInsertDeclaration(jl_Module, Intrinsic::copysign, ArrayRef(t)); - return ctx.builder.CreateCall(copyintr, {x, y}); - } - case flipsign_int: { -@@ -1722,27 +1722,27 @@ static Value *emit_untyped_intrinsic(jl_codectx_t &ctx, intrinsic f, ArrayRef(t)); -+ FunctionCallee ceilintr = Intrinsic::getOrInsertDeclaration(jl_Module, Intrinsic::ceil, ArrayRef(t)); - return ctx.builder.CreateCall(ceilintr, x); - } - case floor_llvm: { -- FunctionCallee floorintr = Intrinsic::getDeclaration(jl_Module, Intrinsic::floor, ArrayRef(t)); -+ FunctionCallee floorintr = Intrinsic::getOrInsertDeclaration(jl_Module, Intrinsic::floor, ArrayRef(t)); - return ctx.builder.CreateCall(floorintr, x); - } - case trunc_llvm: { -- FunctionCallee truncintr = Intrinsic::getDeclaration(jl_Module, Intrinsic::trunc, ArrayRef(t)); -+ FunctionCallee truncintr = Intrinsic::getOrInsertDeclaration(jl_Module, Intrinsic::trunc, ArrayRef(t)); - return ctx.builder.CreateCall(truncintr, x); - } - case rint_llvm: { -- FunctionCallee rintintr = Intrinsic::getDeclaration(jl_Module, Intrinsic::rint, ArrayRef(t)); -+ FunctionCallee rintintr = Intrinsic::getOrInsertDeclaration(jl_Module, Intrinsic::rint, ArrayRef(t)); - return ctx.builder.CreateCall(rintintr, x); - } - case sqrt_llvm: { -- FunctionCallee sqrtintr = Intrinsic::getDeclaration(jl_Module, Intrinsic::sqrt, ArrayRef(t)); -+ FunctionCallee sqrtintr = Intrinsic::getOrInsertDeclaration(jl_Module, Intrinsic::sqrt, ArrayRef(t)); - return ctx.builder.CreateCall(sqrtintr, x); - } - case sqrt_llvm_fast: { -- FunctionCallee sqrtintr = Intrinsic::getDeclaration(jl_Module, Intrinsic::sqrt, ArrayRef(t)); -+ FunctionCallee sqrtintr = Intrinsic::getOrInsertDeclaration(jl_Module, Intrinsic::sqrt, ArrayRef(t)); - return math_builder(ctx, true)().CreateCall(sqrtintr, x); - } - -diff --git a/src/llvm-alloc-opt.cpp b/src/llvm-alloc-opt.cpp -index 7928d6824f..5f707bd106 100644 ---- a/src/llvm-alloc-opt.cpp -+++ b/src/llvm-alloc-opt.cpp -@@ -627,7 +627,7 @@ void Optimizer::replaceIntrinsicUseWith(IntrinsicInst *call, Intrinsic::ID ID, - assert(matchvararg); - (void)matchvararg; - } -- auto newF = Intrinsic::getDeclaration(call->getModule(), ID, overloadTys); -+ auto newF = Intrinsic::getOrInsertDeclaration(call->getModule(), ID, overloadTys); - assert(newF->getFunctionType() == newfType); - newF->setCallingConv(call->getCallingConv()); - auto newCall = CallInst::Create(newF, args, "", call->getIterator()); -@@ -1283,8 +1283,8 @@ bool AllocOpt::doInitialization(Module &M) - - DL = &M.getDataLayout(); - -- lifetime_start = Intrinsic::getDeclaration(&M, Intrinsic::lifetime_start, { PointerType::get(M.getContext(), DL->getAllocaAddrSpace()) }); -- lifetime_end = Intrinsic::getDeclaration(&M, Intrinsic::lifetime_end, { PointerType::get(M.getContext(), DL->getAllocaAddrSpace()) }); -+ lifetime_start = Intrinsic::getOrInsertDeclaration(&M, Intrinsic::lifetime_start, { PointerType::get(M.getContext(), DL->getAllocaAddrSpace()) }); -+ lifetime_end = Intrinsic::getOrInsertDeclaration(&M, Intrinsic::lifetime_end, { PointerType::get(M.getContext(), DL->getAllocaAddrSpace()) }); - - return true; - } -diff --git a/src/llvm-lower-handlers.cpp b/src/llvm-lower-handlers.cpp -index 5beeedfd05..a924a61d27 100644 ---- a/src/llvm-lower-handlers.cpp -+++ b/src/llvm-lower-handlers.cpp -@@ -111,8 +111,8 @@ static bool lowerExcHandlers(Function &F) { - Function *jlenter_func = M.getFunction(XSTR(jl_enter_handler)); - Function *setjmp_func = M.getFunction(jl_setjmp_name); - auto T_ptr = PointerType::get(M.getContext(), 0); -- Function *lifetime_start = Intrinsic::getDeclaration(&M, Intrinsic::lifetime_start, { T_ptr }); -- Function *lifetime_end = Intrinsic::getDeclaration(&M, Intrinsic::lifetime_end, { T_ptr }); -+ Function *lifetime_start = Intrinsic::getOrInsertDeclaration(&M, Intrinsic::lifetime_start, { T_ptr }); -+ Function *lifetime_end = Intrinsic::getOrInsertDeclaration(&M, Intrinsic::lifetime_end, { T_ptr }); - - /* Step 1: EH Depth Numbering */ - std::map EnterDepth; -diff --git a/src/llvm-propagate-addrspaces.cpp b/src/llvm-propagate-addrspaces.cpp -index 06a52ad3dc..efb8266e06 100644 ---- a/src/llvm-propagate-addrspaces.cpp -+++ b/src/llvm-propagate-addrspaces.cpp -@@ -244,7 +244,7 @@ void PropagateJuliaAddrspacesVisitor::visitMemSetInst(MemSetInst &MI) { - Value *Replacement = LiftPointer(MI.getModule(), MI.getRawDest()); - if (!Replacement) - return; -- Function *TheFn = Intrinsic::getDeclaration(MI.getModule(), Intrinsic::memset, -+ Function *TheFn = Intrinsic::getOrInsertDeclaration(MI.getModule(), Intrinsic::memset, - {Replacement->getType(), MI.getOperand(1)->getType()}); - MI.setCalledFunction(TheFn); - MI.setArgOperand(0, Replacement); -@@ -269,7 +269,7 @@ void PropagateJuliaAddrspacesVisitor::visitMemTransferInst(MemTransferInst &MTI) - } - if (Dest == MTI.getRawDest() && Src == MTI.getRawSource()) - return; -- Function *TheFn = Intrinsic::getDeclaration(MTI.getModule(), MTI.getIntrinsicID(), -+ Function *TheFn = Intrinsic::getOrInsertDeclaration(MTI.getModule(), MTI.getIntrinsicID(), - {Dest->getType(), Src->getType(), - MTI.getOperand(2)->getType()}); - MTI.setCalledFunction(TheFn); --- -2.34.1 - diff --git a/julia-patches/ffba662dd275d1bdd5a5935f4d3cc372b5235d07 b/julia-patches/ffba662dd275d1bdd5a5935f4d3cc372b5235d07 deleted file mode 100644 index ca13067..0000000 --- a/julia-patches/ffba662dd275d1bdd5a5935f4d3cc372b5235d07 +++ /dev/null @@ -1,28 +0,0 @@ -From e6d53ab358e6e042c1b308f111de62d170574902 Mon Sep 17 00:00:00 2001 -From: Zentrik -Date: Sat, 8 Feb 2025 18:50:33 +0000 -Subject: [PATCH] ffba662dd275d1bdd5a5935f4d3cc372b5235d07 - ---- - deps/csl.mk | 5 +++++ - 1 file changed, 5 insertions(+) - -diff --git a/deps/csl.mk b/deps/csl.mk -index 240089372f..cebefc471a 100644 ---- a/deps/csl.mk -+++ b/deps/csl.mk -@@ -126,6 +126,11 @@ install-csl: - cp -a $(build_libdir)/gcc/$(BB_TRIPLET)/$(GCC_VERSION)/libmsvcrt.a $(build_private_libdir)/ - cp -a $(build_libdir)/gcc/$(BB_TRIPLET)/$(GCC_VERSION)/libssp.dll.a $(build_private_libdir)/ - cp -a $(build_libdir)/gcc/$(BB_TRIPLET)/$(GCC_VERSION)/libssp.dll.a $(build_libdir)/ -+ifeq ($(ARCH),x86_64) -+ -cp -a /mingw64/lib/libmsvcrt.a $(build_private_libdir)/ -+else -+ -cp -a /mingw32/i686-w64-mingw32/lib/libmsvcrt.a $(build_private_libdir)/ -+endif # ifeq ($(ARCH),x86_64) - endif - endif - ifeq ($(OS),WINNT) --- -2.34.1 -