@@ -330,7 +330,7 @@ function ir_inline_item!(compact::IncrementalCompact, idx::Int, argexprs::Vector
330330 push! (linetable, newentry)
331331 end
332332 if coverage && spec. ir. stmts[1 ][:line ] + linetable_offset != topline
333- insert_node_here! (compact, NewInstruction (Expr (:code_coverage_effect ), Nothing , topline))
333+ insert_node_here! (compact, NewInstruction (Expr (:code_coverage_effect ), LNothing , topline))
334334 end
335335 if def. isva
336336 nargs_def = Int (def. nargs:: Int32 )
@@ -400,7 +400,7 @@ function ir_inline_item!(compact::IncrementalCompact, idx::Int, argexprs::Vector
400400 inline_compact. result[idx′][:type ] =
401401 argextype (val, isa (val, Expr) ? compact : inline_compact)
402402 insert_node_here! (inline_compact, NewInstruction (GotoNode (post_bb_id),
403- Any , compact. result[idx′][:line ]),
403+ ⊤ , compact. result[idx′][:line ]),
404404 true )
405405 push! (pn. values, SSAValue (idx′))
406406 else
@@ -443,11 +443,11 @@ function fix_va_argexprs!(compact::IncrementalCompact,
443443 argexprs:: Vector{Any} , nargs_def:: Int , line_idx:: Int32 )
444444 newargexprs = argexprs[1 : (nargs_def- 1 )]
445445 tuple_call = Expr (:call , TOP_TUPLE)
446- tuple_typs = Any []
446+ tuple_typs = LatticeElement []
447447 for i in nargs_def: length (argexprs)
448448 arg = argexprs[i]
449449 push! (tuple_call. args, arg)
450- push! (tuple_typs, unwraptype ( argextype (arg, compact) ))
450+ push! (tuple_typs, argextype (arg, compact))
451451 end
452452 tuple_typ = tuple_tfunc (tuple_typs)
453453 push! (newargexprs, insert_node_here! (compact, NewInstruction (tuple_call, tuple_typ, line_idx)))
@@ -480,15 +480,15 @@ function ir_inline_unionsplit!(compact::IncrementalCompact, idx::Int,
480480 a <: m && continue
481481 # Generate isa check
482482 isa_expr = Expr (:call , isa, argexprs[i], m)
483- ssa = insert_node_here! (compact, NewInstruction (isa_expr, Bool , line))
483+ ssa = insert_node_here! (compact, NewInstruction (isa_expr, LBool , line))
484484 if cond === true
485485 cond = ssa
486486 else
487487 and_expr = Expr (:call , and_int, cond, ssa)
488- cond = insert_node_here! (compact, NewInstruction (and_expr, Bool , line))
488+ cond = insert_node_here! (compact, NewInstruction (and_expr, LBool , line))
489489 end
490490 end
491- insert_node_here! (compact, NewInstruction (GotoIfNot (cond, next_cond_bb), Union{} , line))
491+ insert_node_here! (compact, NewInstruction (GotoIfNot (cond, next_cond_bb), ⊥ , line))
492492 bb = next_cond_bb - 1
493493 finish_current_bb! (compact, 0 )
494494 argexprs′ = argexprs
@@ -500,7 +500,7 @@ function ir_inline_unionsplit!(compact::IncrementalCompact, idx::Int,
500500 a, m = aparams[i], mparams[i]
501501 if ! (a <: m )
502502 argexprs′[i] = insert_node_here! (compact,
503- NewInstruction (PiNode (argex, m), m , line))
503+ NewInstruction (PiNode (argex, m), NativeType (m) , line))
504504 end
505505 end
506506 end
@@ -517,25 +517,25 @@ function ir_inline_unionsplit!(compact::IncrementalCompact, idx::Int,
517517 push! (pn. edges, bb)
518518 push! (pn. values, val)
519519 insert_node_here! (compact,
520- NewInstruction (GotoNode (join_bb), Union{} , line))
520+ NewInstruction (GotoNode (join_bb), ⊥ , line))
521521 else
522522 insert_node_here! (compact,
523- NewInstruction (ReturnNode (), Union{} , line))
523+ NewInstruction (ReturnNode (), ⊥ , line))
524524 end
525525 finish_current_bb! (compact, 0 )
526526 end
527527 bb += 1
528528 # We're now in the fall through block, decide what to do
529529 if fully_covered
530530 e = Expr (:call , GlobalRef (Core, :throw ), FATAL_TYPE_BOUND_ERROR)
531- insert_node_here! (compact, NewInstruction (e, Union{} , line))
532- insert_node_here! (compact, NewInstruction (ReturnNode (), Union{} , line))
531+ insert_node_here! (compact, NewInstruction (e, ⊥ , line))
532+ insert_node_here! (compact, NewInstruction (ReturnNode (), ⊥ , line))
533533 finish_current_bb! (compact, 0 )
534534 else
535535 ssa = insert_node_here! (compact, NewInstruction (stmt, typ, line))
536536 push! (pn. edges, bb)
537537 push! (pn. values, ssa)
538- insert_node_here! (compact, NewInstruction (GotoNode (join_bb), Union{} , line))
538+ insert_node_here! (compact, NewInstruction (GotoNode (join_bb), ⊥ , line))
539539 finish_current_bb! (compact, 0 )
540540 end
541541
@@ -642,7 +642,7 @@ function rewrite_apply_exprargs!(
642642 if thisarginfo === nothing
643643 if isPartialStruct (def_type)
644644 # def_type.typ <: Tuple is assumed
645- def_argtypes = LatticeElement[ LatticeElement (t) for t in partialfields (def_type)]
645+ def_argtypes = partialfields (def_type)
646646 else
647647 def_argtypes = LatticeElement[]
648648 if isConst (def_type) # && isa(constant(def_type), Union{Tuple, SimpleVector}) is implied
@@ -699,15 +699,15 @@ function rewrite_apply_exprargs!(
699699 new_sig, istate, todo)
700700 end
701701 if i != length (thisarginfo. each)
702- valT = getfield_tfunc (unwraptype ( call. rt) , Const (1 ))
702+ valT = getfield_tfunc (call. rt, Const (1 ))
703703 val_extracted = insert_node! (ir, idx, NewInstruction (
704704 Expr (:call , GlobalRef (Core, :getfield ), state1, 1 ),
705705 valT))
706706 push! (new_argexprs, val_extracted)
707- push! (new_argtypes, LatticeElement ( valT) )
707+ push! (new_argtypes, valT)
708708 state_extracted = insert_node! (ir, idx, NewInstruction (
709709 Expr (:call , GlobalRef (Core, :getfield ), state1, 2 ),
710- getfield_tfunc (unwraptype ( call. rt) , Const (2 ))))
710+ getfield_tfunc (call. rt, Const (2 ))))
711711 state = Core. svec (state_extracted)
712712 end
713713 end
@@ -892,19 +892,19 @@ function is_valid_type_for_apply_rewrite(typ::LatticeElement, params::Optimizati
892892end
893893
894894function inline_splatnew! (ir:: IRCode , idx:: Int , stmt:: Expr , rt:: LatticeElement )
895- nf = nfields_tfunc (unwraptype (rt) )
895+ nf = nfields_tfunc (rt )
896896 if isConst (nf)
897897 eargs = stmt. args
898898 tup = eargs[2 ]
899899 tt = argextype (tup, ir)
900- tnf = nfields_tfunc (unwraptype (tt) )
900+ tnf = nfields_tfunc (tt )
901901 # TODO : hoisting this constant(tnf) === constant(nf) check into codegen
902902 # would enable us to almost always do this transform
903903 if isConst (tnf) && constant (tnf) === constant (nf)
904904 n = constant (tnf):: Int
905905 new_argexprs = Any[eargs[1 ]]
906906 for j = 1 : n
907- atype = getfield_tfunc (unwraptype (tt) , Const (j))
907+ atype = getfield_tfunc (tt , Const (j))
908908 new_call = Expr (:call , Core. getfield, tup, j)
909909 new_argexpr = insert_node! (ir, idx, NewInstruction (new_call, atype))
910910 push! (new_argexprs, new_argexpr)
@@ -1036,14 +1036,14 @@ end
10361036function narrow_opaque_closure! (ir:: IRCode , stmt:: Expr , @nospecialize (info), state:: InliningState )
10371037 if isa (info, OpaqueClosureCreateInfo)
10381038 lbt = argextype (stmt. args[3 ], ir)
1039- lb, exact = instanceof_tfunc (unwraptype ( lbt) )
1039+ lb, exact = instanceof_tfunc (lbt)
10401040 exact || return
10411041 ubt = argextype (stmt. args[4 ], ir)
1042- ub, exact = instanceof_tfunc (unwraptype ( ubt) )
1042+ ub, exact = instanceof_tfunc (ubt)
10431043 exact || return
10441044 # Narrow opaque closure type
1045- newT = widenconst (tmeet ( tmerge (lb, info. unspec. rt), ub) )
1046- if newT != ub
1045+ newT = widenconst (tmerge (lb, info. unspec. rt) ⊓ ub )
1046+ if newT != = ub
10471047 # N.B.: Narrowing the ub requires a backdge on the mi whose type
10481048 # information we're using, since a change in that function may
10491049 # invalidate ub result.
@@ -1434,7 +1434,7 @@ function late_inline_special_case!(
14341434 return SomeCase (quoted (constant (type)))
14351435 end
14361436 cmp_call = Expr (:call , GlobalRef (Core, :(=== )), stmt. args[2 ], stmt. args[3 ])
1437- cmp_call_ssa = insert_node! (ir, idx, effect_free (NewInstruction (cmp_call, Bool )))
1437+ cmp_call_ssa = insert_node! (ir, idx, effect_free (NewInstruction (cmp_call, LBool )))
14381438 not_call = Expr (:call , GlobalRef (Core. Intrinsics, :not_int ), cmp_call_ssa)
14391439 return SomeCase (not_call)
14401440 elseif isinlining && length (argtypes) == 3 && istopfunction (f, :(> :))
0 commit comments