@@ -625,15 +625,15 @@ static AttributeList get_attrs_noreturn(LLVMContext &C)
625625return AttributeList::get (C,
626626Attributes (C,{Attribute::NoReturn}),
627627AttributeSet (),
628- None );
628+ {} );
629629}
630630
631631static AttributeList get_attrs_basic (LLVMContext &C)
632632{
633633return AttributeList::get (C,
634634AttributeSet (),
635635Attributes (C,{Attribute::NonNull}),
636- None );
636+ {} );
637637}
638638
639639static AttributeList get_attrs_box_float (LLVMContext &C, unsigned nbytes)
@@ -649,7 +649,7 @@ static AttributeList get_attrs_box_float(LLVMContext &C, unsigned nbytes)
649649return AttributeList::get (C,
650650AttributeSet::get (C, FnAttrs),
651651AttributeSet::get (C, RetAttrs),
652- None );
652+ {} );
653653}
654654
655655static AttributeList get_attrs_box_sext (LLVMContext &C, unsigned nbytes)
@@ -936,7 +936,7 @@ static const auto jltopeval_func = new JuliaFunction<>{
936936 [](LLVMContext &C){return AttributeList::get (C,
937937AttributeSet (),
938938Attributes (C,{Attribute::NonNull}),
939- None )},
939+ {} )},
940940};
941941static const auto jlcopyast_func = new JuliaFunction<>{
942942XSTR (jl_copy_ast),
@@ -948,7 +948,7 @@ static const auto jlcopyast_func = new JuliaFunction<>{
948948 [](LLVMContext &C){return AttributeList::get (C,
949949AttributeSet (),
950950Attributes (C,{Attribute::NonNull}),
951- None )},
951+ {} )},
952952};
953953static const auto jlapplygeneric_func = new JuliaFunction<>{
954954XSTR (jl_apply_generic),
@@ -1052,7 +1052,7 @@ static const auto jlleave_func = new JuliaFunction<>{
10521052return AttributeList::get (C,
10531053AttributeSet::get (C, FnAttrs),
10541054AttributeSet (),
1055- None );
1055+ {} );
10561056 },
10571057};
10581058static const auto jlleave_noexcept_func = new JuliaFunction<>{
@@ -1069,7 +1069,7 @@ static const auto jlleave_noexcept_func = new JuliaFunction<>{
10691069return AttributeList::get (C,
10701070AttributeSet::get (C, FnAttrs),
10711071AttributeSet (),
1072- None );
1072+ {} );
10731073 },
10741074};
10751075static const auto jl_restore_excstack_func = new JuliaFunction<TypeFnContextAndSizeT>{
@@ -1099,7 +1099,7 @@ static const auto jlegalx_func = new JuliaFunction<TypeFnContextAndSizeT>{
10991099return AttributeList::get (C,
11001100AttributeSet::get (C, FnAttrs),
11011101AttributeSet (),
1102- None )},
1102+ {} )},
11031103};
11041104static const auto jl_alloc_obj_func = new JuliaFunction<TypeFnContextAndSizeT>{
11051105" julia.gc_alloc_obj" ,
@@ -1122,7 +1122,7 @@ static const auto jl_alloc_obj_func = new JuliaFunction<TypeFnContextAndSizeT>{
11221122return AttributeList::get (C,
11231123AttributeSet::get (C, FnAttrs),
11241124AttributeSet::get (C, RetAttrs),
1125- None );
1125+ {} );
11261126 },
11271127};
11281128static const auto jl_alloc_genericmemory_unchecked_func = new JuliaFunction<TypeFnContextAndSizeT>{
@@ -1145,7 +1145,7 @@ static const auto jl_alloc_genericmemory_unchecked_func = new JuliaFunction<Type
11451145return AttributeList::get (C,
11461146AttributeSet::get (C, FnAttrs),
11471147AttributeSet::get (C, RetAttrs),
1148- None );
1148+ {} );
11491149 },
11501150};
11511151static const auto jl_newbits_func = new JuliaFunction<>{
@@ -1158,7 +1158,7 @@ static const auto jl_newbits_func = new JuliaFunction<>{
11581158 [](LLVMContext &C){return AttributeList::get (C,
11591159AttributeSet (),
11601160Attributes (C,{Attribute::NonNull}),
1161- None )},
1161+ {} )},
11621162};
11631163// `julia.typeof` does read memory, but it is effectively readnone before we lower
11641164// the allocation function. This is OK as long as we lower `julia.typeof` no later than
@@ -1178,7 +1178,7 @@ static const auto jl_typeof_func = new JuliaFunction<>{
11781178return AttributeList::get (C,
11791179AttributeSet::get (C, FnAttrs),
11801180Attributes (C,{Attribute::NonNull}),
1181- None )},
1181+ {} )},
11821182};
11831183
11841184static const auto jl_write_barrier_func = new JuliaFunction<>{
@@ -1230,7 +1230,7 @@ static const auto jlapplytype_func = new JuliaFunction<>{
12301230AttributeSet (),
12311231AttributeSet::get (C, ArrayRef<Attribute>({Attribute::get (C, Attribute::NonNull),
12321232Attribute::getWithAlignment (C, Align (16 ))})),
1233- None );
1233+ {} );
12341234 },
12351235};
12361236static const auto jl_object_id__func = new JuliaFunction<TypeFnContextAndSizeT>{
@@ -1251,7 +1251,7 @@ static const auto setjmp_func = new JuliaFunction<TypeFnContextAndTriple>{
12511251 [](LLVMContext &C){return AttributeList::get (C,
12521252Attributes (C,{Attribute::ReturnsTwice}),
12531253AttributeSet (),
1254- None )},
1254+ {} )},
12551255};
12561256static const auto memcmp_func = new JuliaFunction<TypeFnContextAndSizeT>{
12571257XSTR (memcmp),
@@ -1264,7 +1264,7 @@ static const auto memcmp_func = new JuliaFunction<TypeFnContextAndSizeT>{
12641264return AttributeList::get (C,
12651265AttributeSet::get (C, FnAttrs),
12661266AttributeSet (),
1267- None )},
1267+ {} )},
12681268// TODO: inferLibFuncAttributes(*memcmp_func, TLI);
12691269};
12701270static const auto jldlsym_func = new JuliaFunction<>{
@@ -1298,7 +1298,7 @@ static const auto jlgetnthfieldchecked_func = new JuliaFunction<TypeFnContextAnd
12981298 [](LLVMContext &C){return AttributeList::get (C,
12991299AttributeSet (),
13001300Attributes (C,{Attribute::NonNull}),
1301- None )},
1301+ {} )},
13021302};
13031303static const auto jlfieldindex_func = new JuliaFunction<>{
13041304XSTR (jl_field_index),
@@ -1315,7 +1315,7 @@ static const auto jlfieldindex_func = new JuliaFunction<>{
13151315return AttributeList::get (C,
13161316AttributeSet::get (C, FnAttrs),
13171317AttributeSet (),
1318- None )}, // This function can error if the third argument is 1 so don't do that.
1318+ {} )}, // This function can error if the third argument is 1 so don't do that.
13191319};
13201320static const auto jlfieldisdefinedchecked_func = new JuliaFunction<TypeFnContextAndSizeT>{
13211321XSTR (jl_field_isdefined_checked),
@@ -1327,7 +1327,7 @@ static const auto jlfieldisdefinedchecked_func = new JuliaFunction<TypeFnContext
13271327 [](LLVMContext &C){return AttributeList::get (C,
13281328AttributeSet (),
13291329Attributes (C,{}),
1330- None )},
1330+ {} )},
13311331};
13321332static const auto jlgetcfunctiontrampoline_func = new JuliaFunction<>{
13331333XSTR (jl_get_cfunction_trampoline),
@@ -1349,7 +1349,7 @@ static const auto jlgetcfunctiontrampoline_func = new JuliaFunction<>{
13491349 [](LLVMContext &C){return AttributeList::get (C,
13501350AttributeSet (),
13511351Attributes (C,{Attribute::NonNull}),
1352- None )},
1352+ {} )},
13531353};
13541354static const auto jlgetabiconverter_func = new JuliaFunction<TypeFnContextAndSizeT>{
13551355XSTR (jl_get_abi_converter),
@@ -1389,7 +1389,7 @@ static const auto jl_allocgenericmemory = new JuliaFunction<TypeFnContextAndSize
13891389return AttributeList::get (C,
13901390AttributeSet::get (C, FnAttrs),
13911391AttributeSet::get (C, RetAttrs),
1392- None )},
1392+ {} )},
13931393};
13941394#define BOX_FUNC (ct,at,attrs,nbytes ) \
13951395static const auto box_##ct##_func = new JuliaFunction<>{\
@@ -1431,7 +1431,7 @@ static const auto jldnd_func = new JuliaFunction<>{
14311431return AttributeList::get (C,
14321432AttributeSet::get (C, FnAttrs),
14331433Attributes (C,{}),
1434- None );
1434+ {} );
14351435 },
14361436};
14371437
@@ -1466,7 +1466,7 @@ static const auto pointer_from_objref_func = new JuliaFunction<>{
14661466return AttributeList::get (C,
14671467AttributeSet::get (C, FnAttrs),
14681468Attributes (C,{Attribute::NonNull}),
1469- None )},
1469+ {} )},
14701470};
14711471static const auto gc_loaded_func = new JuliaFunction<>{
14721472" julia.gc_loaded" ,
@@ -1680,7 +1680,7 @@ struct jl_aliasinfo_t{
16801680 MDNode *operand = cast<MDNode>(this ->scope ->getOperand (0 ));
16811681auto scope_name = cast<MDString>(operand->getOperand (0 ))->getString ();
16821682if (scope_name == " jnoalias_const" )
1683- inst->setMetadata (LLVMContext::MD_invariant_load, MDNode::get (inst->getContext (), None ));
1683+ inst->setMetadata (LLVMContext::MD_invariant_load, MDNode::get (inst->getContext (), {} ));
16841684 }
16851685 }
16861686
@@ -2065,7 +2065,7 @@ jl_aliasinfo_t jl_aliasinfo_t::fromTBAA(jl_codectx_t &ctx, MDNode *tbaa){
20652065
20662066static Type *julia_type_to_llvm (jl_codectx_t &ctx, jl_value_t *jt, bool *isboxed = NULL );
20672067static jl_returninfo_t get_specsig_function (jl_codegen_params_t &ctx, Module *M, Value *fval, StringRef name, jl_value_t *sig, jl_value_t *jlrettype, bool is_opaque_closure,
2068- ArrayRef<const char *> ArgNames=None , unsigned nreq=0 );
2068+ ArrayRef<const char *> ArgNames={} , unsigned nreq=0 );
20692069static jl_cgval_t emit_expr (jl_codectx_t &ctx, jl_value_t *expr, ssize_t ssaval = -1 );
20702070static jl_cgval_t emit_checked_var (jl_codectx_t &ctx, Value *bp, jl_sym_t *name, jl_value_t *scope, bool isvol, MDNode *tbaa);
20712071static jl_cgval_t emit_sparam (jl_codectx_t &ctx, size_t i);
@@ -2243,7 +2243,7 @@ static inline jl_cgval_t ghostValue(jl_codectx_t &ctx, jl_value_t *typ)
22432243if (jl_is_type_type (typ)){
22442244assert (is_uniquerep_Type (typ));
22452245// replace T::Type{T} with T, by assuming that T must be a leaftype of some sort
2246- jl_cgval_t constant (NULL , true , typ, NULL , best_tbaa (ctx.tbaa (), typ), None );
2246+ jl_cgval_t constant (NULL , true , typ, NULL , best_tbaa (ctx.tbaa (), typ), ArrayRef<Value*>() );
22472247 constant.constant = jl_tparam0 (typ);
22482248if (typ == (jl_value_t *)jl_typeofbottom_type->super )
22492249 constant.isghost = true ;
@@ -2267,13 +2267,13 @@ static inline jl_cgval_t mark_julia_const(jl_codectx_t &ctx, jl_value_t *jv)
22672267if (jl_is_datatype_singleton ((jl_datatype_t *)typ))
22682268return ghostValue (ctx, typ);
22692269 }
2270- jl_cgval_t constant (NULL , true , typ, NULL , best_tbaa (ctx.tbaa (), typ), None );
2270+ jl_cgval_t constant (NULL , true , typ, NULL , best_tbaa (ctx.tbaa (), typ), ArrayRef<Value*>() );
22712271 constant.constant = jv;
22722272return constant;
22732273}
22742274
22752275
2276- static inline jl_cgval_t mark_julia_slot (Value *v, jl_value_t *typ, Value *tindex, MDNode *tbaa, ArrayRef<Value*> inline_roots=None )
2276+ static inline jl_cgval_t mark_julia_slot (Value *v, jl_value_t *typ, Value *tindex, MDNode *tbaa, ArrayRef<Value*> inline_roots={} )
22772277{
22782278// this enables lazy-copying of immutable values and stack or argument slots
22792279jl_cgval_t tagval (v, false , typ, tindex, tbaa, inline_roots);
@@ -2353,7 +2353,7 @@ static inline jl_cgval_t mark_julia_type(jl_codectx_t &ctx, Value *v, bool isbox
23532353if (type_is_ghost (T))
23542354return ghostValue (ctx, typ);
23552355if (isboxed)
2356- return jl_cgval_t (v, isboxed, typ, NULL , best_tbaa (ctx.tbaa (), typ), None );
2356+ return jl_cgval_t (v, isboxed, typ, NULL , best_tbaa (ctx.tbaa (), typ), ArrayRef<Value*>() );
23572357if (v && v->getType ()->isAggregateType ()){
23582358// eagerly put this back onto the stack
23592359// llvm mem2reg pass will remove this if unneeded
@@ -2414,7 +2414,7 @@ static inline jl_cgval_t update_julia_type(jl_codectx_t &ctx, const jl_cgval_t &
24142414return jl_cgval_t ();
24152415 }
24162416if (v.Vboxed && (v.isboxed || alwaysboxed)){
2417- return jl_cgval_t (v.Vboxed , true , typ, NULL , best_tbaa (ctx.tbaa (), typ), None );
2417+ return jl_cgval_t (v.Vboxed , true , typ, NULL , best_tbaa (ctx.tbaa (), typ), ArrayRef<Value*>() );
24182418 }
24192419 }
24202420if (!jl_is_concrete_type (typ))
@@ -2529,7 +2529,7 @@ static jl_cgval_t convert_julia_type_to_union(jl_codectx_t &ctx, const jl_cgval_
25292529 }
25302530else if (jl_subtype (v.typ , typ)){
25312531// convert to a simple isboxed value, since it must be boxed in the new union
2532- return jl_cgval_t (boxed (ctx, v), true , typ, new_tindex, best_tbaa (ctx.tbaa (), typ), None );
2532+ return jl_cgval_t (boxed (ctx, v), true , typ, new_tindex, best_tbaa (ctx.tbaa (), typ), ArrayRef<Value*>() );
25332533 }
25342534else {
25352535if (!allow_mismatch)
@@ -2792,7 +2792,7 @@ static jl_cgval_t convert_julia_type_to_union(jl_codectx_t &ctx, const jl_cgval_
27922792if (!computed_new_index_early && isa<Constant>(new_tindex)){
27932793// no new tindex (it is set to UNION_BOX_MARKER), so the new value must be something boxed in the new union
27942794// TODO: use ret.Vboxed or box_union directly to set skip instead of emitting a trap?
2795- return jl_cgval_t (boxed (ctx, v), true , typ, new_tindex, best_tbaa (ctx.tbaa (), typ), None );
2795+ return jl_cgval_t (boxed (ctx, v), true , typ, new_tindex, best_tbaa (ctx.tbaa (), typ), ArrayRef<Value*>() );
27962796 }
27972797// some of the values are still unboxed
27982798setName (ctx.emission_context , new_tindex, " tindex" );
@@ -5770,7 +5770,7 @@ static jl_cgval_t emit_varinfo(jl_codectx_t &ctx, jl_varinfo_t &vi, jl_sym_t *va
57705770 Value *tindex = NULL ;
57715771if (vi.pTIndex )
57725772 tindex = ctx.builder .CreateAlignedLoad (getInt8Ty (ctx.builder .getContext ()), vi.pTIndex , Align (1 ), vi.isVolatile );
5773- v = mark_julia_slot (ssaslot, vi.value .typ , tindex, ctx.tbaa ().tbaa_stack , None );
5773+ v = mark_julia_slot (ssaslot, vi.value .typ , tindex, ctx.tbaa ().tbaa_stack );
57745774 }
57755775if (vi.inline_roots ){
57765776 AllocaInst *varslot = vi.inline_roots ;
@@ -6734,7 +6734,7 @@ static jl_cgval_t emit_expr(jl_codectx_t &ctx, jl_value_t *expr, ssize_t ssaidx_
67346734 SmallVector<Metadata *, 8 > MDs;
67356735
67366736// Reserve first location for self reference to the LoopID metadata node.
6737- TempMDTuple TempNode = MDNode::getTemporary (ctx.builder .getContext (), None );
6737+ TempMDTuple TempNode = MDNode::getTemporary (ctx.builder .getContext (), {} );
67386738 MDs.push_back (TempNode.get ());
67396739
67406740for (int i = 0 , ie = nargs; i < ie; ++i){
@@ -8799,7 +8799,7 @@ static jl_llvm_functions_t
87998799 AllocaInst *roots = sizes.second > 0 ? emit_static_roots (ctx, sizes.second ) : nullptr ;
88008800if (bits) bits->setName (jl_symbol_name (s));
88018801if (roots) roots->setName (StringRef (" .roots." ) + jl_symbol_name (s));
8802- varinfo.value = mark_julia_slot (bits, jt, NULL , ctx.tbaa ().tbaa_stack , None );
8802+ varinfo.value = mark_julia_slot (bits, jt, NULL , ctx.tbaa ().tbaa_stack , {} );
88038803 varinfo.inline_roots = roots;
88048804 varinfo.inline_roots_count = sizes.second ;
88058805alloc_def_flag (ctx, varinfo);
0 commit comments