Skip to content

Commit f6dc2cb

Browse files
authored
* Test patch for llvm/llvm-project@29441e4 * Try again * Try try again * Try try try again
1 parent 13903ff commit f6dc2cb

File tree

1 file changed

+125
-0
lines changed

1 file changed

+125
-0
lines changed
Lines changed: 125 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,125 @@
1+
From 7e2dc1fc3a5dc3385c15336af84be62989282324 Mon Sep 17 00:00:00 2001
2+
From: Zentrik <[email protected]>
3+
Date: Tue, 4 Feb 2025 20:44:02 +0000
4+
Subject: [PATCH] 29441e4f5fa5f5c7709f7cf180815ba97f611297
5+
6+
Adapt to removal of NoCapture
7+
---
8+
src/codegen.cpp | 24 ++++++++++++------------
9+
1 file changed, 12 insertions(+), 12 deletions(-)
10+
11+
diff --git a/src/codegen.cpp b/src/codegen.cpp
12+
index 3fe7093768..69022a6e5a 100644
13+
--- a/src/codegen.cpp
14+
+++ b/src/codegen.cpp
15+
@@ -628,7 +628,7 @@ static AttributeList get_func_attrs(LLVMContext &C)
16+
AttributeSet(),
17+
Attributes(C, {Attribute::NonNull}),
18+
{AttributeSet(),
19+
- Attributes(C, {Attribute::NoAlias, Attribute::ReadOnly, Attribute::NoCapture, Attribute::NoUndef})});
20+
+ Attributes(C, {Attribute::NoAlias, Attribute::ReadOnly, Attribute::NoUndef}, {Attribute::getWithCaptureInfo(C, CaptureInfo::none())})});
21+
}
22+
23+
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<>{
43+
[](LLVMContext &C) { return AttributeList::get(C,
44+
AttributeSet(),
45+
AttributeSet(),
46+
- {Attributes(C, {Attribute::NoCapture})}); },
47+
+ {Attributes(C, {}, {Attribute::getWithCaptureInfo(C, CaptureInfo::none())})}); },
48+
};
49+
static const auto jlunlockvalue_func = new JuliaFunction<>{
50+
XSTR(jl_unlock_value),
51+
@@ -1048,7 +1048,7 @@ static const auto jlunlockvalue_func = new JuliaFunction<>{
52+
[](LLVMContext &C) { return AttributeList::get(C,
53+
AttributeSet(),
54+
AttributeSet(),
55+
- {Attributes(C, {Attribute::NoCapture})}); },
56+
+ {Attributes(C, {}, {Attribute::getWithCaptureInfo(C, CaptureInfo::none())})}); },
57+
};
58+
static const auto jllockfield_func = new JuliaFunction<>{
59+
XSTR(jl_lock_field),
60+
@@ -1057,7 +1057,7 @@ static const auto jllockfield_func = new JuliaFunction<>{
61+
[](LLVMContext &C) { return AttributeList::get(C,
62+
AttributeSet(),
63+
AttributeSet(),
64+
- {Attributes(C, {Attribute::NoCapture})}); },
65+
+ {Attributes(C, {}, {Attribute::getWithCaptureInfo(C, CaptureInfo::none())})}); },
66+
};
67+
static const auto jlunlockfield_func = new JuliaFunction<>{
68+
XSTR(jl_unlock_field),
69+
@@ -1066,7 +1066,7 @@ static const auto jlunlockfield_func = new JuliaFunction<>{
70+
[](LLVMContext &C) { return AttributeList::get(C,
71+
AttributeSet(),
72+
AttributeSet(),
73+
- {Attributes(C, {Attribute::NoCapture})}); },
74+
+ {Attributes(C, {}, {Attribute::getWithCaptureInfo(C, CaptureInfo::none())})}); },
75+
};
76+
static const auto jlenter_func = new JuliaFunction<>{
77+
XSTR(jl_enter_handler),
78+
@@ -1529,7 +1529,7 @@ static const auto gc_loaded_func = new JuliaFunction<>{
79+
RetAttrs.addAttribute(Attribute::NonNull);
80+
RetAttrs.addAttribute(Attribute::NoUndef);
81+
return AttributeList::get(C, AttributeSet::get(C,FnAttrs), AttributeSet::get(C,RetAttrs),
82+
- { Attributes(C, {Attribute::NonNull, Attribute::NoUndef, Attribute::ReadNone, Attribute::NoCapture}),
83+
+ { Attributes(C, {Attribute::NonNull, Attribute::NoUndef, Attribute::ReadNone}, {Attribute::getWithCaptureInfo(C, CaptureInfo::none())}),
84+
Attributes(C, {Attribute::NonNull, Attribute::NoUndef, Attribute::ReadNone}) });
85+
},
86+
};
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());
89+
param.addStructRetAttr(srt);
90+
param.addAttribute(Attribute::NoAlias);
91+
- param.addAttribute(Attribute::NoCapture);
92+
+ param.addCapturesAttr(llvm::CaptureInfo::none());
93+
param.addAttribute(Attribute::NoUndef);
94+
attrs.push_back(AttributeSet::get(ctx.builder.getContext(), param));
95+
assert(fsig.size() == 1);
96+
@@ -8231,7 +8231,7 @@ static jl_returninfo_t get_specsig_function(jl_codectx_t &ctx, Module *M, Value
97+
if (props.cc == jl_returninfo_t::Union) {
98+
AttrBuilder param(ctx.builder.getContext());
99+
param.addAttribute(Attribute::NoAlias);
100+
- param.addAttribute(Attribute::NoCapture);
101+
+ param.addCapturesAttr(llvm::CaptureInfo::none());
102+
param.addAttribute(Attribute::NoUndef);
103+
attrs.push_back(AttributeSet::get(ctx.builder.getContext(), param));
104+
assert(fsig.size() == 1);
105+
@@ -8240,7 +8240,7 @@ static jl_returninfo_t get_specsig_function(jl_codectx_t &ctx, Module *M, Value
106+
if (props.return_roots) {
107+
AttrBuilder param(ctx.builder.getContext());
108+
param.addAttribute(Attribute::NoAlias);
109+
- param.addAttribute(Attribute::NoCapture);
110+
+ param.addCapturesAttr(llvm::CaptureInfo::none());
111+
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());
116+
Type *ty = et;
117+
if (et == nullptr || et->isAggregateType()) { // aggregate types are passed by pointer
118+
- param.addAttribute(Attribute::NoCapture);
119+
+ param.addCapturesAttr(llvm::CaptureInfo::none());
120+
param.addAttribute(Attribute::ReadOnly);
121+
ty = ctx.builder.getPtrTy(AddressSpace::Derived);
122+
}
123+
--
124+
2.34.1
125+

0 commit comments

Comments
 (0)