1- From 7e2dc1fc3a5dc3385c15336af84be62989282324 Mon Sep 17 00:00:00 2001
1+ From 1b786a0511f3a23c59dde4637b0d41eca5af23e5 Mon Sep 17 00:00:00 2001
2233Date: Tue, 4 Feb 2025 20:44:02 +0000
44Subject: [PATCH] 29441e4f5fa5f5c7709f7cf180815ba97f611297
55
66Adapt to removal of NoCapture
77---
8- src/codegen.cpp | 24 ++++++++++++-- ----------
9- 1 file changed, 12 insertions(+), 12 deletions(-)
8+ src/codegen.cpp | 20 ++++++++++----------
9+ 1 file changed, 10 insertions(+), 10 deletions(-)
1010
1111diff --git a/src/codegen.cpp b/src/codegen.cpp
12- index 3fe7093768..69022a6e5a 100644
12+ index 1011cecc73..c00f05edc9 100644
1313--- a/src/codegen.cpp
1414+++ b/src/codegen.cpp
1515@@ -628,7 +628,7 @@ static AttributeList get_func_attrs(LLVMContext &C)
@@ -21,25 +21,7 @@ index 3fe7093768..69022a6e5a 100644
2121 }
2222
2323 static AttributeList get_donotdelete_func_attrs(LLVMContext &C)
24- @@ -995,7 +995,7 @@ static const auto jlinvoke_func = new JuliaFunction<>{
25- AttributeSet(),
26- Attributes(C, {Attribute::NonNull}),
27- {AttributeSet(),
28- - Attributes(C, {Attribute::ReadOnly, Attribute::NoCapture})}); },
29- + Attributes(C, {Attribute::ReadOnly}, {Attribute::getWithCaptureInfo(C, CaptureInfo::none())})}); },
30- };
31- static const auto jlinvokeoc_func = new JuliaFunction<>{
32- XSTR(jl_invoke_oc),
33- @@ -1004,7 +1004,7 @@ static const auto jlinvokeoc_func = new JuliaFunction<>{
34- AttributeSet(),
35- Attributes(C, {Attribute::NonNull}),
36- {AttributeSet(),
37- - Attributes(C, {Attribute::ReadOnly, Attribute::NoCapture})}); },
38- + Attributes(C, {Attribute::ReadOnly}, {Attribute::getWithCaptureInfo(C, CaptureInfo::none())})}); },
39- };
40- static const auto jlopaque_closure_call_func = new JuliaFunction<>{
41- XSTR(jl_f_opaque_closure_call),
42- @@ -1039,7 +1039,7 @@ static const auto jllockvalue_func = new JuliaFunction<>{
24+ @@ -1031,7 +1031,7 @@ static const auto jllockvalue_func = new JuliaFunction<>{
4325 [](LLVMContext &C) { return AttributeList::get(C,
4426 AttributeSet(),
4527 AttributeSet(),
@@ -48,7 +30,7 @@ index 3fe7093768..69022a6e5a 100644
4830 };
4931 static const auto jlunlockvalue_func = new JuliaFunction<>{
5032 XSTR(jl_unlock_value),
51- @@ -1048 ,7 +1048 ,7 @@ static const auto jlunlockvalue_func = new JuliaFunction<>{
33+ @@ -1040 ,7 +1040 ,7 @@ static const auto jlunlockvalue_func = new JuliaFunction<>{
5234 [](LLVMContext &C) { return AttributeList::get(C,
5335 AttributeSet(),
5436 AttributeSet(),
@@ -57,7 +39,7 @@ index 3fe7093768..69022a6e5a 100644
5739 };
5840 static const auto jllockfield_func = new JuliaFunction<>{
5941 XSTR(jl_lock_field),
60- @@ -1057 ,7 +1057 ,7 @@ static const auto jllockfield_func = new JuliaFunction<>{
42+ @@ -1049 ,7 +1049 ,7 @@ static const auto jllockfield_func = new JuliaFunction<>{
6143 [](LLVMContext &C) { return AttributeList::get(C,
6244 AttributeSet(),
6345 AttributeSet(),
@@ -66,7 +48,7 @@ index 3fe7093768..69022a6e5a 100644
6648 };
6749 static const auto jlunlockfield_func = new JuliaFunction<>{
6850 XSTR(jl_unlock_field),
69- @@ -1066 ,7 +1066 ,7 @@ static const auto jlunlockfield_func = new JuliaFunction<>{
51+ @@ -1058 ,7 +1058 ,7 @@ static const auto jlunlockfield_func = new JuliaFunction<>{
7052 [](LLVMContext &C) { return AttributeList::get(C,
7153 AttributeSet(),
7254 AttributeSet(),
@@ -75,7 +57,7 @@ index 3fe7093768..69022a6e5a 100644
7557 };
7658 static const auto jlenter_func = new JuliaFunction<>{
7759 XSTR(jl_enter_handler),
78- @@ -1529 ,7 +1529 ,7 @@ static const auto gc_loaded_func = new JuliaFunction<>{
60+ @@ -1528 ,7 +1528 ,7 @@ static const auto gc_loaded_func = new JuliaFunction<>{
7961 RetAttrs.addAttribute(Attribute::NonNull);
8062 RetAttrs.addAttribute(Attribute::NoUndef);
8163 return AttributeList::get(C, AttributeSet::get(C,FnAttrs), AttributeSet::get(C,RetAttrs),
@@ -84,41 +66,41 @@ index 3fe7093768..69022a6e5a 100644
8466 Attributes(C, {Attribute::NonNull, Attribute::NoUndef, Attribute::ReadNone}) });
8567 },
8668 };
87- @@ -8223 ,7 +8223 ,7 @@ static jl_returninfo_t get_specsig_function(jl_codectx_t &ctx , Module *M, Value
88- AttrBuilder param(ctx.builder. getContext());
69+ @@ -8382 ,7 +8382 ,7 @@ static jl_returninfo_t get_specsig_function(jl_codegen_params_t ¶ms , Module
70+ AttrBuilder param(M-> getContext());
8971 param.addStructRetAttr(srt);
9072 param.addAttribute(Attribute::NoAlias);
9173- param.addAttribute(Attribute::NoCapture);
9274+ param.addCapturesAttr(llvm::CaptureInfo::none());
9375 param.addAttribute(Attribute::NoUndef);
94- attrs.push_back(AttributeSet::get(ctx.builder. getContext(), param));
76+ attrs.push_back(AttributeSet::get(M-> getContext(), param));
9577 assert(fsig.size() == 1);
96- @@ -8231 ,7 +8231 ,7 @@ static jl_returninfo_t get_specsig_function(jl_codectx_t &ctx , Module *M, Value
78+ @@ -8390 ,7 +8390 ,7 @@ static jl_returninfo_t get_specsig_function(jl_codegen_params_t ¶ms , Module
9779 if (props.cc == jl_returninfo_t::Union) {
98- AttrBuilder param(ctx.builder. getContext());
80+ AttrBuilder param(M-> getContext());
9981 param.addAttribute(Attribute::NoAlias);
10082- param.addAttribute(Attribute::NoCapture);
10183+ param.addCapturesAttr(llvm::CaptureInfo::none());
10284 param.addAttribute(Attribute::NoUndef);
103- attrs.push_back(AttributeSet::get(ctx.builder. getContext(), param));
85+ attrs.push_back(AttributeSet::get(M-> getContext(), param));
10486 assert(fsig.size() == 1);
105- @@ -8240 ,7 +8240 ,7 @@ static jl_returninfo_t get_specsig_function(jl_codectx_t &ctx , Module *M, Value
87+ @@ -8399 ,7 +8399 ,7 @@ static jl_returninfo_t get_specsig_function(jl_codegen_params_t ¶ms , Module
10688 if (props.return_roots) {
107- AttrBuilder param(ctx.builder. getContext());
89+ AttrBuilder param(M-> getContext());
10890 param.addAttribute(Attribute::NoAlias);
10991- param.addAttribute(Attribute::NoCapture);
11092+ param.addCapturesAttr(llvm::CaptureInfo::none());
11193 param.addAttribute(Attribute::NoUndef);
112- attrs.push_back(AttributeSet::get(ctx.builder. getContext(), param));
113- fsig.push_back(ctx.types().T_ptr );
114- @@ -8273 ,7 +8273 ,7 @@ static jl_returninfo_t get_specsig_function(jl_codectx_t &ctx , Module *M, Value
115- AttrBuilder param(ctx.builder. getContext());
94+ attrs.push_back(AttributeSet::get(M-> getContext(), param));
95+ fsig.push_back(getPointerTy(M->getContext()) );
96+ @@ -8432 ,7 +8432 ,7 @@ static jl_returninfo_t get_specsig_function(jl_codegen_params_t ¶ms , Module
97+ AttrBuilder param(M-> getContext());
11698 Type *ty = et;
11799 if (et == nullptr || et->isAggregateType()) { // aggregate types are passed by pointer
118100- param.addAttribute(Attribute::NoCapture);
119101+ param.addCapturesAttr(llvm::CaptureInfo::none());
120102 param.addAttribute(Attribute::ReadOnly);
121- ty = ctx.builder.getPtrTy( AddressSpace::Derived);
103+ ty = PointerType::get(M->getContext(), AddressSpace::Derived);
122104 }
123105--
1241062.34.1
0 commit comments