Skip to content

Commit d8bfc75

Browse files
authored
Rebase patches (#57)
1 parent 64eac14 commit d8bfc75

15 files changed

+57
-57
lines changed

julia-patches/1b7b3b8d354a28f5fb1381c61c5663819d29a974

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
From 911c7af3f44097d3ef35299735db0ba61592fe2c Mon Sep 17 00:00:00 2001
1+
From de76a37c0e285be08a7b1975647d1d44bf99c4e1 Mon Sep 17 00:00:00 2001
22
From: Zentrik <[email protected]>
33
Date: Fri, 8 Nov 2024 21:02:11 +0000
44
Subject: [PATCH] 1b7b3b8d354a28f5fb1381c61c5663819d29a974
@@ -8,10 +8,10 @@ Subject: [PATCH] 1b7b3b8d354a28f5fb1381c61c5663819d29a974
88
1 file changed, 1 insertion(+), 1 deletion(-)
99

1010
diff --git a/src/ccall.cpp b/src/ccall.cpp
11-
index 6c03f9532d..ce7806ae1e 100644
11+
index c35979eb85..0b3bb79070 100644
1212
--- a/src/ccall.cpp
1313
+++ b/src/ccall.cpp
14-
@@ -2095,7 +2095,7 @@ jl_cgval_t function_sig_t::emit_a_ccall(
14+
@@ -2099,7 +2099,7 @@ jl_cgval_t function_sig_t::emit_a_ccall(
1515
}
1616
else if (f_name.starts_with("llvm.")) {
1717
// compute and verify auto-mangling for intrinsic name

julia-patches/29441e4f5fa5f5c7709f7cf180815ba97f611297

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
From 1f1e3bb10f9aba450b5acc6dce8ee97f045a2a52 Mon Sep 17 00:00:00 2001
1+
From 3d48a310be0b3faf92ee5e2a63c4b695914daa72 Mon Sep 17 00:00:00 2001
22
From: Zentrik <[email protected]>
33
Date: Tue, 4 Feb 2025 20:44:02 +0000
44
Subject: [PATCH] 29441e4f5fa5f5c7709f7cf180815ba97f611297
@@ -9,7 +9,7 @@ Adapt to removal of NoCapture
99
1 file changed, 10 insertions(+), 10 deletions(-)
1010

1111
diff --git a/src/codegen.cpp b/src/codegen.cpp
12-
index 759c66f5a3..68aaa8f193 100644
12+
index 7eb7be3fee..3922bfc171 100644
1313
--- a/src/codegen.cpp
1414
+++ b/src/codegen.cpp
1515
@@ -614,7 +614,7 @@ static AttributeList get_func_attrs(LLVMContext &C)
@@ -66,7 +66,7 @@ index 759c66f5a3..68aaa8f193 100644
6666
Attributes(C, {Attribute::NonNull, Attribute::NoUndef, Attribute::ReadNone}) });
6767
},
6868
};
69-
@@ -8346,7 +8346,7 @@ static jl_returninfo_t get_specsig_function(jl_codegen_params_t &params, Module
69+
@@ -8338,7 +8338,7 @@ static jl_returninfo_t get_specsig_function(jl_codegen_params_t &params, Module
7070
AttrBuilder param(M->getContext());
7171
param.addStructRetAttr(srt);
7272
param.addAttribute(Attribute::NoAlias);
@@ -75,7 +75,7 @@ index 759c66f5a3..68aaa8f193 100644
7575
param.addAttribute(Attribute::NoUndef);
7676
attrs.push_back(AttributeSet::get(M->getContext(), param));
7777
assert(fsig.size() == 1);
78-
@@ -8354,7 +8354,7 @@ static jl_returninfo_t get_specsig_function(jl_codegen_params_t &params, Module
78+
@@ -8346,7 +8346,7 @@ static jl_returninfo_t get_specsig_function(jl_codegen_params_t &params, Module
7979
if (props.cc == jl_returninfo_t::Union) {
8080
AttrBuilder param(M->getContext());
8181
param.addAttribute(Attribute::NoAlias);
@@ -84,7 +84,7 @@ index 759c66f5a3..68aaa8f193 100644
8484
param.addAttribute(Attribute::NoUndef);
8585
attrs.push_back(AttributeSet::get(M->getContext(), param));
8686
assert(fsig.size() == 1);
87-
@@ -8363,7 +8363,7 @@ static jl_returninfo_t get_specsig_function(jl_codegen_params_t &params, Module
87+
@@ -8355,7 +8355,7 @@ static jl_returninfo_t get_specsig_function(jl_codegen_params_t &params, Module
8888
if (props.return_roots) {
8989
AttrBuilder param(M->getContext());
9090
param.addAttribute(Attribute::NoAlias);
@@ -93,7 +93,7 @@ index 759c66f5a3..68aaa8f193 100644
9393
param.addAttribute(Attribute::NoUndef);
9494
attrs.push_back(AttributeSet::get(M->getContext(), param));
9595
fsig.push_back(getPointerTy(M->getContext()));
96-
@@ -8396,7 +8396,7 @@ static jl_returninfo_t get_specsig_function(jl_codegen_params_t &params, Module
96+
@@ -8388,7 +8388,7 @@ static jl_returninfo_t get_specsig_function(jl_codegen_params_t &params, Module
9797
AttrBuilder param(M->getContext());
9898
Type *ty = et;
9999
if (et == nullptr || et->isAggregateType()) { // aggregate types are passed by pointer

julia-patches/29e467fc78eb8b4308b57272ca4ad0d1f744f25f

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
From 961b5392e313b643c6273a0b851f2e55d952e7ad Mon Sep 17 00:00:00 2001
1+
From ba8ba39245d7c3d48f2a7a0efcb116015e1dfd1c Mon Sep 17 00:00:00 2001
22
From: Zentrik <[email protected]>
33
Date: Sat, 4 Jan 2025 16:48:45 +0000
44
Subject: [PATCH] 29e467fc78eb8b4308b57272ca4ad0d1f744f25f
@@ -62,7 +62,7 @@ index d91da9c64c..d0adcb2136 100644
6262
auto FT = FunctionType::get(T_int32, {T_pvoid, T_int32, T_pvoid}, false);
6363
auto F = Function::Create(FT, Function::ExternalLinkage, "_DllMainCRTStartup", metadataM);
6464
diff --git a/src/ccall.cpp b/src/ccall.cpp
65-
index e5ef822286..0c0c39cf88 100644
65+
index 1412d7b2be..a0b7bf4a17 100644
6666
--- a/src/ccall.cpp
6767
+++ b/src/ccall.cpp
6868
@@ -105,7 +105,7 @@ static bool runtime_sym_gvs(jl_codectx_t &ctx, const char *f_lib, const char *f_
@@ -101,7 +101,7 @@ index e5ef822286..0c0c39cf88 100644
101101
GlobalVariable *got = new GlobalVariable(*M, T_pvoidfunc, false,
102102
GlobalVariable::ExternalLinkage,
103103
plt,
104-
@@ -2128,7 +2128,7 @@ jl_cgval_t function_sig_t::emit_a_ccall(
104+
@@ -2132,7 +2132,7 @@ jl_cgval_t function_sig_t::emit_a_ccall(
105105
}
106106
else if (symarg.fptr != NULL) {
107107
++LiteralCCalls;
@@ -133,7 +133,7 @@ index c1796d907e..03335cf156 100644
133133
for_each_uniontype_small(
134134
[&](unsigned idx, jl_datatype_t *jt) {
135135
diff --git a/src/codegen.cpp b/src/codegen.cpp
136-
index dfc9ca6da8..759c66f5a3 100644
136+
index 2da744e48c..7eb7be3fee 100644
137137
--- a/src/codegen.cpp
138138
+++ b/src/codegen.cpp
139139
@@ -824,7 +824,7 @@ static const auto jlhasnofield_func = new JuliaFunction<>{
@@ -207,7 +207,7 @@ index dfc9ca6da8..759c66f5a3 100644
207207
T}, // %f
208208
true); }, // %args
209209
get_attrs_basic,
210-
@@ -5524,7 +5524,7 @@ static jl_cgval_t emit_call_specfun_boxed(jl_codectx_t &ctx, jl_value_t *jlretty
210+
@@ -5516,7 +5516,7 @@ static jl_cgval_t emit_call_specfun_boxed(jl_codectx_t &ctx, jl_value_t *jlretty
211211
std::string namep("p");
212212
namep += specFunctionObject;
213213
GlobalVariable *GV = cast_or_null<GlobalVariable>(jl_Module->getNamedValue(namep));
@@ -216,7 +216,7 @@ index dfc9ca6da8..759c66f5a3 100644
216216
if (GV == nullptr) {
217217
GV = new GlobalVariable(*jl_Module, pfunc, false,
218218
GlobalVariable::ExternalLinkage,
219-
@@ -8298,7 +8298,7 @@ static jl_returninfo_t get_specsig_function(jl_codegen_params_t &params, Module
219+
@@ -8290,7 +8290,7 @@ static jl_returninfo_t get_specsig_function(jl_codegen_params_t &params, Module
220220
if (props.union_bytes) {
221221
props.cc = jl_returninfo_t::Union;
222222
Type *AT = ArrayType::get(getInt8Ty(M->getContext()), props.union_bytes);
@@ -225,7 +225,7 @@ index dfc9ca6da8..759c66f5a3 100644
225225
argnames.push_back("union_bytes_return");
226226
Type *pair[] = { T_prjlvalue, getInt8Ty(M->getContext()) };
227227
rt = StructType::get(M->getContext(), ArrayRef<Type*>(pair));
228-
@@ -8327,7 +8327,7 @@ static jl_returninfo_t get_specsig_function(jl_codegen_params_t &params, Module
228+
@@ -8319,7 +8319,7 @@ static jl_returninfo_t get_specsig_function(jl_codegen_params_t &params, Module
229229
props.union_align = props.union_minalign = julia_alignment(jlrettype);
230230
// sret is always passed from alloca
231231
assert(M);
@@ -266,7 +266,7 @@ index c4bcb85e43..52ccbcbd1f 100644
266266
thePtr = nullptr; // could use any value here, since typed_store will not use it
267267
jl_cgval_t ret = typed_store(ctx, thePtr, x, y, ety, ctx.tbaa().tbaa_data, nullptr, nullptr, isboxed,
268268
diff --git a/src/llvm-codegen-shared.h b/src/llvm-codegen-shared.h
269-
index ff6f5a9729..ecf02a8f57 100644
269+
index d474fb4f61..cfdb8eb5b1 100644
270270
--- a/src/llvm-codegen-shared.h
271271
+++ b/src/llvm-codegen-shared.h
272272
@@ -34,19 +34,19 @@ namespace JuliaType {
@@ -327,7 +327,7 @@ index 76dcd94489..4e539fea8f 100644
327327

328328
// Zero out the GC frame.
329329
diff --git a/src/llvm-late-gc-lowering.cpp b/src/llvm-late-gc-lowering.cpp
330-
index e03fbd8ccd..317e89d46a 100644
330+
index 86b413311f..28d0e80b6d 100644
331331
--- a/src/llvm-late-gc-lowering.cpp
332332
+++ b/src/llvm-late-gc-lowering.cpp
333333
@@ -1993,7 +1993,7 @@ bool LateLowerGCFrame::CleanupIR(Function &F, State *S, bool *CFGModified) {
@@ -376,10 +376,10 @@ index 2961a77e08..61058f7af0 100644
376376
auto tgt = linearized[i];
377377
auto &spec = specs[i];
378378
diff --git a/src/llvm-pass-helpers.cpp b/src/llvm-pass-helpers.cpp
379-
index ca25251040..202b0991fd 100644
379+
index 9d415d923e..214e99a03d 100644
380380
--- a/src/llvm-pass-helpers.cpp
381381
+++ b/src/llvm-pass-helpers.cpp
382-
@@ -234,7 +234,7 @@ namespace jl_intrinsics {
382+
@@ -255,7 +255,7 @@ namespace jl_intrinsics {
383383
SAFEPOINT_NAME,
384384
[](Type *T_size) {
385385
auto &ctx = T_size->getContext();
@@ -389,10 +389,10 @@ index ca25251040..202b0991fd 100644
389389
FunctionType::get(
390390
Type::getVoidTy(ctx),
391391
diff --git a/src/llvm-ptls.cpp b/src/llvm-ptls.cpp
392-
index 52d324ec4c..90f3050835 100644
392+
index 58fdd8aafa..1bc05c4ce0 100644
393393
--- a/src/llvm-ptls.cpp
394394
+++ b/src/llvm-ptls.cpp
395-
@@ -307,7 +307,7 @@ bool LowerPTLS::run(bool *CFGModified)
395+
@@ -312,7 +312,7 @@ bool LowerPTLS::run(bool *CFGModified)
396396
assert(sizeof(jl_pgcstack_key_t) == sizeof(uintptr_t));
397397
FT_pgcstack_getter = FunctionType::get(FT_pgcstack_getter->getReturnType(), {T_size}, false);
398398
}

julia-patches/2f50b280dc8e995ef67ad31a5f71adc4c270890d

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
From 3053e421e4bbf27f1675fe4a28741f5a7d86ef91 Mon Sep 17 00:00:00 2001
1+
From fb68e67f2d07b60eb8aae80daf27c10fe35479eb Mon Sep 17 00:00:00 2001
22
From: Zentrik <[email protected]>
33
Date: Fri, 8 Nov 2024 21:02:11 +0000
44
Subject: [PATCH] 2f50b280dc8e995ef67ad31a5f71adc4c270890d
@@ -13,7 +13,7 @@ Subject: [PATCH] 2f50b280dc8e995ef67ad31a5f71adc4c270890d
1313
6 files changed, 23 insertions(+), 23 deletions(-)
1414

1515
diff --git a/src/codegen.cpp b/src/codegen.cpp
16-
index 171194871a..f22f571cbf 100644
16+
index af66a6926e..0e6dea4616 100644
1717
--- a/src/codegen.cpp
1818
+++ b/src/codegen.cpp
1919
@@ -2352,7 +2352,7 @@ static GlobalVariable *get_pointer_to_constant(jl_codegen_params_t &emission_con
@@ -85,7 +85,7 @@ index baf844dffa..e09f5cad92 100644
8585
createNewInstruction(CI, call, MSSAU);
8686
LLVM_DEBUG(dbgs() << "Cloned and sunk gc_preserve_end: " << *CI << "\n");
8787
diff --git a/src/llvm-late-gc-lowering.cpp b/src/llvm-late-gc-lowering.cpp
88-
index a254ecafab..e03fbd8ccd 100644
88+
index 7a298551db..86b413311f 100644
8989
--- a/src/llvm-late-gc-lowering.cpp
9090
+++ b/src/llvm-late-gc-lowering.cpp
9191
@@ -359,10 +359,10 @@ void LateLowerGCFrame::LiftSelect(State &S, SelectInst *SI) {
@@ -144,16 +144,16 @@ index a254ecafab..e03fbd8ccd 100644
144144
NewCall->setTailCallKind(CI->getTailCallKind());
145145
auto callattrs = CI->getAttributes();
146146
callattrs = AttributeList::get(CI->getContext(), getFnAttrs(callattrs), getRetAttrs(callattrs), {});
147-
@@ -2211,7 +2211,7 @@ bool LateLowerGCFrame::CleanupIR(Function &F, State *S, bool *CFGModified) {
148-
++it;
149-
continue;
150-
} else {
151-
- CallInst *NewCall = CallInst::Create(CI, None, CI);
152-
+ CallInst *NewCall = CallInst::Create(CI, None, CI->getIterator());
153-
NewCall->takeName(CI);
154-
NewCall->copyMetadata(*CI);
155-
CI->replaceAllUsesWith(NewCall);
156-
@@ -2277,14 +2277,14 @@ void LateLowerGCFrame::PlaceGCFrameStore(State &S, unsigned R, unsigned MinColor
147+
@@ -2241,7 +2241,7 @@ bool LateLowerGCFrame::CleanupIR(Function &F, State *S, bool *CFGModified) {
148+
continue;
149+
} else {
150+
// remove operand bundle
151+
- CallInst *NewCall = CallInst::Create(CI, None, CI);
152+
+ CallInst *NewCall = CallInst::Create(CI, None, CI->getIterator());
153+
NewCall->takeName(CI);
154+
NewCall->copyMetadata(*CI);
155+
CI->replaceAllUsesWith(NewCall);
156+
@@ -2308,14 +2308,14 @@ void LateLowerGCFrame::PlaceGCFrameStore(State &S, unsigned R, unsigned MinColor
157157
auto slotAddress = CallInst::Create(
158158
getOrDeclare(jl_intrinsics::getGCFrameSlot),
159159
{GCFrame, ConstantInt::get(Type::getInt32Ty(InsertBefore->getContext()), Colors[R] + MinColorRoot)},
@@ -170,7 +170,7 @@ index a254ecafab..e03fbd8ccd 100644
170170
}
171171

172172
void LateLowerGCFrame::PlaceGCFrameReset(State &S, unsigned R, unsigned MinColorRoot,
173-
@@ -2445,7 +2445,7 @@ void LateLowerGCFrame::PlaceRootsAndUpdateCalls(ArrayRef<int> Colors, int PreAss
173+
@@ -2476,7 +2476,7 @@ void LateLowerGCFrame::PlaceRootsAndUpdateCalls(ArrayRef<int> Colors, int PreAss
174174
assert(Elem->getType() == T_prjlvalue);
175175
//auto Idxs = ArrayRef<unsigned>(Tracked[i]);
176176
//Value *Elem = ExtractScalar(Base, true, Idxs, SI);
@@ -205,7 +205,7 @@ index a76d076ebd..2961a77e08 100644
205205
ptr->setMetadata(llvm::LLVMContext::MD_tbaa, tbaa_const);
206206
ptr->setMetadata(llvm::LLVMContext::MD_invariant_load, MDNode::get(ptr->getContext(), None));
207207
diff --git a/src/llvm-ptls.cpp b/src/llvm-ptls.cpp
208-
index e361368595..52d324ec4c 100644
208+
index 15f5a5574a..58fdd8aafa 100644
209209
--- a/src/llvm-ptls.cpp
210210
+++ b/src/llvm-ptls.cpp
211211
@@ -190,7 +190,7 @@ void LowerPTLS::fix_pgcstack_use(CallInst *pgcstack, Function *pgcstack_getter,
@@ -217,7 +217,7 @@ index e361368595..52d324ec4c 100644
217217
// if we called jl_adopt_thread, we must end this cfunction back in the safe-state
218218
last_gc_state->addIncoming(ConstantInt::get(Type::getInt8Ty(M->getContext()), JL_GC_STATE_SAFE), slowTerm->getParent());
219219
last_gc_state->addIncoming(prior, fastTerm->getParent());
220-
@@ -277,7 +277,7 @@ void LowerPTLS::fix_pgcstack_use(CallInst *pgcstack, Function *pgcstack_getter,
220+
@@ -282,7 +282,7 @@ void LowerPTLS::fix_pgcstack_use(CallInst *pgcstack, Function *pgcstack_getter,
221221
if (TargetTriple.isOSDarwin()) {
222222
assert(sizeof(k) == sizeof(uintptr_t));
223223
Constant *key = ConstantInt::get(T_size, (uintptr_t)k);

julia-patches/390300d9f41df6ad71f0f4196ef4885d4bd5dc48

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
From 634de6cb9f36cd358dd6b2fce5b2110a78503bc7 Mon Sep 17 00:00:00 2001
1+
From 3eb0d97f20aa0744363aca8b697cb03e515f457e Mon Sep 17 00:00:00 2001
22
From: Zentrik <[email protected]>
33
Date: Fri, 8 Nov 2024 21:33:31 +0000
44
Subject: [PATCH] 390300d9f41df6ad71f0f4196ef4885d4bd5dc48

julia-patches/52c338daece1ea5556865373c777bdad79a05fd8

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
From 269b6b38001df8b41e0ca32e016bb48d09e5f53b Mon Sep 17 00:00:00 2001
1+
From 8a828ab711a4ea86f8c8e0bed75ff687bc72c8e7 Mon Sep 17 00:00:00 2001
22
From: Zentrik <[email protected]>
33
Date: Sat, 8 Feb 2025 18:50:22 +0000
44
Subject: [PATCH] 52c338daece1ea5556865373c777bdad79a05fd8

julia-patches/9a258664024d12a06ba8eb9344e270a9bb5f5d87

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
From cabba9656c8b1124a226277dbe96431dd45f43d1 Mon Sep 17 00:00:00 2001
1+
From a05d21a17c72f5452a01e44c6d4de786390d587e Mon Sep 17 00:00:00 2001
22
From: Zentrik <[email protected]>
33
Date: Fri, 8 Nov 2024 21:02:10 +0000
44
Subject: [PATCH] 9a258664024d12a06ba8eb9344e270a9bb5f5d87
@@ -8,7 +8,7 @@ Subject: [PATCH] 9a258664024d12a06ba8eb9344e270a9bb5f5d87
88
1 file changed, 6 insertions(+), 3 deletions(-)
99

1010
diff --git a/src/codegen.cpp b/src/codegen.cpp
11-
index 025bb7c792..171194871a 100644
11+
index fe2bd4fc3d..af66a6926e 100644
1212
--- a/src/codegen.cpp
1313
+++ b/src/codegen.cpp
1414
@@ -76,6 +76,7 @@
@@ -19,7 +19,7 @@ index 025bb7c792..171194871a 100644
1919

2020
#ifdef USE_ITTAPI
2121
#include "ittapi/ittnotify.h"
22-
@@ -10573,15 +10574,17 @@ namespace llvm {
22+
@@ -10565,15 +10566,17 @@ namespace llvm {
2323
class MachineBasicBlock;
2424
class MachineFunction;
2525
raw_ostream& operator<<(raw_ostream &OS, const MachineBasicBlock &MBB);

julia-patches/b1aa0b0b88a0bca2553f8c6d6c52ec3b7205064b

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
From 1fe06aac534c52e729d4f8a4d798bda9c91e50e4 Mon Sep 17 00:00:00 2001
1+
From 33f99cafd05b546449702f16dd16b50261185800 Mon Sep 17 00:00:00 2001
22
From: Zentrik <[email protected]>
33
Date: Fri, 8 Nov 2024 21:02:10 +0000
44
Subject: [PATCH] b1aa0b0b88a0bca2553f8c6d6c52ec3b7205064b

julia-patches/bb3f5e1fed7c6ba733b7f273e93f5d3930976185

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
From ed90081889d38d4a5dd9098947d99cd5c4fdbcc1 Mon Sep 17 00:00:00 2001
1+
From 55273ef80d5a5e87da3fe2558f0e26a30306ffaa Mon Sep 17 00:00:00 2001
22
From: Zentrik <[email protected]>
33
Date: Sat, 16 Nov 2024 15:30:41 +0000
44
Subject: [PATCH] bb3f5e1fed7c6ba733b7f273e93f5d3930976185

julia-patches/dc11c0601577afb8f67513d041ee25dabe3555b9

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
From ed90b3954b5effdb56456dbbd859b857d817a8fd Mon Sep 17 00:00:00 2001
1+
From bf0d6dc101f9e62c60afc08e4e65e0deec3d5bf6 Mon Sep 17 00:00:00 2001
22
From: Zentrik <[email protected]>
33
Date: Mon, 11 Nov 2024 21:03:05 +0000
44
Subject: [PATCH] dc11c0601577afb8f67513d041ee25dabe3555b9

0 commit comments

Comments
 (0)