Skip to content

Commit 64eac14

Browse files
authored
Rebase patches (#55)
1 parent 868507c commit 64eac14

15 files changed

+41
-104
lines changed

julia-patches/1b7b3b8d354a28f5fb1381c61c5663819d29a974

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
From 6d83e9e2e243b714ff130153b7be43490a94228a Mon Sep 17 00:00:00 2001
1+
From 911c7af3f44097d3ef35299735db0ba61592fe2c 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

julia-patches/29441e4f5fa5f5c7709f7cf180815ba97f611297

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
From cfc9b63f66317462eb1c888541a6434b6b135fd3 Mon Sep 17 00:00:00 2001
1+
From 1f1e3bb10f9aba450b5acc6dce8ee97f045a2a52 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 b3724e33d2..adfc338d1d 100644
12+
index 759c66f5a3..68aaa8f193 100644
1313
--- a/src/codegen.cpp
1414
+++ b/src/codegen.cpp
1515
@@ -614,7 +614,7 @@ static AttributeList get_func_attrs(LLVMContext &C)
@@ -57,7 +57,7 @@ index b3724e33d2..adfc338d1d 100644
5757
};
5858
static const auto jlenter_func = new JuliaFunction<>{
5959
XSTR(jl_enter_handler),
60-
@@ -1514,7 +1514,7 @@ static const auto gc_loaded_func = new JuliaFunction<>{
60+
@@ -1503,7 +1503,7 @@ static const auto gc_loaded_func = new JuliaFunction<>{
6161
RetAttrs.addAttribute(Attribute::NonNull);
6262
RetAttrs.addAttribute(Attribute::NoUndef);
6363
return AttributeList::get(C, AttributeSet::get(C,FnAttrs), AttributeSet::get(C,RetAttrs),
@@ -66,7 +66,7 @@ index b3724e33d2..adfc338d1d 100644
6666
Attributes(C, {Attribute::NonNull, Attribute::NoUndef, Attribute::ReadNone}) });
6767
},
6868
};
69-
@@ -8367,7 +8367,7 @@ static jl_returninfo_t get_specsig_function(jl_codegen_params_t &params, Module
69+
@@ -8346,7 +8346,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 b3724e33d2..adfc338d1d 100644
7575
param.addAttribute(Attribute::NoUndef);
7676
attrs.push_back(AttributeSet::get(M->getContext(), param));
7777
assert(fsig.size() == 1);
78-
@@ -8375,7 +8375,7 @@ static jl_returninfo_t get_specsig_function(jl_codegen_params_t &params, Module
78+
@@ -8354,7 +8354,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 b3724e33d2..adfc338d1d 100644
8484
param.addAttribute(Attribute::NoUndef);
8585
attrs.push_back(AttributeSet::get(M->getContext(), param));
8686
assert(fsig.size() == 1);
87-
@@ -8384,7 +8384,7 @@ static jl_returninfo_t get_specsig_function(jl_codegen_params_t &params, Module
87+
@@ -8363,7 +8363,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 b3724e33d2..adfc338d1d 100644
9393
param.addAttribute(Attribute::NoUndef);
9494
attrs.push_back(AttributeSet::get(M->getContext(), param));
9595
fsig.push_back(getPointerTy(M->getContext()));
96-
@@ -8417,7 +8417,7 @@ static jl_returninfo_t get_specsig_function(jl_codegen_params_t &params, Module
96+
@@ -8396,7 +8396,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: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
From ea139ae833743fae1e9b02f58ff2b1bb9de7d5b7 Mon Sep 17 00:00:00 2001
1+
From 961b5392e313b643c6273a0b851f2e55d952e7ad 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
@@ -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 baa05fbc30..b3724e33d2 100644
136+
index dfc9ca6da8..759c66f5a3 100644
137137
--- a/src/codegen.cpp
138138
+++ b/src/codegen.cpp
139139
@@ -824,7 +824,7 @@ static const auto jlhasnofield_func = new JuliaFunction<>{
@@ -180,7 +180,7 @@ index baa05fbc30..b3724e33d2 100644
180180
{JuliaType::get_prjlvalue_ty(C)}, false); },
181181
nullptr,
182182
};
183-
@@ -1535,7 +1535,7 @@ static const auto julia_call = new JuliaFunction<>{
183+
@@ -1524,7 +1524,7 @@ static const auto julia_call = new JuliaFunction<>{
184184
[](LLVMContext &C) {
185185
auto T_prjlvalue = JuliaType::get_prjlvalue_ty(C);
186186
return FunctionType::get(T_prjlvalue,
@@ -189,7 +189,7 @@ index baa05fbc30..b3724e33d2 100644
189189
T_prjlvalue}, // %f
190190
true); }, // %args
191191
get_attrs_basic,
192-
@@ -1548,7 +1548,7 @@ static const auto julia_call2 = new JuliaFunction<>{
192+
@@ -1537,7 +1537,7 @@ static const auto julia_call2 = new JuliaFunction<>{
193193
[](LLVMContext &C) {
194194
auto T_prjlvalue = JuliaType::get_prjlvalue_ty(C);
195195
return FunctionType::get(T_prjlvalue,
@@ -198,7 +198,7 @@ index baa05fbc30..b3724e33d2 100644
198198
T_prjlvalue, // %arg1
199199
T_prjlvalue}, // %f
200200
true); }, // %args
201-
@@ -1562,7 +1562,7 @@ static const auto julia_call3 = new JuliaFunction<>{
201+
@@ -1551,7 +1551,7 @@ static const auto julia_call3 = new JuliaFunction<>{
202202
auto T_prjlvalue = JuliaType::get_prjlvalue_ty(C);
203203
Type *T = PointerType::get(JuliaType::get_jlvalue_ty(C), AddressSpace::Derived);
204204
return FunctionType::get(T_prjlvalue,
@@ -207,7 +207,7 @@ index baa05fbc30..b3724e33d2 100644
207207
T}, // %f
208208
true); }, // %args
209209
get_attrs_basic,
210-
@@ -5534,7 +5534,7 @@ static jl_cgval_t emit_call_specfun_boxed(jl_codectx_t &ctx, jl_value_t *jlretty
210+
@@ -5524,7 +5524,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 baa05fbc30..b3724e33d2 100644
216216
if (GV == nullptr) {
217217
GV = new GlobalVariable(*jl_Module, pfunc, false,
218218
GlobalVariable::ExternalLinkage,
219-
@@ -8319,7 +8319,7 @@ static jl_returninfo_t get_specsig_function(jl_codegen_params_t &params, Module
219+
@@ -8298,7 +8298,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 baa05fbc30..b3724e33d2 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-
@@ -8348,7 +8348,7 @@ static jl_returninfo_t get_specsig_function(jl_codegen_params_t &params, Module
228+
@@ -8327,7 +8327,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);

julia-patches/2f50b280dc8e995ef67ad31a5f71adc4c270890d

Lines changed: 4 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
From 243665861478f19406709f6af417fed8858a256d Mon Sep 17 00:00:00 2001
1+
From 3053e421e4bbf27f1675fe4a28741f5a7d86ef91 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
@@ -8,16 +8,15 @@ Subject: [PATCH] 2f50b280dc8e995ef67ad31a5f71adc4c270890d
88
src/llvm-alloc-opt.cpp | 10 +++++-----
99
src/llvm-julia-licm.cpp | 2 +-
1010
src/llvm-late-gc-lowering.cpp | 22 +++++++++++-----------
11-
src/llvm-lower-handlers.cpp | 14 +++++++-------
1211
src/llvm-multiversioning.cpp | 6 +++---
1312
src/llvm-ptls.cpp | 4 ++--
14-
7 files changed, 30 insertions(+), 30 deletions(-)
13+
6 files changed, 23 insertions(+), 23 deletions(-)
1514

1615
diff --git a/src/codegen.cpp b/src/codegen.cpp
17-
index 39b5770e11..8df985bd6d 100644
16+
index 171194871a..f22f571cbf 100644
1817
--- a/src/codegen.cpp
1918
+++ b/src/codegen.cpp
20-
@@ -2362,7 +2362,7 @@ static GlobalVariable *get_pointer_to_constant(jl_codegen_params_t &emission_con
19+
@@ -2352,7 +2352,7 @@ static GlobalVariable *get_pointer_to_constant(jl_codegen_params_t &emission_con
2120
static AllocaInst *emit_static_alloca(jl_codectx_t &ctx, Type *lty, Align align)
2221
{
2322
++EmittedAllocas;
@@ -180,52 +179,6 @@ index a254ecafab..e03fbd8ccd 100644
180179
(void)shadowStore;
181180
// TODO: shadowStore->setMetadata(LLVMContext::MD_tbaa, tbaa_gcframe);
182181
AllocaSlot++;
183-
diff --git a/src/llvm-lower-handlers.cpp b/src/llvm-lower-handlers.cpp
184-
index c359bf6c11..5beeedfd05 100644
185-
--- a/src/llvm-lower-handlers.cpp
186-
+++ b/src/llvm-lower-handlers.cpp
187-
@@ -171,7 +171,7 @@ static bool lowerExcHandlers(Function &F) {
188-
unsigned allocaAddressSpace = F.getParent()->getDataLayout().getAllocaAddrSpace();
189-
for (int i = 0; i < MaxDepth; ++i) {
190-
auto *buff = new AllocaInst(Type::getInt8Ty(F.getContext()), allocaAddressSpace,
191-
- handler_sz, Align(16), "", firstInst);
192-
+ handler_sz, Align(16), "", firstInst->getIterator());
193-
if (allocaAddressSpace) {
194-
AddrSpaceCastInst *buff_casted = new AddrSpaceCastInst(buff, PointerType::get(F.getContext(), AddressSpace::Generic));
195-
buff_casted->insertAfter(buff);
196-
@@ -186,17 +186,17 @@ static bool lowerExcHandlers(Function &F) {
197-
assert(it.second >= 0);
198-
Instruction *buff = buffs[it.second];
199-
CallInst *enter = it.first;
200-
- auto new_enter = CallInst::Create(jlenter_func, {enter->getArgOperand(0), buff}, "", enter);
201-
+ auto new_enter = CallInst::Create(jlenter_func, {enter->getArgOperand(0), buff}, "", enter->getIterator());
202-
Value *lifetime_args[] = {
203-
handler_sz64,
204-
buff
205-
};
206-
- CallInst::Create(lifetime_start, lifetime_args, "", new_enter);
207-
+ CallInst::Create(lifetime_start, lifetime_args, "", new_enter->getIterator());
208-
CallInst *sj;
209-
if (!TT.isOSWindows()) {
210-
- sj = CallInst::Create(setjmp_func, {buff, ConstantInt::get(Type::getInt32Ty(F.getContext()), 0)}, "", enter);
211-
+ sj = CallInst::Create(setjmp_func, {buff, ConstantInt::get(Type::getInt32Ty(F.getContext()), 0)}, "", enter->getIterator());
212-
} else {
213-
- sj = CallInst::Create(setjmp_func, buff, "", enter);
214-
+ sj = CallInst::Create(setjmp_func, buff, "", enter->getIterator());
215-
}
216-
// We need to mark this on the call site as well. See issue #6757
217-
sj->setCanReturnTwice();
218-
@@ -219,8 +219,8 @@ static bool lowerExcHandlers(Function &F) {
219-
for (auto *EEI : ToErase)
220-
EEI->eraseFromParent();
221-
if (!enter->use_empty()) {
222-
- Value *agg = InsertValueInst::Create(UndefValue::get(enter->getType()), sj, ArrayRef<unsigned>(0), "", enter);
223-
- agg = InsertValueInst::Create(agg, buff, ArrayRef<unsigned>(1), "", enter);
224-
+ Value *agg = InsertValueInst::Create(UndefValue::get(enter->getType()), sj, ArrayRef<unsigned>(0), "", enter->getIterator());
225-
+ agg = InsertValueInst::Create(agg, buff, ArrayRef<unsigned>(1), "", enter->getIterator());
226-
enter->replaceAllUsesWith(agg);
227-
}
228-
enter->eraseFromParent();
229182
diff --git a/src/llvm-multiversioning.cpp b/src/llvm-multiversioning.cpp
230183
index a76d076ebd..2961a77e08 100644
231184
--- a/src/llvm-multiversioning.cpp

julia-patches/390300d9f41df6ad71f0f4196ef4885d4bd5dc48

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
From ad2b34c78ffe06e6351b5b311f9e93a5b1c4a270 Mon Sep 17 00:00:00 2001
1+
From 634de6cb9f36cd358dd6b2fce5b2110a78503bc7 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
@@ -9,7 +9,7 @@ Adapt to "Add ThinOrFullLTOPhase to optimizer pipeline"
99
1 file changed, 2 insertions(+), 2 deletions(-)
1010

1111
diff --git a/src/pipeline.cpp b/src/pipeline.cpp
12-
index 5e29b56675..4523c80033 100644
12+
index e813b1720f..2bb39fab4c 100644
1313
--- a/src/pipeline.cpp
1414
+++ b/src/pipeline.cpp
1515
@@ -250,7 +250,7 @@ namespace {

julia-patches/52c338daece1ea5556865373c777bdad79a05fd8

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
From 82941079e3d04278e89bdee95cd40b826aef8994 Mon Sep 17 00:00:00 2001
1+
From 269b6b38001df8b41e0ca32e016bb48d09e5f53b 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 e98e0b96bfd1dea6039babd5a47a7a0569b179f3 Mon Sep 17 00:00:00 2001
1+
From cabba9656c8b1124a226277dbe96431dd45f43d1 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 16cedabed1..39b5770e11 100644
11+
index 025bb7c792..171194871a 100644
1212
--- a/src/codegen.cpp
1313
+++ b/src/codegen.cpp
1414
@@ -76,6 +76,7 @@
@@ -19,7 +19,7 @@ index 16cedabed1..39b5770e11 100644
1919

2020
#ifdef USE_ITTAPI
2121
#include "ittapi/ittnotify.h"
22-
@@ -10585,15 +10586,17 @@ namespace llvm {
22+
@@ -10573,15 +10574,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 8674a7f59e975de99d8ab801ecd70b090c3480f0 Mon Sep 17 00:00:00 2001
1+
From 1fe06aac534c52e729d4f8a4d798bda9c91e50e4 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 d794bc20557769f11fa1e9dc1992429ca4a62871 Mon Sep 17 00:00:00 2001
1+
From ed90081889d38d4a5dd9098947d99cd5c4fdbcc1 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 8c43970aede1f780cf03dd728abd82ab52f4bf24 Mon Sep 17 00:00:00 2001
1+
From ed90b3954b5effdb56456dbbd859b857d817a8fd 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)