Package evaluation to load Libtask on Julia 1.14.0-DEV.2226 (797a5ef2b0*) started at 2026-05-23T16:57:17.557 ################################################################################ # Set-up # Set-up completed after 0.1s ################################################################################ # Installation # Installing Libtask... Resolving package versions... Installed MistyClosures ─ v2.1.0 Installed Libtask ─────── v0.9.17 Updating `~/.julia/environments/v1.14/Project.toml` [6f1fad26] + Libtask v0.9.17 Updating `~/.julia/environments/v1.14/Manifest.toml` [6f1fad26] + Libtask v0.9.17 [dbe65cb8] + MistyClosures v2.1.0 [2a0f44e3] + Base64 v1.11.0 [b77e0a4c] + InteractiveUtils v1.11.0 [ac6e5ff7] + JuliaSyntaxHighlighting v1.13.0 [56ddb016] + Logging v1.11.0 [d6f4376e] + Markdown v1.11.0 [9a3f8284] + Random v1.11.0 [ea8e919c] + SHA v1.13.0 [9e88b42a] + Serialization v1.11.0 [f489334b] + StyledStrings v1.13.0 [8dfed614] + Test v1.11.0 Installation completed after 4.7s ################################################################################ # Precompilation # Precompiling PkgEval dependencies... Project No packages added to or removed from `~/.julia/environments/pkgeval/Project.toml` Manifest No packages added to or removed from `~/.julia/environments/pkgeval/Manifest.toml` Precompiling package dependencies... Precompiling project... 0.5 s ✓ MistyClosures ERROR: LoadError: LoweringError: #= /home/pkgeval/.julia/packages/Libtask/MQIAO/src/bbcode.jl:46 =# - expected identifier or `identifier::type` Expression:  (meta nospecialize type) Containing expressions:  (function (call new_inst (meta nospecialize stmt) (kw (meta nospecialize type) Any) (kw flag (. CC (inert IR_FLAG_REFINED)))) (block (return (call NewInstruction stmt type (call (. CC (inert NoCallInfo))) (call Int32 1) flag))))  Detailed provenance:  (meta nospecialize type) @#= /source/usr/share/julia/JuliaLowering/src/syntax_macros.jl:27 =#  └─ (meta nospecialize type) @#= /source/usr/share/julia/JuliaLowering/src/syntax_macros.jl:27 =#  ├─ (macrocall @nospecialize :(#= /home/pkgeval/.julia/packages/Libtask/MQIAO/src/bbcode.jl:46 =#) type)  │ └─ (macrocall @nospecialize :(#= /home/pkgeval/.julia/packages/Libtask/MQIAO/src/bbcode.jl:46 =#) type)  │ ├─ @ /home/pkgeval/.julia/packages/Libtask/MQIAO/src/bbcode.jl:46  │ └─ (macrocall @doc :(#= /home/pkgeval/.julia/packages/Libtask/MQIAO/src/bbcode.jl:1 =#) " module BasicBlockCode\n\nCopied over from Mooncake.jl in order to avoid making this package depend on Mooncake.\nRefer to Mooncake's developer docs for context on this file.\n" (module true BasicBlockCode (block (using (: (. Core Compiler) (. ReturnNode) (. PhiNode) (. GotoIfNot) (. GotoNode) (. NewInstruction) (. IRCode) (. SSAValue) (. PiNode) (. Argument))) (const (= CC (. Core (inert Compiler)))) (export ID seed_id! IDPhiNode IDGotoNode IDGotoIfNot Switch BBlock phi_nodes terminator insert_before_terminator! collect_stmts compute_all_predecessors compute_all_successors BBCode characterise_used_ids characterise_unique_predecessor_blocks InstVector IDInstPair __line_numbers_to_block_numbers! is_reachable_return_node new_inst replace_ids) (const (= (:: _id_count (curly Dict Int Int32)) (call (curly Dict Int Int32)))) (function (call new_inst (macrocall @nospecialize :(#= /home/pkgeval/.julia/packages/Libtask/MQIAO/src/bbcode.jl:46 =#) stmt) (kw (macrocall @nospecialize :(#= /home/pkgeval/.julia/packages/Libtask/MQIAO/src/bbcode.jl:46 =#) type) Any) (kw flag (. CC (inert IR_FLAG_REFINED)))) (block (return (call NewInstruction stmt type (call (. CC (inert NoCallInfo))) (call Int32 1) flag)))) (const (= InstVector (curly Vector NewInstruction))) (struct false ID (block (:: id Int32) (function (call ID) (block (= current_thread_id (call (. Threads (inert threadid)))) (= id_count (call get _id_count current_thread_id (call Int32 0))) (= (ref _id_count current_thread_id) (call + id_count (call Int32 1))) (return (call new id_count)))))) (= (call (. Base (inert copy)) (:: id ID)) (block id)) (function (call seed_id!) (block (return (global (= (ref _id_count (call (. Threads (inert threadid)))) 0))))) (struct false IDPhiNode (block (:: edges (curly Vector ID)) (:: values (curly Vector Any)))) (= (call (. Base (inert ==)) (:: x IDPhiNode) (:: y IDPhiNode)) (block (&& (call == (. x (inert edges)) (. y (inert edges))) (call == (. x (inert values)) (. y (inert values)))))) (= (call (. Base (inert copy)) (:: node IDPhiNode)) (block (call IDPhiNode (call copy (. node (inert edges))) (call copy (. node (inert values)))))) (struct false IDGotoNode (block (:: label ID))) (= (call (. Base (inert copy)) (:: node IDGotoNode)) (block (call IDGotoNode (call copy (. node (inert label)))))) (struct false IDGotoIfNot (block (:: cond Any) (:: dest ID))) (= (call (. Base (inert copy)) (:: node IDGotoIfNot)) (block (call IDGotoIfNot (call copy (. node (inert cond))) (call copy (. node (inert dest)))))) (struct false Switch (block (:: conds (curly Vector Any)) (:: dests (curly Vector ID)) (:: fallthrough_dest ID) (function (call Switch (:: conds (curly Vector Any)) (:: dests (curly Vector ID)) (:: fallthrough_dest ID)) (block (macrocall @assert :(#= /home/pkgeval/.julia/packages/Libtask/MQIAO/src/bbcode.jl:95 =#) (call == (call length conds) (call length dests))) (return (call new conds dests fallthrough_dest)))))) (const (= Terminator (curly Union Switch IDGotoIfNot IDGotoNode ReturnNode))) (struct true BBlock (block (:: id ID) (:: inst_ids (curly Vector ID)) (:: insts InstVector) (function (call BBlock (:: id ID) (:: inst_ids (curly Vector ID)) (:: insts InstVector)) (block (macrocall @assert :(#= /home/pkgeval/.julia/packages/Libtask/MQIAO/src/bbcode.jl:107 =#) (call == (call length inst_ids) (call length insts))) (return (call new id inst_ids insts)))))) (const (= IDInstPair (curly Tuple ID NewInstruction))) (function (call BBlock (:: id ID) (:: inst_pairs (curly Vector IDInstPair))) (block (return (call BBlock id (. first (tuple inst_pairs)) (. last (tuple inst_pairs)))))) (= (call (. Base (inert length)) (:: bb BBlock)) (block (call length (. bb (inert inst_ids))))) (= (call (. Base (inert copy)) (:: bb BBlock)) (block (call BBlock (. bb (inert id)) (call copy (. bb (inert inst_ids))) (call copy (. bb (inert insts)))))) (function (call phi_nodes (:: bb BBlock)) (block (= n_phi_nodes (call findlast (-> x (block (call isa (. x (inert stmt)) IDPhiNode))) (. bb (inert insts)))) (if (call === n_phi_nodes nothing) (block (= n_phi_nodes 0))) (return (tuple (ref (. bb (inert inst_ids)) (call : 1 n_phi_nodes)) (ref (. bb (inert insts)) (call : 1 n_phi_nodes)))))) (function (:: (call (. Base (inert insert!)) (:: bb BBlock) (:: n Int) (:: id ID) (:: inst NewInstruction)) Nothing) (block (call insert! (. bb (inert inst_ids)) n id) (call insert! (. bb (inert insts)) n inst) (return nothing))) (= (call terminator (:: bb BBlock)) (block (if (call isa (. (ref (. bb (inert insts)) end) (inert stmt)) Terminator) (. (ref (. bb (inert insts)) end) (inert stmt)) nothing))) (function (:: (call insert_before_terminator! (:: bb BBlock) (:: id ID) (:: inst NewInstruction)) Nothing) (block (call insert! bb (call + (call length (. bb (inert insts))) (if (call === (call terminator bb) nothing) 1 0)) id inst) (return nothing))) (= (:: (call collect_stmts (:: bb BBlock)) (curly Vector IDInstPair)) (block (call collect (call zip (. bb (inert inst_ids)) (. bb (inert insts)))))) (macrocall @static :(#= /home/pkgeval/.julia/packages/Libtask/MQIAO/src/bbcode.jl:145 =#) (if (call >= VERSION (macrocall @v_str :(#= /home/pkgeval/.julia/packages/Libtask/MQIAO/src/bbcode.jl:145 =#) "1.12-")) (block (struct false BBCode (block (:: blocks (curly Vector BBlock)) (:: argtypes (curly Vector Any)) (:: sptypes (curly Vector (. CC (inert VarState)))) (:: debuginfo (. CC (inert DebugInfoStream))) (:: meta (curly Vector Expr)) (:: valid_worlds (. CC (inert WorldRange))))) (function (call BBCode (:: ir (curly Union IRCode BBCode)) (:: new_blocks (curly Vector BBlock))) (block (return (call BBCode new_blocks (call (. CC (inert copy)) (. ir (inert argtypes))) (call (. CC (inert copy)) (. ir (inert sptypes))) (call (. CC (inert copy)) (. ir (inert debuginfo))) (call (. CC (inert copy)) (. ir (inert meta))) (. ir (inert valid_worlds))))))) (block (struct false BBCode (block (:: blocks (curly Vector BBlock)) (:: argtypes (curly Vector Any)) (:: sptypes (curly Vector (. CC (inert VarState)))) (:: linetable (curly Vector (. Core (inert LineInfoNode)))) (:: meta (curly Vector Expr)))) (function (call BBCode (:: ir (curly Union IRCode BBCode)) (:: new_blocks (curly Vector BBlock))) (block (return (call BBCode new_blocks (call (. CC (inert copy)) (. ir (inert argtypes))) (call (. CC (inert copy)) (. ir (inert sptypes))) (call (. CC (inert copy)) (. ir (inert linetable))) (call (. CC (inert copy)) (. ir (inert meta)))))))))) (= (call (. Base (inert copy)) (:: ir BBCode)) (block (call BBCode ir (call copy (. ir (inert blocks)))))) (= (:: (call compute_all_successors (:: ir BBCode)) (curly Dict ID (curly Vector ID))) (block (call _compute_all_successors (. ir (inert blocks))))) (macrocall @noinline :(#= /home/pkgeval/.julia/packages/Libtask/MQIAO/src/bbcode.jl:190 =#) (function (:: (call _compute_all_successors (:: blks (curly Vector BBlock))) (curly Dict ID (curly Vector ID))) (block (= succs (do (call map (call enumerate blks)) (-> (tuple (tuple n blk)) (block (= is_final_block (call == n (call length blks))) (= t (call terminator blk)) (if (call === t nothing) (block (return (if is_final_block (ref ID) (ref ID (. (ref blks (call + n 1)) (inert id)))))) (elseif (block (call isa t IDGotoNode)) (block (return (vect (. t (inert label))))) (elseif (block (call isa t IDGotoIfNot)) (block (return (if is_final_block (ref ID (. t (inert dest))) (ref ID (. t (inert dest)) (. (ref blks (call + n 1)) (inert id)))))) (elseif (block (call isa t ReturnNode)) (block (return (ref ID))) (elseif (block (call isa t Switch)) (block (return (call vcat (. t (inert dests)) (. t (inert fallthrough_dest))))) (block (call error (string "Unhandled terminator " t)))))))))))) (return (call (curly Dict ID (curly Vector ID)) (generator (tuple (. b (inert id)) succ) (= (tuple b succ) (call zip blks succs)))))))) (function (:: (call compute_all_predecessors (:: ir BBCode)) (curly Dict ID (curly Vector ID))) (block (return (call _compute_all_predecessors (. ir (inert blocks)))))) (function (:: (call _compute_all_predecessors (:: blks (curly Vector BBlock))) (curly Dict ID (curly Vector ID))) (block (= successor_map (call _compute_all_successors blks)) (= ks (call collect (call keys successor_map))) (= predecessor_map (call (curly Dict ID (curly Vector ID)) (call zip ks (call map (-> _ (block (ref ID))) ks)))) (for (= (tuple k succs) successor_map) (block (for (= succ succs) (block (call push! (ref predecessor_map succ) k))))) (return predecessor_map))) (= (:: (call collect_stmts (:: ir BBCode)) (curly Vector IDInstPair)) (block (call reduce vcat (call map collect_stmts (. ir (inert blocks)))))) (function (call id_to_line_map (:: ir BBCode)) (block (= lines (call collect_stmts ir)) (= lines_and_line_numbers (call collect (call zip lines (call eachindex lines)))) (= ids_and_line_numbers (call map (-> x (block (tuple (ref (ref x 1) 1) (ref x 2)))) lines_and_line_numbers)) (return (call Dict ids_and_line_numbers)))) (= (call concatenate_ids (:: bb_code BBCode)) (block (call reduce vcat (call map (-> b (block (. b (inert inst_ids)))) (. bb_code (inert blocks)))))) (= (call concatenate_stmts (:: bb_code BBCode)) (block (call reduce vcat (call map (-> b (block (. b (inert insts)))) (. bb_code (inert blocks)))))) (= (:: (call control_flow_graph (:: bb_code BBCode)) (. (. Core (inert Compiler)) (inert CFG))) (block (call _control_flow_graph (. bb_code (inert blocks))))) (function (:: (call _control_flow_graph (:: blks (curly Vector BBlock))) (. (. Core (inert Compiler)) (inert CFG))) (block (= preds_ids (call _compute_all_predecessors blks)) (= succs_ids (call _compute_all_successors blks)) (= block_ids (call map (-> b (block (. b (inert id)))) blks)) (= id_to_num (call (curly Dict ID Int) (call zip block_ids (call collect (call eachindex block_ids))))) (= preds (call map (-> id (block (call sort (call map (-> p (block (ref id_to_num p))) (ref preds_ids id))))) block_ids)) (= succs (call map (-> id (block (call sort (call map (-> s (block (ref id_to_num s))) (ref succs_ids id))))) block_ids)) (macrocall @static :(#= /home/pkgeval/.julia/packages/Libtask/MQIAO/src/bbcode.jl:261 =#) (if (call >= VERSION (macrocall @v_str :(#= /home/pkgeval/.julia/packages/Libtask/MQIAO/src/bbcode.jl:261 =#) "1.11.6")) (block (call push! (ref preds 1) 0)))) (= index (call .+ (call vcat 0 (call cumsum (call map length blks))) 1)) (= basic_blocks (do (call map (call eachindex blks)) (-> (tuple n) (block (= stmt_range (call (. (. Core (inert Compiler)) (inert StmtRange)) (ref index n) (call - (ref index (call + n 1)) 1))) (return (call (. (. Core (inert Compiler)) (inert BasicBlock)) stmt_range (ref preds n) (ref succs n))))))) (return (call (. (. Core (inert Compiler)) (inert CFG)) basic_blocks (ref index (call : 2 (call - end 1))))))) (function (:: (call _lines_to_blocks (:: insts InstVector) (:: cfg (. CC (inert CFG)))) InstVector) (block (= stmts (call __line_numbers_to_block_numbers! (typed_comprehension Any (generator (. x (inert stmt)) (= x insts))) cfg)) (return (call map (-> (tuple inst stmt) (block (call NewInstruction (parameters stmt) inst))) insts stmts)))) (function (call __line_numbers_to_block_numbers! (:: insts (curly Vector Any)) (:: cfg (. CC (inert CFG)))) (block (for (= i (call eachindex insts)) (block (= stmt (ref insts i)) (if (call isa stmt GotoNode) (block (= (ref insts i) (call GotoNode (call (. CC (inert block_for_inst)) cfg (. stmt (inert label)))))) (elseif (block (call isa stmt GotoIfNot)) (block (= (ref insts i) (call GotoIfNot (. stmt (inert cond)) (call (. CC (inert block_for_inst)) cfg (. stmt (inert dest)))))) (elseif (block (call isa stmt PhiNode)) (block (= (ref insts i) (call PhiNode (typed_comprehension Int32 (generator (call (. CC (inert block_for_inst)) cfg (call Int edge)) (= edge (. stmt (inert edges))))) (. stmt (inert values))))) (elseif (block (call (. Meta (inert isexpr)) stmt (inert enter))) (block (= (ref (. stmt (inert args)) 1) (call (. CC (inert block_for_inst)) cfg (:: (ref (. stmt (inert args)) 1) Int))) (= (ref insts i) stmt)))))))) (return insts))) (function (call BBCode (:: ir IRCode)) (block (= insts (call new_inst_vec (. ir (inert stmts)))) (= (tuple ssa_ids stmts) (call _ssas_to_ids insts)) (= (tuple block_ids stmts) (call _block_nums_to_ids stmts (. ir (inert cfg)))) (= blocks (do (call map (call zip (. (. ir (inert cfg)) (inert blocks)) block_ids)) (-> (tuple (tuple bb id)) (block (return (call BBlock id (ref ssa_ids (. bb (inert stmts))) (ref stmts (. bb (inert stmts))))))))) (return (call BBCode ir blocks)))) (function (call new_inst_vec (:: x (. CC (inert InstructionStream)))) (block (= stmt (macrocall @static :(#= /home/pkgeval/.julia/packages/Libtask/MQIAO/src/bbcode.jl:317 =#) (if (call < VERSION (macrocall @v_str :(#= /home/pkgeval/.julia/packages/Libtask/MQIAO/src/bbcode.jl:317 =#) "1.11.0-rc4")) (. x (inert inst)) (. x (inert stmt))))) (return (call map (-> (tuple (... v)) (block (call NewInstruction (... v)))) stmt (. x (inert type)) (. x (inert info)) (. x (inert line)) (. x (inert flag)))))) (const (= SSAToIdDict (curly Dict SSAValue ID))) (const (= BlockNumToIdDict (curly Dict Integer ID))) (function (:: (call _ssas_to_ids (:: insts InstVector)) (curly Tuple (curly Vector ID) InstVector)) (block (= ids (call map (-> _ (block (call ID))) insts)) (= val_id_map (call SSAToIdDict (call zip (. SSAValue (tuple (call eachindex insts))) ids))) (return (tuple ids (call map (call (. Base (inert Fix1)) _ssa_to_ids val_id_map) insts))))) (function (call _ssa_to_ids (:: d SSAToIdDict) (:: inst NewInstruction)) (block (return (call NewInstruction (parameters (kw stmt (call _ssa_to_ids d (. inst (inert stmt))))) inst)))) (function (call _ssa_to_ids (:: d SSAToIdDict) (:: x ReturnNode)) (block (return (if (call isdefined x (inert val)) (call ReturnNode (call get d (. x (inert val)) (. x (inert val)))) x)))) (= (call _ssa_to_ids (:: d SSAToIdDict) (:: x Expr)) (block (call Expr (. x (inert head)) (... (call map (-> a (block (call get d a a))) (. x (inert args))))))) (= (call _ssa_to_ids (:: d SSAToIdDict) (:: x PiNode)) (block (call PiNode (call get d (. x (inert val)) (. x (inert val))) (call get d (. x (inert typ)) (. x (inert typ)))))) (= (call _ssa_to_ids (:: d SSAToIdDict) (:: x QuoteNode)) (block x)) (= (call _ssa_to_ids (:: d SSAToIdDict) x) (block x)) (function (call _ssa_to_ids (:: d SSAToIdDict) (:: x PhiNode)) (block (= new_values (call (curly Vector Any) undef (call length (. x (inert values))))) (for (= n (call eachindex (. x (inert values)))) (block (if (call isassigned (. x (inert values)) n) (block (= (ref new_values n) (call get d (ref (. x (inert values)) n) (ref (. x (inert values)) n))))))) (return (call PhiNode (. x (inert edges)) new_values)))) (= (call _ssa_to_ids (:: d SSAToIdDict) (:: x GotoNode)) (block x)) (= (call _ssa_to_ids (:: d SSAToIdDict) (:: x GotoIfNot)) (block (call GotoIfNot (call get d (. x (inert cond)) (. x (inert cond))) (. x (inert dest))))) (function (:: (call _block_nums_to_ids (:: insts InstVector) (:: cfg (. CC (inert CFG)))) (curly Tuple (curly Vector ID) InstVector)) (block (= ids (call map (-> _ (block (call ID))) (. cfg (inert blocks)))) (= block_num_id_map (call BlockNumToIdDict (call zip (call eachindex (. cfg (inert blocks))) ids))) (return (tuple ids (call map (call (. Base (inert Fix1)) _block_num_to_ids block_num_id_map) insts))))) (function (call _block_num_to_ids (:: d BlockNumToIdDict) (:: x NewInstruction)) (block (return (call NewInstruction (parameters (kw stmt (call _block_num_to_ids d (. x (inert stmt))))) x)))) (function (call _block_num_to_ids (:: d BlockNumToIdDict) (:: x PhiNode)) (block (return (call IDPhiNode (typed_comprehension ID (generator (ref d e) (= e (. x (inert edges))))) (. x (inert values)))))) (= (call _block_num_to_ids (:: d BlockNumToIdDict) (:: x GotoNode)) (block (call IDGotoNode (ref d (. x (inert label)))))) (= (call _block_num_to_ids (:: d BlockNumToIdDict) (:: x GotoIfNot)) (block (call IDGotoIfNot (. x (inert cond)) (ref d (. x (inert dest)))))) (= (call _block_num_to_ids (:: d BlockNumToIdDict) x) (block x)) (const (= IdToIdDict (curly Dict ID ID))) (function (call replace_ids (:: d IdToIdDict) (:: inst NewInstruction)) (block (return (call NewInstruction (parameters (kw stmt (call replace_ids d (. inst (inert stmt))))) inst)))) (= (call replace_ids (:: d IdToIdDict) (:: x ID)) (block (call get d x x))) (function (call replace_ids (:: d IdToIdDict) (:: x ReturnNode)) (block (return (if (call isdefined x (inert val)) (call ReturnNode (call get d (. x (inert val)) (. x (inert val)))) x)))) (= (call replace_ids (:: d IdToIdDict) (:: x Expr)) (block (call Expr (. x (inert head)) (... (call map (-> a (block (call get d a a))) (. x (inert args))))))) (= (call replace_ids (:: d IdToIdDict) (:: x PiNode)) (block (call PiNode (call get d (. x (inert val)) (. x (inert val))) (call get d (. x (inert typ)) (. x (inert typ)))))) (= (call replace_ids (:: d IdToIdDict) (:: x QuoteNode)) (block x)) (= (call replace_ids (:: d IdToIdDict) x) (block x)) (function (call replace_ids (:: d IdToIdDict) (:: x IDPhiNode)) (block (= new_ids (comprehension (generator (call get d e e) (= e (. x (inert edges)))))) (= new_values (call (curly Vector Any) undef (call length (. x (inert values))))) (for (= n (call eachindex (. x (inert values)))) (block (if (call isassigned (. x (inert values)) n) (block (= (ref new_values n) (call get d (ref (. x (inert values)) n) (ref (. x (inert values)) n))))))) (return (call IDPhiNode new_ids new_values)))) (= (call replace_ids (:: d IdToIdDict) (:: x IDGotoNode)) (block x)) (function (call replace_ids (:: d IdToIdDict) (:: x IDGotoIfNot)) (block (return (call IDGotoIfNot (call get d (. x (inert cond)) (. x (inert cond))) (call get d (. x (inert dest)) (. x (inert dest))))))) (function (call replace_ids (:: d IdToIdDict) (:: x Switch)) (block (= new_conds (call (curly Vector Any) undef (call length (. x (inert conds))))) (for (= n (call eachindex (. x (inert conds)))) (block (if (call isassigned (. x (inert conds)) n) (block (= (ref new_conds n) (call get d (ref (. x (inert conds)) n) (ref (. x (inert conds)) n))))))) (= new_dests (comprehension (generator (call get d dest dest) (= dest (. x (inert dests)))))) (= new_fallthrough_dest (call get d (. x (inert fallthrough_dest)) (. x (inert fallthrough_dest)))) (return (call Switch new_conds new_dests new_fallthrough_dest)))) (function (call (. CC (inert IRCode)) (:: bb_code BBCode)) (block (= bb_code (call _lower_switch_statements bb_code)) (= bb_code (call _remove_double_edges bb_code)) (= insts (call _ids_to_line_numbers bb_code)) (= cfg (call control_flow_graph bb_code)) (= insts (call _lines_to_blocks insts cfg)) (macrocall @static :(#= /home/pkgeval/.julia/packages/Libtask/MQIAO/src/bbcode.jl:418 =#) (if (call >= VERSION (macrocall @v_str :(#= /home/pkgeval/.julia/packages/Libtask/MQIAO/src/bbcode.jl:418 =#) "1.12-")) (block (= lines (call map (-> x (block (. x (inert line)))) insts)) (= lines (call collect (call (. Iterators (inert flatten)) lines))) (return (call IRCode (call (. CC (inert InstructionStream)) (call map (-> x (block (. x (inert stmt)))) insts) (call collect Any (call map (-> x (block (. x (inert type)))) insts)) (call collect (. CC (inert CallInfo)) (call map (-> x (block (. x (inert info)))) insts)) lines (call map (-> x (block (. x (inert flag)))) insts)) cfg (call (. CC (inert copy)) (. bb_code (inert debuginfo))) (call (. CC (inert copy)) (. bb_code (inert argtypes))) (call (. CC (inert copy)) (. bb_code (inert meta))) (call (. CC (inert copy)) (. bb_code (inert sptypes))) (. bb_code (inert valid_worlds))))) (block (return (call IRCode (call (. CC (inert InstructionStream)) (call map (-> x (block (. x (inert stmt)))) insts) (call map (-> x (block (. x (inert type)))) insts) (call map (-> x (block (. x (inert info)))) insts) (call map (-> x (block (. x (inert line)))) insts) (call map (-> x (block (. x (inert flag)))) insts)) cfg (call (. CC (inert copy)) (. bb_code (inert linetable))) (call (. CC (inert copy)) (. bb_code (inert argtypes))) (call (. CC (inert copy)) (. bb_code (inert meta))) (call (. CC (inert copy)) (. bb_code (inert sptypes)))))))))) (function (call _lower_switch_statements (:: bb_code BBCode)) (block (= new_blocks (call (curly Vector BBlock) undef 0)) (for (= block (. bb_code (inert blocks))) (block (= t (call terminator block)) (if (call isa t Switch) (block (= bb (call BBlock (. block (inert id)) (ref (. block (inert inst_ids)) (call : 1 (call - end 1))) (ref (. block (inert insts)) (call : 1 (call - end 1))))) (call push! new_blocks bb) (do (call foreach (. t (inert conds)) (. t (inert dests))) (-> (tuple cond dest) (block (= blk (call BBlock (call ID) (vect (call ID)) (vect (call new_inst (call IDGotoIfNot cond dest) Any)))) (call push! new_blocks blk)))) (= fallthrough_inst (call new_inst (call IDGotoNode (. t (inert fallthrough_dest))) Any)) (call push! new_blocks (call BBlock (call ID) (vect (call ID)) (vect fallthrough_inst)))) (block (call push! new_blocks block))))) (return (call BBCode bb_code new_blocks)))) (function (:: (call _ids_to_line_numbers (:: bb_code BBCode)) InstVector) (block (= block_ids (comprehension (generator (. b (inert id)) (= b (. bb_code (inert blocks)))))) (= block_lengths (call map length (. bb_code (inert blocks)))) (= block_start_ssas (. SSAValue (tuple (call vcat 1 (call .+ (ref (call cumsum block_lengths) (call : 1 (call - end 1))) 1))))) (= line_ids (call concatenate_ids bb_code)) (= line_ssas (. SSAValue (tuple (call eachindex line_ids)))) (= id_to_ssa_map (call Dict (call zip (call vcat block_ids line_ids) (call vcat block_start_ssas line_ssas)))) (return (comprehension (generator (call _to_ssas id_to_ssa_map stmt) (= stmt (call concatenate_stmts bb_code))))))) (= (call _to_ssas (:: d Dict) (:: inst NewInstruction)) (block (call NewInstruction (parameters (kw stmt (call _to_ssas d (. inst (inert stmt))))) inst))) (= (call _to_ssas (:: d Dict) (:: x ReturnNode)) (block (if (call isdefined x (inert val)) (call ReturnNode (call get d (. x (inert val)) (. x (inert val)))) x))) (= (call _to_ssas (:: d Dict) (:: x Expr)) (block (call Expr (. x (inert head)) (... (call map (-> a (block (call get d a a))) (. x (inert args))))))) (= (call _to_ssas (:: d Dict) (:: x PiNode)) (block (call PiNode (call get d (. x (inert val)) (. x (inert val))) (call get d (. x (inert typ)) (. x (inert typ)))))) (= (call _to_ssas (:: d Dict) (:: x QuoteNode)) (block x)) (= (call _to_ssas (:: d Dict) x) (block x)) (function (call _to_ssas (:: d Dict) (:: x IDPhiNode)) (block (= new_values (call (curly Vector Any) undef (call length (. x (inert values))))) (for (= n (call eachindex (. x (inert values)))) (block (if (call isassigned (. x (inert values)) n) (block (= (ref new_values n) (call get d (ref (. x (inert values)) n) (ref (. x (inert values)) n))))))) (return (call PhiNode (call map (-> e (block (call Int32 (. (call getindex d e) (inert id))))) (. x (inert edges))) new_values)))) (= (call _to_ssas (:: d Dict) (:: x IDGotoNode)) (block (call GotoNode (. (ref d (. x (inert label))) (inert id))))) (= (call _to_ssas (:: d Dict) (:: x IDGotoIfNot)) (block (call GotoIfNot (call get d (. x (inert cond)) (. x (inert cond))) (. (ref d (. x (inert dest))) (inert id))))) (function (call _remove_double_edges (:: ir BBCode)) (block (= new_blks (do (call map (call enumerate (. ir (inert blocks)))) (-> (tuple (tuple n blk)) (block (= t (call terminator blk)) (if (&& (call isa t IDGotoIfNot) (call == (. t (inert dest)) (. (ref (. ir (inert blocks)) (call + n 1)) (inert id)))) (block (= new_insts (call vcat (ref (. blk (inert insts)) (call : 1 (call - end 1))) (call NewInstruction (parameters (kw stmt (call IDGotoNode (. t (inert dest))))) t))) (return (call BBlock (. blk (inert id)) (. blk (inert inst_ids)) new_insts))) (block (return blk))))))) (return (call BBCode ir new_blks)))) (function (:: (call characterise_unique_predecessor_blocks (:: blks (curly Vector BBlock))) (curly Tuple (curly Dict ID Bool) (curly Dict ID Bool))) (block (= blk_ids (typed_comprehension ID (generator (. b (inert id)) (= b blks)))) (= preds (call _compute_all_predecessors blks)) (= succs (call _compute_all_successors blks)) (= is_unique_pred (call (curly Dict ID Bool))) (for (= id blk_ids) (block (= ss (ref succs id)) (= (ref is_unique_pred id) (&& (call ! (call isempty ss)) (call all (-> s (block (call == (call length (ref preds s)) 1))) ss))))) (= reachable_return_blocks (do (call filter blks) (-> (tuple blk) (block (call is_reachable_return_node (call terminator blk)))))) (if (call == (call length reachable_return_blocks) 1) (block (= (ref is_unique_pred (. (call only reachable_return_blocks) (inert id))) true))) (= pred_is_unique_pred (call (curly Dict ID Bool))) (for (= id blk_ids) (block (= (ref pred_is_unique_pred id) (&& (call == (call length (ref preds id)) 1) (ref is_unique_pred (call only (ref preds id))))))) (= entry_id (ref blk_ids 1)) (= (ref pred_is_unique_pred entry_id) (call isempty (ref preds entry_id))) (return (tuple is_unique_pred pred_is_unique_pred)))) (= (call is_reachable_return_node (:: x ReturnNode)) (block (call isdefined x (inert val)))) (= (call is_reachable_return_node x) (block false)) (function (:: (call characterise_used_ids (:: stmts (curly Vector IDInstPair))) (curly Dict ID Bool)) (block (= ids (. first (tuple stmts))) (= insts (. last (tuple stmts))) (= is_used (call (curly Dict ID Bool) (call zip ids (call fill false (call length ids))))) (for (= inst insts) (block (call _find_id_uses! is_used (. inst (inert stmt))))) (return is_used))) (function (call _find_id_uses! (:: d (curly Dict ID Bool)) (:: x Expr)) (block (for (= arg (. x (inert args))) (block (&& (call in arg (call keys d)) (call setindex! d true arg)))))) (function (call _find_id_uses! (:: d (curly Dict ID Bool)) (:: x IDGotoIfNot)) (block (return (&& (call in (. x (inert cond)) (call keys d)) (call setindex! d true (. x (inert cond))))))) (= (call _find_id_uses! (:: (curly Dict ID Bool)) (:: IDGotoNode)) (block nothing)) (function (call _find_id_uses! (:: d (curly Dict ID Bool)) (:: x PiNode)) (block (return (&& (call in (. x (inert val)) (call keys d)) (call setindex! d true (. x (inert val))))))) (function (call _find_id_uses! (:: d (curly Dict ID Bool)) (:: x IDPhiNode)) (block (= v (. x (inert values))) (for (= n (call eachindex v)) (block (&& (call isassigned v n) (&& (call in (ref v n) (call keys d)) (call setindex! d true (ref v n)))))))) (function (call _find_id_uses! (:: d (curly Dict ID Bool)) (:: x ReturnNode)) (block (return (&& (call isdefined x (inert val)) (&& (call in (. x (inert val)) (call keys d)) (call setindex! d true (. x (inert val)))))))) (= (call _find_id_uses! (:: d (curly Dict ID Bool)) (:: x QuoteNode)) (block nothing)) (= (call _find_id_uses! (:: d (curly Dict ID Bool)) x) (block nothing)) (= (call _id_str (:: id ID)) (block (call string "%" (. id (inert id))))) (= (call _block_str (:: id ID)) (block (call string "#" (. id (inert id))))) (= (call _val_str (:: x ID)) (block (call _id_str x))) (= (call _val_str (:: x Argument)) (block (call string "_" (. x (inert n))))) (= (call _val_str (:: x QuoteNode)) (block (call repr x))) (= (call _val_str (:: x GlobalRef)) (block (call string x))) (= (call _val_str (:: x Nothing)) (block "nothing")) (= (call _val_str x) (block (call repr x))) (function (call (. Base (inert show)) (:: io IO) (:: id ID)) (block (return (call print io (call _id_str id))))) (function (call (. Base (inert show)) (:: io IO) (:: node IDPhiNode)) (block (call print io "φ (") (for (= (tuple i edge) (call enumerate (. node (inert edges)))) (block (call print io (call _block_str edge) " => ") (if (call isassigned (. node (inert values)) i) (block (call print io (call _val_str (ref (. node (inert values)) i)))) (block (call print io "#undef"))) (&& (call < i (call length (. node (inert edges)))) (call print io ", ")))) (return (call print io ")")))) (function (call (. Base (inert show)) (:: io IO) (:: node IDGotoNode)) (block (return (call print io "goto " (call _block_str (. node (inert label))))))) (function (call (. Base (inert show)) (:: io IO) (:: node IDGotoIfNot)) (block (return (call print io "goto " (call _block_str (. node (inert dest))) " if not " (call _val_str (. node (inert cond))))))) (function (call (. Base (inert show)) (:: io IO) (:: sw Switch)) (block (call print io "switch ") (for (= (tuple i (tuple cond dest)) (call enumerate (call zip (. sw (inert conds)) (. sw (inert dests))))) (block (call print io (call _val_str cond) " => " (call _block_str dest)) (&& (call < i (call length (. sw (inert conds)))) (call print io ", ")))) (return (call print io ", fallthrough " (call _block_str (. sw (inert fallthrough_dest))))))) (function (call _stmt_str stmt) (block (&& (call isa stmt (curly Union IDPhiNode IDGotoNode IDGotoIfNot Switch)) (return (call sprint show stmt))) (&& (call isa stmt ReturnNode) (return (if (call isdefined stmt (inert val)) (call string "return " (call _val_str (. stmt (inert val)))) "unreachable"))) (&& (call isa stmt Expr) (return (call _expr_str stmt))) (&& (call isa stmt PiNode) (return (call string "π (" (call _val_str (. stmt (inert val))) ", " (. stmt (inert typ)) ")"))) (return (call _val_str stmt)))) (function (call _expr_str (:: x Expr)) (block (if (call === (. x (inert head)) (inert call)) (block (= f (call _val_str (ref (. x (inert args)) 1))) (= args (call join (generator (call _val_str a) (= a (ref (. x (inert args)) (call : 2 end)))) ", ")) (return (call string f "(" args ")")))) (= args (call join (generator (call _val_str a) (= a (. x (inert args)))) ", ")) (return (call string "Expr(:" (. x (inert head)) ", " args ")")))) (function (call _type_str (macrocall @nospecialize :(#= /home/pkgeval/.julia/packages/Libtask/MQIAO/src/bbcode.jl:679 =#) t)) (block (&& (call === t Any) (return "")) (&& (call === t (curly Union)) (return "::Union{}")) (return (call string "::" t)))) (= (call _is_terminator_stmt stmt) (block (|| (call isa stmt Terminator) (call isa stmt ReturnNode)))) (function (call (. Base (inert show)) (:: io IO) (:: bb BBlock)) (block (call print io (call _block_str (. bb (inert id))) " ─") (= n (call length (. bb (inert insts)))) (for (= (tuple i (tuple id inst)) (call enumerate (call zip (. bb (inert inst_ids)) (. bb (inert insts))))) (block (call println io) (= prefix (if (call < i n) "│ " "└──")) (= stmt (. inst (inert stmt))) (if (&& (call _is_terminator_stmt stmt) (call == i n)) (block (call print io prefix " " (call _stmt_str stmt))) (block (call print io prefix " " (call _id_str id) " = " (call _stmt_str stmt) (call _type_str (. inst (inert type)))))))))) (function (call (. Base (inert show)) (:: io IO) (:: ir BBCode)) (block (call println io "BBCode (" (call length (. ir (inert argtypes))) " args, " (call length (. ir (inert blocks))) " blocks)") (for (= (tuple i block) (call enumerate (. ir (inert blocks)))) (block (call show io block) (&& (call < i (call length (. ir (inert blocks)))) (call println io)))))) (function (call (. Base (inert show)) (:: io IO) (:: (macrocall @MIME_str :(#= /home/pkgeval/.julia/packages/Libtask/MQIAO/src/bbcode.jl:712 =#) "text/plain")) (:: ir BBCode)) (block (return (call show io ir)))))))  │ └─ @ /home/pkgeval/.julia/packages/Libtask/MQIAO/src/bbcode.jl:1  └─ (macrocall @nospecialize :(#= /home/pkgeval/.julia/packages/Libtask/MQIAO/src/bbcode.jl:46 =#) type)  └─ (macrocall @nospecialize :(#= /home/pkgeval/.julia/packages/Libtask/MQIAO/src/bbcode.jl:46 =#) type)  ├─ @ /home/pkgeval/.julia/packages/Libtask/MQIAO/src/bbcode.jl:46  └─ (macrocall @doc :(#= /home/pkgeval/.julia/packages/Libtask/MQIAO/src/bbcode.jl:1 =#) " module BasicBlockCode\n\nCopied over from Mooncake.jl in order to avoid making this package depend on Mooncake.\nRefer to Mooncake's developer docs for context on this file.\n" (module true BasicBlockCode (block (using (: (. Core Compiler) (. ReturnNode) (. PhiNode) (. GotoIfNot) (. GotoNode) (. NewInstruction) (. IRCode) (. SSAValue) (. PiNode) (. Argument))) (const (= CC (. Core (inert Compiler)))) (export ID seed_id! IDPhiNode IDGotoNode IDGotoIfNot Switch BBlock phi_nodes terminator insert_before_terminator! collect_stmts compute_all_predecessors compute_all_successors BBCode characterise_used_ids characterise_unique_predecessor_blocks InstVector IDInstPair __line_numbers_to_block_numbers! is_reachable_return_node new_inst replace_ids) (const (= (:: _id_count (curly Dict Int Int32)) (call (curly Dict Int Int32)))) (function (call new_inst (macrocall @nospecialize :(#= /home/pkgeval/.julia/packages/Libtask/MQIAO/src/bbcode.jl:46 =#) stmt) (kw (macrocall @nospecialize :(#= /home/pkgeval/.julia/packages/Libtask/MQIAO/src/bbcode.jl:46 =#) type) Any) (kw flag (. CC (inert IR_FLAG_REFINED)))) (block (return (call NewInstruction stmt type (call (. CC (inert NoCallInfo))) (call Int32 1) flag)))) (const (= InstVector (curly Vector NewInstruction))) (struct false ID (block (:: id Int32) (function (call ID) (block (= current_thread_id (call (. Threads (inert threadid)))) (= id_count (call get _id_count current_thread_id (call Int32 0))) (= (ref _id_count current_thread_id) (call + id_count (call Int32 1))) (return (call new id_count)))))) (= (call (. Base (inert copy)) (:: id ID)) (block id)) (function (call seed_id!) (block (return (global (= (ref _id_count (call (. Threads (inert threadid)))) 0))))) (struct false IDPhiNode (block (:: edges (curly Vector ID)) (:: values (curly Vector Any)))) (= (call (. Base (inert ==)) (:: x IDPhiNode) (:: y IDPhiNode)) (block (&& (call == (. x (inert edges)) (. y (inert edges))) (call == (. x (inert values)) (. y (inert values)))))) (= (call (. Base (inert copy)) (:: node IDPhiNode)) (block (call IDPhiNode (call copy (. node (inert edges))) (call copy (. node (inert values)))))) (struct false IDGotoNode (block (:: label ID))) (= (call (. Base (inert copy)) (:: node IDGotoNode)) (block (call IDGotoNode (call copy (. node (inert label)))))) (struct false IDGotoIfNot (block (:: cond Any) (:: dest ID))) (= (call (. Base (inert copy)) (:: node IDGotoIfNot)) (block (call IDGotoIfNot (call copy (. node (inert cond))) (call copy (. node (inert dest)))))) (struct false Switch (block (:: conds (curly Vector Any)) (:: dests (curly Vector ID)) (:: fallthrough_dest ID) (function (call Switch (:: conds (curly Vector Any)) (:: dests (curly Vector ID)) (:: fallthrough_dest ID)) (block (macrocall @assert :(#= /home/pkgeval/.julia/packages/Libtask/MQIAO/src/bbcode.jl:95 =#) (call == (call length conds) (call length dests))) (return (call new conds dests fallthrough_dest)))))) (const (= Terminator (curly Union Switch IDGotoIfNot IDGotoNode ReturnNode))) (struct true BBlock (block (:: id ID) (:: inst_ids (curly Vector ID)) (:: insts InstVector) (function (call BBlock (:: id ID) (:: inst_ids (curly Vector ID)) (:: insts InstVector)) (block (macrocall @assert :(#= /home/pkgeval/.julia/packages/Libtask/MQIAO/src/bbcode.jl:107 =#) (call == (call length inst_ids) (call length insts))) (return (call new id inst_ids insts)))))) (const (= IDInstPair (curly Tuple ID NewInstruction))) (function (call BBlock (:: id ID) (:: inst_pairs (curly Vector IDInstPair))) (block (return (call BBlock id (. first (tuple inst_pairs)) (. last (tuple inst_pairs)))))) (= (call (. Base (inert length)) (:: bb BBlock)) (block (call length (. bb (inert inst_ids))))) (= (call (. Base (inert copy)) (:: bb BBlock)) (block (call BBlock (. bb (inert id)) (call copy (. bb (inert inst_ids))) (call copy (. bb (inert insts)))))) (function (call phi_nodes (:: bb BBlock)) (block (= n_phi_nodes (call findlast (-> x (block (call isa (. x (inert stmt)) IDPhiNode))) (. bb (inert insts)))) (if (call === n_phi_nodes nothing) (block (= n_phi_nodes 0))) (return (tuple (ref (. bb (inert inst_ids)) (call : 1 n_phi_nodes)) (ref (. bb (inert insts)) (call : 1 n_phi_nodes)))))) (function (:: (call (. Base (inert insert!)) (:: bb BBlock) (:: n Int) (:: id ID) (:: inst NewInstruction)) Nothing) (block (call insert! (. bb (inert inst_ids)) n id) (call insert! (. bb (inert insts)) n inst) (return nothing))) (= (call terminator (:: bb BBlock)) (block (if (call isa (. (ref (. bb (inert insts)) end) (inert stmt)) Terminator) (. (ref (. bb (inert insts)) end) (inert stmt)) nothing))) (function (:: (call insert_before_terminator! (:: bb BBlock) (:: id ID) (:: inst NewInstruction)) Nothing) (block (call insert! bb (call + (call length (. bb (inert insts))) (if (call === (call terminator bb) nothing) 1 0)) id inst) (return nothing))) (= (:: (call collect_stmts (:: bb BBlock)) (curly Vector IDInstPair)) (block (call collect (call zip (. bb (inert inst_ids)) (. bb (inert insts)))))) (macrocall @static :(#= /home/pkgeval/.julia/packages/Libtask/MQIAO/src/bbcode.jl:145 =#) (if (call >= VERSION (macrocall @v_str :(#= /home/pkgeval/.julia/packages/Libtask/MQIAO/src/bbcode.jl:145 =#) "1.12-")) (block (struct false BBCode (block (:: blocks (curly Vector BBlock)) (:: argtypes (curly Vector Any)) (:: sptypes (curly Vector (. CC (inert VarState)))) (:: debuginfo (. CC (inert DebugInfoStream))) (:: meta (curly Vector Expr)) (:: valid_worlds (. CC (inert WorldRange))))) (function (call BBCode (:: ir (curly Union IRCode BBCode)) (:: new_blocks (curly Vector BBlock))) (block (return (call BBCode new_blocks (call (. CC (inert copy)) (. ir (inert argtypes))) (call (. CC (inert copy)) (. ir (inert sptypes))) (call (. CC (inert copy)) (. ir (inert debuginfo))) (call (. CC (inert copy)) (. ir (inert meta))) (. ir (inert valid_worlds))))))) (block (struct false BBCode (block (:: blocks (curly Vector BBlock)) (:: argtypes (curly Vector Any)) (:: sptypes (curly Vector (. CC (inert VarState)))) (:: linetable (curly Vector (. Core (inert LineInfoNode)))) (:: meta (curly Vector Expr)))) (function (call BBCode (:: ir (curly Union IRCode BBCode)) (:: new_blocks (curly Vector BBlock))) (block (return (call BBCode new_blocks (call (. CC (inert copy)) (. ir (inert argtypes))) (call (. CC (inert copy)) (. ir (inert sptypes))) (call (. CC (inert copy)) (. ir (inert linetable))) (call (. CC (inert copy)) (. ir (inert meta)))))))))) (= (call (. Base (inert copy)) (:: ir BBCode)) (block (call BBCode ir (call copy (. ir (inert blocks)))))) (= (:: (call compute_all_successors (:: ir BBCode)) (curly Dict ID (curly Vector ID))) (block (call _compute_all_successors (. ir (inert blocks))))) (macrocall @noinline :(#= /home/pkgeval/.julia/packages/Libtask/MQIAO/src/bbcode.jl:190 =#) (function (:: (call _compute_all_successors (:: blks (curly Vector BBlock))) (curly Dict ID (curly Vector ID))) (block (= succs (do (call map (call enumerate blks)) (-> (tuple (tuple n blk)) (block (= is_final_block (call == n (call length blks))) (= t (call terminator blk)) (if (call === t nothing) (block (return (if is_final_block (ref ID) (ref ID (. (ref blks (call + n 1)) (inert id)))))) (elseif (block (call isa t IDGotoNode)) (block (return (vect (. t (inert label))))) (elseif (block (call isa t IDGotoIfNot)) (block (return (if is_final_block (ref ID (. t (inert dest))) (ref ID (. t (inert dest)) (. (ref blks (call + n 1)) (inert id)))))) (elseif (block (call isa t ReturnNode)) (block (return (ref ID))) (elseif (block (call isa t Switch)) (block (return (call vcat (. t (inert dests)) (. t (inert fallthrough_dest))))) (block (call error (string "Unhandled terminator " t)))))))))))) (return (call (curly Dict ID (curly Vector ID)) (generator (tuple (. b (inert id)) succ) (= (tuple b succ) (call zip blks succs)))))))) (function (:: (call compute_all_predecessors (:: ir BBCode)) (curly Dict ID (curly Vector ID))) (block (return (call _compute_all_predecessors (. ir (inert blocks)))))) (function (:: (call _compute_all_predecessors (:: blks (curly Vector BBlock))) (curly Dict ID (curly Vector ID))) (block (= successor_map (call _compute_all_successors blks)) (= ks (call collect (call keys successor_map))) (= predecessor_map (call (curly Dict ID (curly Vector ID)) (call zip ks (call map (-> _ (block (ref ID))) ks)))) (for (= (tuple k succs) successor_map) (block (for (= succ succs) (block (call push! (ref predecessor_map succ) k))))) (return predecessor_map))) (= (:: (call collect_stmts (:: ir BBCode)) (curly Vector IDInstPair)) (block (call reduce vcat (call map collect_stmts (. ir (inert blocks)))))) (function (call id_to_line_map (:: ir BBCode)) (block (= lines (call collect_stmts ir)) (= lines_and_line_numbers (call collect (call zip lines (call eachindex lines)))) (= ids_and_line_numbers (call map (-> x (block (tuple (ref (ref x 1) 1) (ref x 2)))) lines_and_line_numbers)) (return (call Dict ids_and_line_numbers)))) (= (call concatenate_ids (:: bb_code BBCode)) (block (call reduce vcat (call map (-> b (block (. b (inert inst_ids)))) (. bb_code (inert blocks)))))) (= (call concatenate_stmts (:: bb_code BBCode)) (block (call reduce vcat (call map (-> b (block (. b (inert insts)))) (. bb_code (inert blocks)))))) (= (:: (call control_flow_graph (:: bb_code BBCode)) (. (. Core (inert Compiler)) (inert CFG))) (block (call _control_flow_graph (. bb_code (inert blocks))))) (function (:: (call _control_flow_graph (:: blks (curly Vector BBlock))) (. (. Core (inert Compiler)) (inert CFG))) (block (= preds_ids (call _compute_all_predecessors blks)) (= succs_ids (call _compute_all_successors blks)) (= block_ids (call map (-> b (block (. b (inert id)))) blks)) (= id_to_num (call (curly Dict ID Int) (call zip block_ids (call collect (call eachindex block_ids))))) (= preds (call map (-> id (block (call sort (call map (-> p (block (ref id_to_num p))) (ref preds_ids id))))) block_ids)) (= succs (call map (-> id (block (call sort (call map (-> s (block (ref id_to_num s))) (ref succs_ids id))))) block_ids)) (macrocall @static :(#= /home/pkgeval/.julia/packages/Libtask/MQIAO/src/bbcode.jl:261 =#) (if (call >= VERSION (macrocall @v_str :(#= /home/pkgeval/.julia/packages/Libtask/MQIAO/src/bbcode.jl:261 =#) "1.11.6")) (block (call push! (ref preds 1) 0)))) (= index (call .+ (call vcat 0 (call cumsum (call map length blks))) 1)) (= basic_blocks (do (call map (call eachindex blks)) (-> (tuple n) (block (= stmt_range (call (. (. Core (inert Compiler)) (inert StmtRange)) (ref index n) (call - (ref index (call + n 1)) 1))) (return (call (. (. Core (inert Compiler)) (inert BasicBlock)) stmt_range (ref preds n) (ref succs n))))))) (return (call (. (. Core (inert Compiler)) (inert CFG)) basic_blocks (ref index (call : 2 (call - end 1))))))) (function (:: (call _lines_to_blocks (:: insts InstVector) (:: cfg (. CC (inert CFG)))) InstVector) (block (= stmts (call __line_numbers_to_block_numbers! (typed_comprehension Any (generator (. x (inert stmt)) (= x insts))) cfg)) (return (call map (-> (tuple inst stmt) (block (call NewInstruction (parameters stmt) inst))) insts stmts)))) (function (call __line_numbers_to_block_numbers! (:: insts (curly Vector Any)) (:: cfg (. CC (inert CFG)))) (block (for (= i (call eachindex insts)) (block (= stmt (ref insts i)) (if (call isa stmt GotoNode) (block (= (ref insts i) (call GotoNode (call (. CC (inert block_for_inst)) cfg (. stmt (inert label)))))) (elseif (block (call isa stmt GotoIfNot)) (block (= (ref insts i) (call GotoIfNot (. stmt (inert cond)) (call (. CC (inert block_for_inst)) cfg (. stmt (inert dest)))))) (elseif (block (call isa stmt PhiNode)) (block (= (ref insts i) (call PhiNode (typed_comprehension Int32 (generator (call (. CC (inert block_for_inst)) cfg (call Int edge)) (= edge (. stmt (inert edges))))) (. stmt (inert values))))) (elseif (block (call (. Meta (inert isexpr)) stmt (inert enter))) (block (= (ref (. stmt (inert args)) 1) (call (. CC (inert block_for_inst)) cfg (:: (ref (. stmt (inert args)) 1) Int))) (= (ref insts i) stmt)))))))) (return insts))) (function (call BBCode (:: ir IRCode)) (block (= insts (call new_inst_vec (. ir (inert stmts)))) (= (tuple ssa_ids stmts) (call _ssas_to_ids insts)) (= (tuple block_ids stmts) (call _block_nums_to_ids stmts (. ir (inert cfg)))) (= blocks (do (call map (call zip (. (. ir (inert cfg)) (inert blocks)) block_ids)) (-> (tuple (tuple bb id)) (block (return (call BBlock id (ref ssa_ids (. bb (inert stmts))) (ref stmts (. bb (inert stmts))))))))) (return (call BBCode ir blocks)))) (function (call new_inst_vec (:: x (. CC (inert InstructionStream)))) (block (= stmt (macrocall @static :(#= /home/pkgeval/.julia/packages/Libtask/MQIAO/src/bbcode.jl:317 =#) (if (call < VERSION (macrocall @v_str :(#= /home/pkgeval/.julia/packages/Libtask/MQIAO/src/bbcode.jl:317 =#) "1.11.0-rc4")) (. x (inert inst)) (. x (inert stmt))))) (return (call map (-> (tuple (... v)) (block (call NewInstruction (... v)))) stmt (. x (inert type)) (. x (inert info)) (. x (inert line)) (. x (inert flag)))))) (const (= SSAToIdDict (curly Dict SSAValue ID))) (const (= BlockNumToIdDict (curly Dict Integer ID))) (function (:: (call _ssas_to_ids (:: insts InstVector)) (curly Tuple (curly Vector ID) InstVector)) (block (= ids (call map (-> _ (block (call ID))) insts)) (= val_id_map (call SSAToIdDict (call zip (. SSAValue (tuple (call eachindex insts))) ids))) (return (tuple ids (call map (call (. Base (inert Fix1)) _ssa_to_ids val_id_map) insts))))) (function (call _ssa_to_ids (:: d SSAToIdDict) (:: inst NewInstruction)) (block (return (call NewInstruction (parameters (kw stmt (call _ssa_to_ids d (. inst (inert stmt))))) inst)))) (function (call _ssa_to_ids (:: d SSAToIdDict) (:: x ReturnNode)) (block (return (if (call isdefined x (inert val)) (call ReturnNode (call get d (. x (inert val)) (. x (inert val)))) x)))) (= (call _ssa_to_ids (:: d SSAToIdDict) (:: x Expr)) (block (call Expr (. x (inert head)) (... (call map (-> a (block (call get d a a))) (. x (inert args))))))) (= (call _ssa_to_ids (:: d SSAToIdDict) (:: x PiNode)) (block (call PiNode (call get d (. x (inert val)) (. x (inert val))) (call get d (. x (inert typ)) (. x (inert typ)))))) (= (call _ssa_to_ids (:: d SSAToIdDict) (:: x QuoteNode)) (block x)) (= (call _ssa_to_ids (:: d SSAToIdDict) x) (block x)) (function (call _ssa_to_ids (:: d SSAToIdDict) (:: x PhiNode)) (block (= new_values (call (curly Vector Any) undef (call length (. x (inert values))))) (for (= n (call eachindex (. x (inert values)))) (block (if (call isassigned (. x (inert values)) n) (block (= (ref new_values n) (call get d (ref (. x (inert values)) n) (ref (. x (inert values)) n))))))) (return (call PhiNode (. x (inert edges)) new_values)))) (= (call _ssa_to_ids (:: d SSAToIdDict) (:: x GotoNode)) (block x)) (= (call _ssa_to_ids (:: d SSAToIdDict) (:: x GotoIfNot)) (block (call GotoIfNot (call get d (. x (inert cond)) (. x (inert cond))) (. x (inert dest))))) (function (:: (call _block_nums_to_ids (:: insts InstVector) (:: cfg (. CC (inert CFG)))) (curly Tuple (curly Vector ID) InstVector)) (block (= ids (call map (-> _ (block (call ID))) (. cfg (inert blocks)))) (= block_num_id_map (call BlockNumToIdDict (call zip (call eachindex (. cfg (inert blocks))) ids))) (return (tuple ids (call map (call (. Base (inert Fix1)) _block_num_to_ids block_num_id_map) insts))))) (function (call _block_num_to_ids (:: d BlockNumToIdDict) (:: x NewInstruction)) (block (return (call NewInstruction (parameters (kw stmt (call _block_num_to_ids d (. x (inert stmt))))) x)))) (function (call _block_num_to_ids (:: d BlockNumToIdDict) (:: x PhiNode)) (block (return (call IDPhiNode (typed_comprehension ID (generator (ref d e) (= e (. x (inert edges))))) (. x (inert values)))))) (= (call _block_num_to_ids (:: d BlockNumToIdDict) (:: x GotoNode)) (block (call IDGotoNode (ref d (. x (inert label)))))) (= (call _block_num_to_ids (:: d BlockNumToIdDict) (:: x GotoIfNot)) (block (call IDGotoIfNot (. x (inert cond)) (ref d (. x (inert dest)))))) (= (call _block_num_to_ids (:: d BlockNumToIdDict) x) (block x)) (const (= IdToIdDict (curly Dict ID ID))) (function (call replace_ids (:: d IdToIdDict) (:: inst NewInstruction)) (block (return (call NewInstruction (parameters (kw stmt (call replace_ids d (. inst (inert stmt))))) inst)))) (= (call replace_ids (:: d IdToIdDict) (:: x ID)) (block (call get d x x))) (function (call replace_ids (:: d IdToIdDict) (:: x ReturnNode)) (block (return (if (call isdefined x (inert val)) (call ReturnNode (call get d (. x (inert val)) (. x (inert val)))) x)))) (= (call replace_ids (:: d IdToIdDict) (:: x Expr)) (block (call Expr (. x (inert head)) (... (call map (-> a (block (call get d a a))) (. x (inert args))))))) (= (call replace_ids (:: d IdToIdDict) (:: x PiNode)) (block (call PiNode (call get d (. x (inert val)) (. x (inert val))) (call get d (. x (inert typ)) (. x (inert typ)))))) (= (call replace_ids (:: d IdToIdDict) (:: x QuoteNode)) (block x)) (= (call replace_ids (:: d IdToIdDict) x) (block x)) (function (call replace_ids (:: d IdToIdDict) (:: x IDPhiNode)) (block (= new_ids (comprehension (generator (call get d e e) (= e (. x (inert edges)))))) (= new_values (call (curly Vector Any) undef (call length (. x (inert values))))) (for (= n (call eachindex (. x (inert values)))) (block (if (call isassigned (. x (inert values)) n) (block (= (ref new_values n) (call get d (ref (. x (inert values)) n) (ref (. x (inert values)) n))))))) (return (call IDPhiNode new_ids new_values)))) (= (call replace_ids (:: d IdToIdDict) (:: x IDGotoNode)) (block x)) (function (call replace_ids (:: d IdToIdDict) (:: x IDGotoIfNot)) (block (return (call IDGotoIfNot (call get d (. x (inert cond)) (. x (inert cond))) (call get d (. x (inert dest)) (. x (inert dest))))))) (function (call replace_ids (:: d IdToIdDict) (:: x Switch)) (block (= new_conds (call (curly Vector Any) undef (call length (. x (inert conds))))) (for (= n (call eachindex (. x (inert conds)))) (block (if (call isassigned (. x (inert conds)) n) (block (= (ref new_conds n) (call get d (ref (. x (inert conds)) n) (ref (. x (inert conds)) n))))))) (= new_dests (comprehension (generator (call get d dest dest) (= dest (. x (inert dests)))))) (= new_fallthrough_dest (call get d (. x (inert fallthrough_dest)) (. x (inert fallthrough_dest)))) (return (call Switch new_conds new_dests new_fallthrough_dest)))) (function (call (. CC (inert IRCode)) (:: bb_code BBCode)) (block (= bb_code (call _lower_switch_statements bb_code)) (= bb_code (call _remove_double_edges bb_code)) (= insts (call _ids_to_line_numbers bb_code)) (= cfg (call control_flow_graph bb_code)) (= insts (call _lines_to_blocks insts cfg)) (macrocall @static :(#= /home/pkgeval/.julia/packages/Libtask/MQIAO/src/bbcode.jl:418 =#) (if (call >= VERSION (macrocall @v_str :(#= /home/pkgeval/.julia/packages/Libtask/MQIAO/src/bbcode.jl:418 =#) "1.12-")) (block (= lines (call map (-> x (block (. x (inert line)))) insts)) (= lines (call collect (call (. Iterators (inert flatten)) lines))) (return (call IRCode (call (. CC (inert InstructionStream)) (call map (-> x (block (. x (inert stmt)))) insts) (call collect Any (call map (-> x (block (. x (inert type)))) insts)) (call collect (. CC (inert CallInfo)) (call map (-> x (block (. x (inert info)))) insts)) lines (call map (-> x (block (. x (inert flag)))) insts)) cfg (call (. CC (inert copy)) (. bb_code (inert debuginfo))) (call (. CC (inert copy)) (. bb_code (inert argtypes))) (call (. CC (inert copy)) (. bb_code (inert meta))) (call (. CC (inert copy)) (. bb_code (inert sptypes))) (. bb_code (inert valid_worlds))))) (block (return (call IRCode (call (. CC (inert InstructionStream)) (call map (-> x (block (. x (inert stmt)))) insts) (call map (-> x (block (. x (inert type)))) insts) (call map (-> x (block (. x (inert info)))) insts) (call map (-> x (block (. x (inert line)))) insts) (call map (-> x (block (. x (inert flag)))) insts)) cfg (call (. CC (inert copy)) (. bb_code (inert linetable))) (call (. CC (inert copy)) (. bb_code (inert argtypes))) (call (. CC (inert copy)) (. bb_code (inert meta))) (call (. CC (inert copy)) (. bb_code (inert sptypes)))))))))) (function (call _lower_switch_statements (:: bb_code BBCode)) (block (= new_blocks (call (curly Vector BBlock) undef 0)) (for (= block (. bb_code (inert blocks))) (block (= t (call terminator block)) (if (call isa t Switch) (block (= bb (call BBlock (. block (inert id)) (ref (. block (inert inst_ids)) (call : 1 (call - end 1))) (ref (. block (inert insts)) (call : 1 (call - end 1))))) (call push! new_blocks bb) (do (call foreach (. t (inert conds)) (. t (inert dests))) (-> (tuple cond dest) (block (= blk (call BBlock (call ID) (vect (call ID)) (vect (call new_inst (call IDGotoIfNot cond dest) Any)))) (call push! new_blocks blk)))) (= fallthrough_inst (call new_inst (call IDGotoNode (. t (inert fallthrough_dest))) Any)) (call push! new_blocks (call BBlock (call ID) (vect (call ID)) (vect fallthrough_inst)))) (block (call push! new_blocks block))))) (return (call BBCode bb_code new_blocks)))) (function (:: (call _ids_to_line_numbers (:: bb_code BBCode)) InstVector) (block (= block_ids (comprehension (generator (. b (inert id)) (= b (. bb_code (inert blocks)))))) (= block_lengths (call map length (. bb_code (inert blocks)))) (= block_start_ssas (. SSAValue (tuple (call vcat 1 (call .+ (ref (call cumsum block_lengths) (call : 1 (call - end 1))) 1))))) (= line_ids (call concatenate_ids bb_code)) (= line_ssas (. SSAValue (tuple (call eachindex line_ids)))) (= id_to_ssa_map (call Dict (call zip (call vcat block_ids line_ids) (call vcat block_start_ssas line_ssas)))) (return (comprehension (generator (call _to_ssas id_to_ssa_map stmt) (= stmt (call concatenate_stmts bb_code))))))) (= (call _to_ssas (:: d Dict) (:: inst NewInstruction)) (block (call NewInstruction (parameters (kw stmt (call _to_ssas d (. inst (inert stmt))))) inst))) (= (call _to_ssas (:: d Dict) (:: x ReturnNode)) (block (if (call isdefined x (inert val)) (call ReturnNode (call get d (. x (inert val)) (. x (inert val)))) x))) (= (call _to_ssas (:: d Dict) (:: x Expr)) (block (call Expr (. x (inert head)) (... (call map (-> a (block (call get d a a))) (. x (inert args))))))) (= (call _to_ssas (:: d Dict) (:: x PiNode)) (block (call PiNode (call get d (. x (inert val)) (. x (inert val))) (call get d (. x (inert typ)) (. x (inert typ)))))) (= (call _to_ssas (:: d Dict) (:: x QuoteNode)) (block x)) (= (call _to_ssas (:: d Dict) x) (block x)) (function (call _to_ssas (:: d Dict) (:: x IDPhiNode)) (block (= new_values (call (curly Vector Any) undef (call length (. x (inert values))))) (for (= n (call eachindex (. x (inert values)))) (block (if (call isassigned (. x (inert values)) n) (block (= (ref new_values n) (call get d (ref (. x (inert values)) n) (ref (. x (inert values)) n))))))) (return (call PhiNode (call map (-> e (block (call Int32 (. (call getindex d e) (inert id))))) (. x (inert edges))) new_values)))) (= (call _to_ssas (:: d Dict) (:: x IDGotoNode)) (block (call GotoNode (. (ref d (. x (inert label))) (inert id))))) (= (call _to_ssas (:: d Dict) (:: x IDGotoIfNot)) (block (call GotoIfNot (call get d (. x (inert cond)) (. x (inert cond))) (. (ref d (. x (inert dest))) (inert id))))) (function (call _remove_double_edges (:: ir BBCode)) (block (= new_blks (do (call map (call enumerate (. ir (inert blocks)))) (-> (tuple (tuple n blk)) (block (= t (call terminator blk)) (if (&& (call isa t IDGotoIfNot) (call == (. t (inert dest)) (. (ref (. ir (inert blocks)) (call + n 1)) (inert id)))) (block (= new_insts (call vcat (ref (. blk (inert insts)) (call : 1 (call - end 1))) (call NewInstruction (parameters (kw stmt (call IDGotoNode (. t (inert dest))))) t))) (return (call BBlock (. blk (inert id)) (. blk (inert inst_ids)) new_insts))) (block (return blk))))))) (return (call BBCode ir new_blks)))) (function (:: (call characterise_unique_predecessor_blocks (:: blks (curly Vector BBlock))) (curly Tuple (curly Dict ID Bool) (curly Dict ID Bool))) (block (= blk_ids (typed_comprehension ID (generator (. b (inert id)) (= b blks)))) (= preds (call _compute_all_predecessors blks)) (= succs (call _compute_all_successors blks)) (= is_unique_pred (call (curly Dict ID Bool))) (for (= id blk_ids) (block (= ss (ref succs id)) (= (ref is_unique_pred id) (&& (call ! (call isempty ss)) (call all (-> s (block (call == (call length (ref preds s)) 1))) ss))))) (= reachable_return_blocks (do (call filter blks) (-> (tuple blk) (block (call is_reachable_return_node (call terminator blk)))))) (if (call == (call length reachable_return_blocks) 1) (block (= (ref is_unique_pred (. (call only reachable_return_blocks) (inert id))) true))) (= pred_is_unique_pred (call (curly Dict ID Bool))) (for (= id blk_ids) (block (= (ref pred_is_unique_pred id) (&& (call == (call length (ref preds id)) 1) (ref is_unique_pred (call only (ref preds id))))))) (= entry_id (ref blk_ids 1)) (= (ref pred_is_unique_pred entry_id) (call isempty (ref preds entry_id))) (return (tuple is_unique_pred pred_is_unique_pred)))) (= (call is_reachable_return_node (:: x ReturnNode)) (block (call isdefined x (inert val)))) (= (call is_reachable_return_node x) (block false)) (function (:: (call characterise_used_ids (:: stmts (curly Vector IDInstPair))) (curly Dict ID Bool)) (block (= ids (. first (tuple stmts))) (= insts (. last (tuple stmts))) (= is_used (call (curly Dict ID Bool) (call zip ids (call fill false (call length ids))))) (for (= inst insts) (block (call _find_id_uses! is_used (. inst (inert stmt))))) (return is_used))) (function (call _find_id_uses! (:: d (curly Dict ID Bool)) (:: x Expr)) (block (for (= arg (. x (inert args))) (block (&& (call in arg (call keys d)) (call setindex! d true arg)))))) (function (call _find_id_uses! (:: d (curly Dict ID Bool)) (:: x IDGotoIfNot)) (block (return (&& (call in (. x (inert cond)) (call keys d)) (call setindex! d true (. x (inert cond))))))) (= (call _find_id_uses! (:: (curly Dict ID Bool)) (:: IDGotoNode)) (block nothing)) (function (call _find_id_uses! (:: d (curly Dict ID Bool)) (:: x PiNode)) (block (return (&& (call in (. x (inert val)) (call keys d)) (call setindex! d true (. x (inert val))))))) (function (call _find_id_uses! (:: d (curly Dict ID Bool)) (:: x IDPhiNode)) (block (= v (. x (inert values))) (for (= n (call eachindex v)) (block (&& (call isassigned v n) (&& (call in (ref v n) (call keys d)) (call setindex! d true (ref v n)))))))) (function (call _find_id_uses! (:: d (curly Dict ID Bool)) (:: x ReturnNode)) (block (return (&& (call isdefined x (inert val)) (&& (call in (. x (inert val)) (call keys d)) (call setindex! d true (. x (inert val)))))))) (= (call _find_id_uses! (:: d (curly Dict ID Bool)) (:: x QuoteNode)) (block nothing)) (= (call _find_id_uses! (:: d (curly Dict ID Bool)) x) (block nothing)) (= (call _id_str (:: id ID)) (block (call string "%" (. id (inert id))))) (= (call _block_str (:: id ID)) (block (call string "#" (. id (inert id))))) (= (call _val_str (:: x ID)) (block (call _id_str x))) (= (call _val_str (:: x Argument)) (block (call string "_" (. x (inert n))))) (= (call _val_str (:: x QuoteNode)) (block (call repr x))) (= (call _val_str (:: x GlobalRef)) (block (call string x))) (= (call _val_str (:: x Nothing)) (block "nothing")) (= (call _val_str x) (block (call repr x))) (function (call (. Base (inert show)) (:: io IO) (:: id ID)) (block (return (call print io (call _id_str id))))) (function (call (. Base (inert show)) (:: io IO) (:: node IDPhiNode)) (block (call print io "φ (") (for (= (tuple i edge) (call enumerate (. node (inert edges)))) (block (call print io (call _block_str edge) " => ") (if (call isassigned (. node (inert values)) i) (block (call print io (call _val_str (ref (. node (inert values)) i)))) (block (call print io "#undef"))) (&& (call < i (call length (. node (inert edges)))) (call print io ", ")))) (return (call print io ")")))) (function (call (. Base (inert show)) (:: io IO) (:: node IDGotoNode)) (block (return (call print io "goto " (call _block_str (. node (inert label))))))) (function (call (. Base (inert show)) (:: io IO) (:: node IDGotoIfNot)) (block (return (call print io "goto " (call _block_str (. node (inert dest))) " if not " (call _val_str (. node (inert cond))))))) (function (call (. Base (inert show)) (:: io IO) (:: sw Switch)) (block (call print io "switch ") (for (= (tuple i (tuple cond dest)) (call enumerate (call zip (. sw (inert conds)) (. sw (inert dests))))) (block (call print io (call _val_str cond) " => " (call _block_str dest)) (&& (call < i (call length (. sw (inert conds)))) (call print io ", ")))) (return (call print io ", fallthrough " (call _block_str (. sw (inert fallthrough_dest))))))) (function (call _stmt_str stmt) (block (&& (call isa stmt (curly Union IDPhiNode IDGotoNode IDGotoIfNot Switch)) (return (call sprint show stmt))) (&& (call isa stmt ReturnNode) (return (if (call isdefined stmt (inert val)) (call string "return " (call _val_str (. stmt (inert val)))) "unreachable"))) (&& (call isa stmt Expr) (return (call _expr_str stmt))) (&& (call isa stmt PiNode) (return (call string "π (" (call _val_str (. stmt (inert val))) ", " (. stmt (inert typ)) ")"))) (return (call _val_str stmt)))) (function (call _expr_str (:: x Expr)) (block (if (call === (. x (inert head)) (inert call)) (block (= f (call _val_str (ref (. x (inert args)) 1))) (= args (call join (generator (call _val_str a) (= a (ref (. x (inert args)) (call : 2 end)))) ", ")) (return (call string f "(" args ")")))) (= args (call join (generator (call _val_str a) (= a (. x (inert args)))) ", ")) (return (call string "Expr(:" (. x (inert head)) ", " args ")")))) (function (call _type_str (macrocall @nospecialize :(#= /home/pkgeval/.julia/packages/Libtask/MQIAO/src/bbcode.jl:679 =#) t)) (block (&& (call === t Any) (return "")) (&& (call === t (curly Union)) (return "::Union{}")) (return (call string "::" t)))) (= (call _is_terminator_stmt stmt) (block (|| (call isa stmt Terminator) (call isa stmt ReturnNode)))) (function (call (. Base (inert show)) (:: io IO) (:: bb BBlock)) (block (call print io (call _block_str (. bb (inert id))) " ─") (= n (call length (. bb (inert insts)))) (for (= (tuple i (tuple id inst)) (call enumerate (call zip (. bb (inert inst_ids)) (. bb (inert insts))))) (block (call println io) (= prefix (if (call < i n) "│ " "└──")) (= stmt (. inst (inert stmt))) (if (&& (call _is_terminator_stmt stmt) (call == i n)) (block (call print io prefix " " (call _stmt_str stmt))) (block (call print io prefix " " (call _id_str id) " = " (call _stmt_str stmt) (call _type_str (. inst (inert type)))))))))) (function (call (. Base (inert show)) (:: io IO) (:: ir BBCode)) (block (call println io "BBCode (" (call length (. ir (inert argtypes))) " args, " (call length (. ir (inert blocks))) " blocks)") (for (= (tuple i block) (call enumerate (. ir (inert blocks)))) (block (call show io block) (&& (call < i (call length (. ir (inert blocks)))) (call println io)))))) (function (call (. Base (inert show)) (:: io IO) (:: (macrocall @MIME_str :(#= /home/pkgeval/.julia/packages/Libtask/MQIAO/src/bbcode.jl:712 =#) "text/plain")) (:: ir BBCode)) (block (return (call show io ir)))))))  └─ @ /home/pkgeval/.julia/packages/Libtask/MQIAO/src/bbcode.jl:1  Stacktrace:  [1] expand_forms_2(ctx::Base.JuliaLowering.MacroExpansionContext{Dict{Symbol, Dict{Int64, Any}}}, ex::Base.JuliaSyntax.SyntaxTree{Dict{Symbol, Dict{Int64, Any}}})  @ Base.JuliaLowering /source/usr/share/julia/JuliaLowering/src/desugaring.jl:4467  [2] lower_step(iter::Base.JuliaLowering.LoweringIterator{Dict{Symbol, Dict{Int64, Any}}}, mod::Module, world::UInt64; soft_scope::Nothing)  @ Base.JuliaLowering /source/usr/share/julia/JuliaLowering/src/eval.jl:90  [3] getindex(A::Vector{Module}, i::Int64)  @ Base /source/usr/share/julia/JuliaLowering/src/eval.jl:45 [inlined]  [4] _eval(mod::Module, iter::Base.JuliaLowering.LoweringIterator{Dict{Symbol, Dict{Int64, Any}}}; soft_scope::Nothing)  @ Base.JuliaLowering /source/usr/share/julia/JuliaLowering/src/eval.jl:479  [5] _eval  @ /source/usr/share/julia/JuliaLowering/src/eval.jl:475 [inlined]  [6] #eval#134  @ /source/usr/share/julia/JuliaLowering/src/eval.jl:467 [inlined]  [7] top-level scope  @ ~/.julia/packages/Libtask/MQIAO/src/bbcode.jl:1  [8] macro expansion  @ ~/.julia/packages/Libtask/MQIAO/src/bbcode.jl:1 [inlined]  [9] include(mapexpr::Function, mod::Module, _path::String)  @ Base ./Base.jl:327  [10] top-level scope  @ ~/.julia/packages/Libtask/MQIAO/src/Libtask.jl:13  [11] include(mod::Module, _path::String)  @ Base ./Base.jl:326  [12] include_package_for_output(pkg::Base.PkgId, input::String, syntax_version::VersionNumber, depot_path::Vector{String}, dl_load_path::Vector{String}, load_path::Vector{String}, concrete_deps::Vector{Pair{Base.PkgId, UInt128}}, source::Nothing)  @ Base ./loading.jl:3271  [13] top-level scope  @ stdin:5  [14] eval(m::Module, e::Any)  @ Core ./boot.jl:517  [15] include_string(mapexpr::typeof(identity), mod::Module, code::String, filename::String)  @ Base ./loading.jl:3113  [16] push!(a::Vector{SubString{String}}, item::String)  @ Base ./loading.jl:3123 [inlined]  [17] exec_options(opts::Base.JLOptions)  @ Base ./client.jl:353  [18] _start()  @ Base ./client.jl:596 in expression starting at /home/pkgeval/.julia/packages/Libtask/MQIAO/src/bbcode.jl:1 in expression starting at /home/pkgeval/.julia/packages/Libtask/MQIAO/src/Libtask.jl:1 in expression starting at stdin:5 ✗ Libtask 1 dependency successfully precompiled in 5 seconds. 8 already precompiled. Precompilation completed after 25.33s ################################################################################ # Loading # Loading Libtask... ERROR: LoadError: LoweringError: #= /home/pkgeval/.julia/packages/Libtask/MQIAO/src/bbcode.jl:46 =# - expected identifier or `identifier::type` Expression:  (meta nospecialize type) Containing expressions:  (function (call new_inst (meta nospecialize stmt) (kw (meta nospecialize type) Any) (kw flag (. CC (inert IR_FLAG_REFINED)))) (block (return (call NewInstruction stmt type (call (. CC (inert NoCallInfo))) (call Int32 1) flag))))  Detailed provenance:  (meta nospecialize type) @#= /source/usr/share/julia/JuliaLowering/src/syntax_macros.jl:27 =#  └─ (meta nospecialize type) @#= /source/usr/share/julia/JuliaLowering/src/syntax_macros.jl:27 =#  ├─ (macrocall @nospecialize :(#= /home/pkgeval/.julia/packages/Libtask/MQIAO/src/bbcode.jl:46 =#) type)  │ └─ (macrocall @nospecialize :(#= /home/pkgeval/.julia/packages/Libtask/MQIAO/src/bbcode.jl:46 =#) type)  │ ├─ @ /home/pkgeval/.julia/packages/Libtask/MQIAO/src/bbcode.jl:46  │ └─ (macrocall @doc :(#= /home/pkgeval/.julia/packages/Libtask/MQIAO/src/bbcode.jl:1 =#) " module BasicBlockCode\n\nCopied over from Mooncake.jl in order to avoid making this package depend on Mooncake.\nRefer to Mooncake's developer docs for context on this file.\n" (module true BasicBlockCode (block (using (: (. Core Compiler) (. ReturnNode) (. PhiNode) (. GotoIfNot) (. GotoNode) (. NewInstruction) (. IRCode) (. SSAValue) (. PiNode) (. Argument))) (const (= CC (. Core (inert Compiler)))) (export ID seed_id! IDPhiNode IDGotoNode IDGotoIfNot Switch BBlock phi_nodes terminator insert_before_terminator! collect_stmts compute_all_predecessors compute_all_successors BBCode characterise_used_ids characterise_unique_predecessor_blocks InstVector IDInstPair __line_numbers_to_block_numbers! is_reachable_return_node new_inst replace_ids) (const (= (:: _id_count (curly Dict Int Int32)) (call (curly Dict Int Int32)))) (function (call new_inst (macrocall @nospecialize :(#= /home/pkgeval/.julia/packages/Libtask/MQIAO/src/bbcode.jl:46 =#) stmt) (kw (macrocall @nospecialize :(#= /home/pkgeval/.julia/packages/Libtask/MQIAO/src/bbcode.jl:46 =#) type) Any) (kw flag (. CC (inert IR_FLAG_REFINED)))) (block (return (call NewInstruction stmt type (call (. CC (inert NoCallInfo))) (call Int32 1) flag)))) (const (= InstVector (curly Vector NewInstruction))) (struct false ID (block (:: id Int32) (function (call ID) (block (= current_thread_id (call (. Threads (inert threadid)))) (= id_count (call get _id_count current_thread_id (call Int32 0))) (= (ref _id_count current_thread_id) (call + id_count (call Int32 1))) (return (call new id_count)))))) (= (call (. Base (inert copy)) (:: id ID)) (block id)) (function (call seed_id!) (block (return (global (= (ref _id_count (call (. Threads (inert threadid)))) 0))))) (struct false IDPhiNode (block (:: edges (curly Vector ID)) (:: values (curly Vector Any)))) (= (call (. Base (inert ==)) (:: x IDPhiNode) (:: y IDPhiNode)) (block (&& (call == (. x (inert edges)) (. y (inert edges))) (call == (. x (inert values)) (. y (inert values)))))) (= (call (. Base (inert copy)) (:: node IDPhiNode)) (block (call IDPhiNode (call copy (. node (inert edges))) (call copy (. node (inert values)))))) (struct false IDGotoNode (block (:: label ID))) (= (call (. Base (inert copy)) (:: node IDGotoNode)) (block (call IDGotoNode (call copy (. node (inert label)))))) (struct false IDGotoIfNot (block (:: cond Any) (:: dest ID))) (= (call (. Base (inert copy)) (:: node IDGotoIfNot)) (block (call IDGotoIfNot (call copy (. node (inert cond))) (call copy (. node (inert dest)))))) (struct false Switch (block (:: conds (curly Vector Any)) (:: dests (curly Vector ID)) (:: fallthrough_dest ID) (function (call Switch (:: conds (curly Vector Any)) (:: dests (curly Vector ID)) (:: fallthrough_dest ID)) (block (macrocall @assert :(#= /home/pkgeval/.julia/packages/Libtask/MQIAO/src/bbcode.jl:95 =#) (call == (call length conds) (call length dests))) (return (call new conds dests fallthrough_dest)))))) (const (= Terminator (curly Union Switch IDGotoIfNot IDGotoNode ReturnNode))) (struct true BBlock (block (:: id ID) (:: inst_ids (curly Vector ID)) (:: insts InstVector) (function (call BBlock (:: id ID) (:: inst_ids (curly Vector ID)) (:: insts InstVector)) (block (macrocall @assert :(#= /home/pkgeval/.julia/packages/Libtask/MQIAO/src/bbcode.jl:107 =#) (call == (call length inst_ids) (call length insts))) (return (call new id inst_ids insts)))))) (const (= IDInstPair (curly Tuple ID NewInstruction))) (function (call BBlock (:: id ID) (:: inst_pairs (curly Vector IDInstPair))) (block (return (call BBlock id (. first (tuple inst_pairs)) (. last (tuple inst_pairs)))))) (= (call (. Base (inert length)) (:: bb BBlock)) (block (call length (. bb (inert inst_ids))))) (= (call (. Base (inert copy)) (:: bb BBlock)) (block (call BBlock (. bb (inert id)) (call copy (. bb (inert inst_ids))) (call copy (. bb (inert insts)))))) (function (call phi_nodes (:: bb BBlock)) (block (= n_phi_nodes (call findlast (-> x (block (call isa (. x (inert stmt)) IDPhiNode))) (. bb (inert insts)))) (if (call === n_phi_nodes nothing) (block (= n_phi_nodes 0))) (return (tuple (ref (. bb (inert inst_ids)) (call : 1 n_phi_nodes)) (ref (. bb (inert insts)) (call : 1 n_phi_nodes)))))) (function (:: (call (. Base (inert insert!)) (:: bb BBlock) (:: n Int) (:: id ID) (:: inst NewInstruction)) Nothing) (block (call insert! (. bb (inert inst_ids)) n id) (call insert! (. bb (inert insts)) n inst) (return nothing))) (= (call terminator (:: bb BBlock)) (block (if (call isa (. (ref (. bb (inert insts)) end) (inert stmt)) Terminator) (. (ref (. bb (inert insts)) end) (inert stmt)) nothing))) (function (:: (call insert_before_terminator! (:: bb BBlock) (:: id ID) (:: inst NewInstruction)) Nothing) (block (call insert! bb (call + (call length (. bb (inert insts))) (if (call === (call terminator bb) nothing) 1 0)) id inst) (return nothing))) (= (:: (call collect_stmts (:: bb BBlock)) (curly Vector IDInstPair)) (block (call collect (call zip (. bb (inert inst_ids)) (. bb (inert insts)))))) (macrocall @static :(#= /home/pkgeval/.julia/packages/Libtask/MQIAO/src/bbcode.jl:145 =#) (if (call >= VERSION (macrocall @v_str :(#= /home/pkgeval/.julia/packages/Libtask/MQIAO/src/bbcode.jl:145 =#) "1.12-")) (block (struct false BBCode (block (:: blocks (curly Vector BBlock)) (:: argtypes (curly Vector Any)) (:: sptypes (curly Vector (. CC (inert VarState)))) (:: debuginfo (. CC (inert DebugInfoStream))) (:: meta (curly Vector Expr)) (:: valid_worlds (. CC (inert WorldRange))))) (function (call BBCode (:: ir (curly Union IRCode BBCode)) (:: new_blocks (curly Vector BBlock))) (block (return (call BBCode new_blocks (call (. CC (inert copy)) (. ir (inert argtypes))) (call (. CC (inert copy)) (. ir (inert sptypes))) (call (. CC (inert copy)) (. ir (inert debuginfo))) (call (. CC (inert copy)) (. ir (inert meta))) (. ir (inert valid_worlds))))))) (block (struct false BBCode (block (:: blocks (curly Vector BBlock)) (:: argtypes (curly Vector Any)) (:: sptypes (curly Vector (. CC (inert VarState)))) (:: linetable (curly Vector (. Core (inert LineInfoNode)))) (:: meta (curly Vector Expr)))) (function (call BBCode (:: ir (curly Union IRCode BBCode)) (:: new_blocks (curly Vector BBlock))) (block (return (call BBCode new_blocks (call (. CC (inert copy)) (. ir (inert argtypes))) (call (. CC (inert copy)) (. ir (inert sptypes))) (call (. CC (inert copy)) (. ir (inert linetable))) (call (. CC (inert copy)) (. ir (inert meta)))))))))) (= (call (. Base (inert copy)) (:: ir BBCode)) (block (call BBCode ir (call copy (. ir (inert blocks)))))) (= (:: (call compute_all_successors (:: ir BBCode)) (curly Dict ID (curly Vector ID))) (block (call _compute_all_successors (. ir (inert blocks))))) (macrocall @noinline :(#= /home/pkgeval/.julia/packages/Libtask/MQIAO/src/bbcode.jl:190 =#) (function (:: (call _compute_all_successors (:: blks (curly Vector BBlock))) (curly Dict ID (curly Vector ID))) (block (= succs (do (call map (call enumerate blks)) (-> (tuple (tuple n blk)) (block (= is_final_block (call == n (call length blks))) (= t (call terminator blk)) (if (call === t nothing) (block (return (if is_final_block (ref ID) (ref ID (. (ref blks (call + n 1)) (inert id)))))) (elseif (block (call isa t IDGotoNode)) (block (return (vect (. t (inert label))))) (elseif (block (call isa t IDGotoIfNot)) (block (return (if is_final_block (ref ID (. t (inert dest))) (ref ID (. t (inert dest)) (. (ref blks (call + n 1)) (inert id)))))) (elseif (block (call isa t ReturnNode)) (block (return (ref ID))) (elseif (block (call isa t Switch)) (block (return (call vcat (. t (inert dests)) (. t (inert fallthrough_dest))))) (block (call error (string "Unhandled terminator " t)))))))))))) (return (call (curly Dict ID (curly Vector ID)) (generator (tuple (. b (inert id)) succ) (= (tuple b succ) (call zip blks succs)))))))) (function (:: (call compute_all_predecessors (:: ir BBCode)) (curly Dict ID (curly Vector ID))) (block (return (call _compute_all_predecessors (. ir (inert blocks)))))) (function (:: (call _compute_all_predecessors (:: blks (curly Vector BBlock))) (curly Dict ID (curly Vector ID))) (block (= successor_map (call _compute_all_successors blks)) (= ks (call collect (call keys successor_map))) (= predecessor_map (call (curly Dict ID (curly Vector ID)) (call zip ks (call map (-> _ (block (ref ID))) ks)))) (for (= (tuple k succs) successor_map) (block (for (= succ succs) (block (call push! (ref predecessor_map succ) k))))) (return predecessor_map))) (= (:: (call collect_stmts (:: ir BBCode)) (curly Vector IDInstPair)) (block (call reduce vcat (call map collect_stmts (. ir (inert blocks)))))) (function (call id_to_line_map (:: ir BBCode)) (block (= lines (call collect_stmts ir)) (= lines_and_line_numbers (call collect (call zip lines (call eachindex lines)))) (= ids_and_line_numbers (call map (-> x (block (tuple (ref (ref x 1) 1) (ref x 2)))) lines_and_line_numbers)) (return (call Dict ids_and_line_numbers)))) (= (call concatenate_ids (:: bb_code BBCode)) (block (call reduce vcat (call map (-> b (block (. b (inert inst_ids)))) (. bb_code (inert blocks)))))) (= (call concatenate_stmts (:: bb_code BBCode)) (block (call reduce vcat (call map (-> b (block (. b (inert insts)))) (. bb_code (inert blocks)))))) (= (:: (call control_flow_graph (:: bb_code BBCode)) (. (. Core (inert Compiler)) (inert CFG))) (block (call _control_flow_graph (. bb_code (inert blocks))))) (function (:: (call _control_flow_graph (:: blks (curly Vector BBlock))) (. (. Core (inert Compiler)) (inert CFG))) (block (= preds_ids (call _compute_all_predecessors blks)) (= succs_ids (call _compute_all_successors blks)) (= block_ids (call map (-> b (block (. b (inert id)))) blks)) (= id_to_num (call (curly Dict ID Int) (call zip block_ids (call collect (call eachindex block_ids))))) (= preds (call map (-> id (block (call sort (call map (-> p (block (ref id_to_num p))) (ref preds_ids id))))) block_ids)) (= succs (call map (-> id (block (call sort (call map (-> s (block (ref id_to_num s))) (ref succs_ids id))))) block_ids)) (macrocall @static :(#= /home/pkgeval/.julia/packages/Libtask/MQIAO/src/bbcode.jl:261 =#) (if (call >= VERSION (macrocall @v_str :(#= /home/pkgeval/.julia/packages/Libtask/MQIAO/src/bbcode.jl:261 =#) "1.11.6")) (block (call push! (ref preds 1) 0)))) (= index (call .+ (call vcat 0 (call cumsum (call map length blks))) 1)) (= basic_blocks (do (call map (call eachindex blks)) (-> (tuple n) (block (= stmt_range (call (. (. Core (inert Compiler)) (inert StmtRange)) (ref index n) (call - (ref index (call + n 1)) 1))) (return (call (. (. Core (inert Compiler)) (inert BasicBlock)) stmt_range (ref preds n) (ref succs n))))))) (return (call (. (. Core (inert Compiler)) (inert CFG)) basic_blocks (ref index (call : 2 (call - end 1))))))) (function (:: (call _lines_to_blocks (:: insts InstVector) (:: cfg (. CC (inert CFG)))) InstVector) (block (= stmts (call __line_numbers_to_block_numbers! (typed_comprehension Any (generator (. x (inert stmt)) (= x insts))) cfg)) (return (call map (-> (tuple inst stmt) (block (call NewInstruction (parameters stmt) inst))) insts stmts)))) (function (call __line_numbers_to_block_numbers! (:: insts (curly Vector Any)) (:: cfg (. CC (inert CFG)))) (block (for (= i (call eachindex insts)) (block (= stmt (ref insts i)) (if (call isa stmt GotoNode) (block (= (ref insts i) (call GotoNode (call (. CC (inert block_for_inst)) cfg (. stmt (inert label)))))) (elseif (block (call isa stmt GotoIfNot)) (block (= (ref insts i) (call GotoIfNot (. stmt (inert cond)) (call (. CC (inert block_for_inst)) cfg (. stmt (inert dest)))))) (elseif (block (call isa stmt PhiNode)) (block (= (ref insts i) (call PhiNode (typed_comprehension Int32 (generator (call (. CC (inert block_for_inst)) cfg (call Int edge)) (= edge (. stmt (inert edges))))) (. stmt (inert values))))) (elseif (block (call (. Meta (inert isexpr)) stmt (inert enter))) (block (= (ref (. stmt (inert args)) 1) (call (. CC (inert block_for_inst)) cfg (:: (ref (. stmt (inert args)) 1) Int))) (= (ref insts i) stmt)))))))) (return insts))) (function (call BBCode (:: ir IRCode)) (block (= insts (call new_inst_vec (. ir (inert stmts)))) (= (tuple ssa_ids stmts) (call _ssas_to_ids insts)) (= (tuple block_ids stmts) (call _block_nums_to_ids stmts (. ir (inert cfg)))) (= blocks (do (call map (call zip (. (. ir (inert cfg)) (inert blocks)) block_ids)) (-> (tuple (tuple bb id)) (block (return (call BBlock id (ref ssa_ids (. bb (inert stmts))) (ref stmts (. bb (inert stmts))))))))) (return (call BBCode ir blocks)))) (function (call new_inst_vec (:: x (. CC (inert InstructionStream)))) (block (= stmt (macrocall @static :(#= /home/pkgeval/.julia/packages/Libtask/MQIAO/src/bbcode.jl:317 =#) (if (call < VERSION (macrocall @v_str :(#= /home/pkgeval/.julia/packages/Libtask/MQIAO/src/bbcode.jl:317 =#) "1.11.0-rc4")) (. x (inert inst)) (. x (inert stmt))))) (return (call map (-> (tuple (... v)) (block (call NewInstruction (... v)))) stmt (. x (inert type)) (. x (inert info)) (. x (inert line)) (. x (inert flag)))))) (const (= SSAToIdDict (curly Dict SSAValue ID))) (const (= BlockNumToIdDict (curly Dict Integer ID))) (function (:: (call _ssas_to_ids (:: insts InstVector)) (curly Tuple (curly Vector ID) InstVector)) (block (= ids (call map (-> _ (block (call ID))) insts)) (= val_id_map (call SSAToIdDict (call zip (. SSAValue (tuple (call eachindex insts))) ids))) (return (tuple ids (call map (call (. Base (inert Fix1)) _ssa_to_ids val_id_map) insts))))) (function (call _ssa_to_ids (:: d SSAToIdDict) (:: inst NewInstruction)) (block (return (call NewInstruction (parameters (kw stmt (call _ssa_to_ids d (. inst (inert stmt))))) inst)))) (function (call _ssa_to_ids (:: d SSAToIdDict) (:: x ReturnNode)) (block (return (if (call isdefined x (inert val)) (call ReturnNode (call get d (. x (inert val)) (. x (inert val)))) x)))) (= (call _ssa_to_ids (:: d SSAToIdDict) (:: x Expr)) (block (call Expr (. x (inert head)) (... (call map (-> a (block (call get d a a))) (. x (inert args))))))) (= (call _ssa_to_ids (:: d SSAToIdDict) (:: x PiNode)) (block (call PiNode (call get d (. x (inert val)) (. x (inert val))) (call get d (. x (inert typ)) (. x (inert typ)))))) (= (call _ssa_to_ids (:: d SSAToIdDict) (:: x QuoteNode)) (block x)) (= (call _ssa_to_ids (:: d SSAToIdDict) x) (block x)) (function (call _ssa_to_ids (:: d SSAToIdDict) (:: x PhiNode)) (block (= new_values (call (curly Vector Any) undef (call length (. x (inert values))))) (for (= n (call eachindex (. x (inert values)))) (block (if (call isassigned (. x (inert values)) n) (block (= (ref new_values n) (call get d (ref (. x (inert values)) n) (ref (. x (inert values)) n))))))) (return (call PhiNode (. x (inert edges)) new_values)))) (= (call _ssa_to_ids (:: d SSAToIdDict) (:: x GotoNode)) (block x)) (= (call _ssa_to_ids (:: d SSAToIdDict) (:: x GotoIfNot)) (block (call GotoIfNot (call get d (. x (inert cond)) (. x (inert cond))) (. x (inert dest))))) (function (:: (call _block_nums_to_ids (:: insts InstVector) (:: cfg (. CC (inert CFG)))) (curly Tuple (curly Vector ID) InstVector)) (block (= ids (call map (-> _ (block (call ID))) (. cfg (inert blocks)))) (= block_num_id_map (call BlockNumToIdDict (call zip (call eachindex (. cfg (inert blocks))) ids))) (return (tuple ids (call map (call (. Base (inert Fix1)) _block_num_to_ids block_num_id_map) insts))))) (function (call _block_num_to_ids (:: d BlockNumToIdDict) (:: x NewInstruction)) (block (return (call NewInstruction (parameters (kw stmt (call _block_num_to_ids d (. x (inert stmt))))) x)))) (function (call _block_num_to_ids (:: d BlockNumToIdDict) (:: x PhiNode)) (block (return (call IDPhiNode (typed_comprehension ID (generator (ref d e) (= e (. x (inert edges))))) (. x (inert values)))))) (= (call _block_num_to_ids (:: d BlockNumToIdDict) (:: x GotoNode)) (block (call IDGotoNode (ref d (. x (inert label)))))) (= (call _block_num_to_ids (:: d BlockNumToIdDict) (:: x GotoIfNot)) (block (call IDGotoIfNot (. x (inert cond)) (ref d (. x (inert dest)))))) (= (call _block_num_to_ids (:: d BlockNumToIdDict) x) (block x)) (const (= IdToIdDict (curly Dict ID ID))) (function (call replace_ids (:: d IdToIdDict) (:: inst NewInstruction)) (block (return (call NewInstruction (parameters (kw stmt (call replace_ids d (. inst (inert stmt))))) inst)))) (= (call replace_ids (:: d IdToIdDict) (:: x ID)) (block (call get d x x))) (function (call replace_ids (:: d IdToIdDict) (:: x ReturnNode)) (block (return (if (call isdefined x (inert val)) (call ReturnNode (call get d (. x (inert val)) (. x (inert val)))) x)))) (= (call replace_ids (:: d IdToIdDict) (:: x Expr)) (block (call Expr (. x (inert head)) (... (call map (-> a (block (call get d a a))) (. x (inert args))))))) (= (call replace_ids (:: d IdToIdDict) (:: x PiNode)) (block (call PiNode (call get d (. x (inert val)) (. x (inert val))) (call get d (. x (inert typ)) (. x (inert typ)))))) (= (call replace_ids (:: d IdToIdDict) (:: x QuoteNode)) (block x)) (= (call replace_ids (:: d IdToIdDict) x) (block x)) (function (call replace_ids (:: d IdToIdDict) (:: x IDPhiNode)) (block (= new_ids (comprehension (generator (call get d e e) (= e (. x (inert edges)))))) (= new_values (call (curly Vector Any) undef (call length (. x (inert values))))) (for (= n (call eachindex (. x (inert values)))) (block (if (call isassigned (. x (inert values)) n) (block (= (ref new_values n) (call get d (ref (. x (inert values)) n) (ref (. x (inert values)) n))))))) (return (call IDPhiNode new_ids new_values)))) (= (call replace_ids (:: d IdToIdDict) (:: x IDGotoNode)) (block x)) (function (call replace_ids (:: d IdToIdDict) (:: x IDGotoIfNot)) (block (return (call IDGotoIfNot (call get d (. x (inert cond)) (. x (inert cond))) (call get d (. x (inert dest)) (. x (inert dest))))))) (function (call replace_ids (:: d IdToIdDict) (:: x Switch)) (block (= new_conds (call (curly Vector Any) undef (call length (. x (inert conds))))) (for (= n (call eachindex (. x (inert conds)))) (block (if (call isassigned (. x (inert conds)) n) (block (= (ref new_conds n) (call get d (ref (. x (inert conds)) n) (ref (. x (inert conds)) n))))))) (= new_dests (comprehension (generator (call get d dest dest) (= dest (. x (inert dests)))))) (= new_fallthrough_dest (call get d (. x (inert fallthrough_dest)) (. x (inert fallthrough_dest)))) (return (call Switch new_conds new_dests new_fallthrough_dest)))) (function (call (. CC (inert IRCode)) (:: bb_code BBCode)) (block (= bb_code (call _lower_switch_statements bb_code)) (= bb_code (call _remove_double_edges bb_code)) (= insts (call _ids_to_line_numbers bb_code)) (= cfg (call control_flow_graph bb_code)) (= insts (call _lines_to_blocks insts cfg)) (macrocall @static :(#= /home/pkgeval/.julia/packages/Libtask/MQIAO/src/bbcode.jl:418 =#) (if (call >= VERSION (macrocall @v_str :(#= /home/pkgeval/.julia/packages/Libtask/MQIAO/src/bbcode.jl:418 =#) "1.12-")) (block (= lines (call map (-> x (block (. x (inert line)))) insts)) (= lines (call collect (call (. Iterators (inert flatten)) lines))) (return (call IRCode (call (. CC (inert InstructionStream)) (call map (-> x (block (. x (inert stmt)))) insts) (call collect Any (call map (-> x (block (. x (inert type)))) insts)) (call collect (. CC (inert CallInfo)) (call map (-> x (block (. x (inert info)))) insts)) lines (call map (-> x (block (. x (inert flag)))) insts)) cfg (call (. CC (inert copy)) (. bb_code (inert debuginfo))) (call (. CC (inert copy)) (. bb_code (inert argtypes))) (call (. CC (inert copy)) (. bb_code (inert meta))) (call (. CC (inert copy)) (. bb_code (inert sptypes))) (. bb_code (inert valid_worlds))))) (block (return (call IRCode (call (. CC (inert InstructionStream)) (call map (-> x (block (. x (inert stmt)))) insts) (call map (-> x (block (. x (inert type)))) insts) (call map (-> x (block (. x (inert info)))) insts) (call map (-> x (block (. x (inert line)))) insts) (call map (-> x (block (. x (inert flag)))) insts)) cfg (call (. CC (inert copy)) (. bb_code (inert linetable))) (call (. CC (inert copy)) (. bb_code (inert argtypes))) (call (. CC (inert copy)) (. bb_code (inert meta))) (call (. CC (inert copy)) (. bb_code (inert sptypes)))))))))) (function (call _lower_switch_statements (:: bb_code BBCode)) (block (= new_blocks (call (curly Vector BBlock) undef 0)) (for (= block (. bb_code (inert blocks))) (block (= t (call terminator block)) (if (call isa t Switch) (block (= bb (call BBlock (. block (inert id)) (ref (. block (inert inst_ids)) (call : 1 (call - end 1))) (ref (. block (inert insts)) (call : 1 (call - end 1))))) (call push! new_blocks bb) (do (call foreach (. t (inert conds)) (. t (inert dests))) (-> (tuple cond dest) (block (= blk (call BBlock (call ID) (vect (call ID)) (vect (call new_inst (call IDGotoIfNot cond dest) Any)))) (call push! new_blocks blk)))) (= fallthrough_inst (call new_inst (call IDGotoNode (. t (inert fallthrough_dest))) Any)) (call push! new_blocks (call BBlock (call ID) (vect (call ID)) (vect fallthrough_inst)))) (block (call push! new_blocks block))))) (return (call BBCode bb_code new_blocks)))) (function (:: (call _ids_to_line_numbers (:: bb_code BBCode)) InstVector) (block (= block_ids (comprehension (generator (. b (inert id)) (= b (. bb_code (inert blocks)))))) (= block_lengths (call map length (. bb_code (inert blocks)))) (= block_start_ssas (. SSAValue (tuple (call vcat 1 (call .+ (ref (call cumsum block_lengths) (call : 1 (call - end 1))) 1))))) (= line_ids (call concatenate_ids bb_code)) (= line_ssas (. SSAValue (tuple (call eachindex line_ids)))) (= id_to_ssa_map (call Dict (call zip (call vcat block_ids line_ids) (call vcat block_start_ssas line_ssas)))) (return (comprehension (generator (call _to_ssas id_to_ssa_map stmt) (= stmt (call concatenate_stmts bb_code))))))) (= (call _to_ssas (:: d Dict) (:: inst NewInstruction)) (block (call NewInstruction (parameters (kw stmt (call _to_ssas d (. inst (inert stmt))))) inst))) (= (call _to_ssas (:: d Dict) (:: x ReturnNode)) (block (if (call isdefined x (inert val)) (call ReturnNode (call get d (. x (inert val)) (. x (inert val)))) x))) (= (call _to_ssas (:: d Dict) (:: x Expr)) (block (call Expr (. x (inert head)) (... (call map (-> a (block (call get d a a))) (. x (inert args))))))) (= (call _to_ssas (:: d Dict) (:: x PiNode)) (block (call PiNode (call get d (. x (inert val)) (. x (inert val))) (call get d (. x (inert typ)) (. x (inert typ)))))) (= (call _to_ssas (:: d Dict) (:: x QuoteNode)) (block x)) (= (call _to_ssas (:: d Dict) x) (block x)) (function (call _to_ssas (:: d Dict) (:: x IDPhiNode)) (block (= new_values (call (curly Vector Any) undef (call length (. x (inert values))))) (for (= n (call eachindex (. x (inert values)))) (block (if (call isassigned (. x (inert values)) n) (block (= (ref new_values n) (call get d (ref (. x (inert values)) n) (ref (. x (inert values)) n))))))) (return (call PhiNode (call map (-> e (block (call Int32 (. (call getindex d e) (inert id))))) (. x (inert edges))) new_values)))) (= (call _to_ssas (:: d Dict) (:: x IDGotoNode)) (block (call GotoNode (. (ref d (. x (inert label))) (inert id))))) (= (call _to_ssas (:: d Dict) (:: x IDGotoIfNot)) (block (call GotoIfNot (call get d (. x (inert cond)) (. x (inert cond))) (. (ref d (. x (inert dest))) (inert id))))) (function (call _remove_double_edges (:: ir BBCode)) (block (= new_blks (do (call map (call enumerate (. ir (inert blocks)))) (-> (tuple (tuple n blk)) (block (= t (call terminator blk)) (if (&& (call isa t IDGotoIfNot) (call == (. t (inert dest)) (. (ref (. ir (inert blocks)) (call + n 1)) (inert id)))) (block (= new_insts (call vcat (ref (. blk (inert insts)) (call : 1 (call - end 1))) (call NewInstruction (parameters (kw stmt (call IDGotoNode (. t (inert dest))))) t))) (return (call BBlock (. blk (inert id)) (. blk (inert inst_ids)) new_insts))) (block (return blk))))))) (return (call BBCode ir new_blks)))) (function (:: (call characterise_unique_predecessor_blocks (:: blks (curly Vector BBlock))) (curly Tuple (curly Dict ID Bool) (curly Dict ID Bool))) (block (= blk_ids (typed_comprehension ID (generator (. b (inert id)) (= b blks)))) (= preds (call _compute_all_predecessors blks)) (= succs (call _compute_all_successors blks)) (= is_unique_pred (call (curly Dict ID Bool))) (for (= id blk_ids) (block (= ss (ref succs id)) (= (ref is_unique_pred id) (&& (call ! (call isempty ss)) (call all (-> s (block (call == (call length (ref preds s)) 1))) ss))))) (= reachable_return_blocks (do (call filter blks) (-> (tuple blk) (block (call is_reachable_return_node (call terminator blk)))))) (if (call == (call length reachable_return_blocks) 1) (block (= (ref is_unique_pred (. (call only reachable_return_blocks) (inert id))) true))) (= pred_is_unique_pred (call (curly Dict ID Bool))) (for (= id blk_ids) (block (= (ref pred_is_unique_pred id) (&& (call == (call length (ref preds id)) 1) (ref is_unique_pred (call only (ref preds id))))))) (= entry_id (ref blk_ids 1)) (= (ref pred_is_unique_pred entry_id) (call isempty (ref preds entry_id))) (return (tuple is_unique_pred pred_is_unique_pred)))) (= (call is_reachable_return_node (:: x ReturnNode)) (block (call isdefined x (inert val)))) (= (call is_reachable_return_node x) (block false)) (function (:: (call characterise_used_ids (:: stmts (curly Vector IDInstPair))) (curly Dict ID Bool)) (block (= ids (. first (tuple stmts))) (= insts (. last (tuple stmts))) (= is_used (call (curly Dict ID Bool) (call zip ids (call fill false (call length ids))))) (for (= inst insts) (block (call _find_id_uses! is_used (. inst (inert stmt))))) (return is_used))) (function (call _find_id_uses! (:: d (curly Dict ID Bool)) (:: x Expr)) (block (for (= arg (. x (inert args))) (block (&& (call in arg (call keys d)) (call setindex! d true arg)))))) (function (call _find_id_uses! (:: d (curly Dict ID Bool)) (:: x IDGotoIfNot)) (block (return (&& (call in (. x (inert cond)) (call keys d)) (call setindex! d true (. x (inert cond))))))) (= (call _find_id_uses! (:: (curly Dict ID Bool)) (:: IDGotoNode)) (block nothing)) (function (call _find_id_uses! (:: d (curly Dict ID Bool)) (:: x PiNode)) (block (return (&& (call in (. x (inert val)) (call keys d)) (call setindex! d true (. x (inert val))))))) (function (call _find_id_uses! (:: d (curly Dict ID Bool)) (:: x IDPhiNode)) (block (= v (. x (inert values))) (for (= n (call eachindex v)) (block (&& (call isassigned v n) (&& (call in (ref v n) (call keys d)) (call setindex! d true (ref v n)))))))) (function (call _find_id_uses! (:: d (curly Dict ID Bool)) (:: x ReturnNode)) (block (return (&& (call isdefined x (inert val)) (&& (call in (. x (inert val)) (call keys d)) (call setindex! d true (. x (inert val)))))))) (= (call _find_id_uses! (:: d (curly Dict ID Bool)) (:: x QuoteNode)) (block nothing)) (= (call _find_id_uses! (:: d (curly Dict ID Bool)) x) (block nothing)) (= (call _id_str (:: id ID)) (block (call string "%" (. id (inert id))))) (= (call _block_str (:: id ID)) (block (call string "#" (. id (inert id))))) (= (call _val_str (:: x ID)) (block (call _id_str x))) (= (call _val_str (:: x Argument)) (block (call string "_" (. x (inert n))))) (= (call _val_str (:: x QuoteNode)) (block (call repr x))) (= (call _val_str (:: x GlobalRef)) (block (call string x))) (= (call _val_str (:: x Nothing)) (block "nothing")) (= (call _val_str x) (block (call repr x))) (function (call (. Base (inert show)) (:: io IO) (:: id ID)) (block (return (call print io (call _id_str id))))) (function (call (. Base (inert show)) (:: io IO) (:: node IDPhiNode)) (block (call print io "φ (") (for (= (tuple i edge) (call enumerate (. node (inert edges)))) (block (call print io (call _block_str edge) " => ") (if (call isassigned (. node (inert values)) i) (block (call print io (call _val_str (ref (. node (inert values)) i)))) (block (call print io "#undef"))) (&& (call < i (call length (. node (inert edges)))) (call print io ", ")))) (return (call print io ")")))) (function (call (. Base (inert show)) (:: io IO) (:: node IDGotoNode)) (block (return (call print io "goto " (call _block_str (. node (inert label))))))) (function (call (. Base (inert show)) (:: io IO) (:: node IDGotoIfNot)) (block (return (call print io "goto " (call _block_str (. node (inert dest))) " if not " (call _val_str (. node (inert cond))))))) (function (call (. Base (inert show)) (:: io IO) (:: sw Switch)) (block (call print io "switch ") (for (= (tuple i (tuple cond dest)) (call enumerate (call zip (. sw (inert conds)) (. sw (inert dests))))) (block (call print io (call _val_str cond) " => " (call _block_str dest)) (&& (call < i (call length (. sw (inert conds)))) (call print io ", ")))) (return (call print io ", fallthrough " (call _block_str (. sw (inert fallthrough_dest))))))) (function (call _stmt_str stmt) (block (&& (call isa stmt (curly Union IDPhiNode IDGotoNode IDGotoIfNot Switch)) (return (call sprint show stmt))) (&& (call isa stmt ReturnNode) (return (if (call isdefined stmt (inert val)) (call string "return " (call _val_str (. stmt (inert val)))) "unreachable"))) (&& (call isa stmt Expr) (return (call _expr_str stmt))) (&& (call isa stmt PiNode) (return (call string "π (" (call _val_str (. stmt (inert val))) ", " (. stmt (inert typ)) ")"))) (return (call _val_str stmt)))) (function (call _expr_str (:: x Expr)) (block (if (call === (. x (inert head)) (inert call)) (block (= f (call _val_str (ref (. x (inert args)) 1))) (= args (call join (generator (call _val_str a) (= a (ref (. x (inert args)) (call : 2 end)))) ", ")) (return (call string f "(" args ")")))) (= args (call join (generator (call _val_str a) (= a (. x (inert args)))) ", ")) (return (call string "Expr(:" (. x (inert head)) ", " args ")")))) (function (call _type_str (macrocall @nospecialize :(#= /home/pkgeval/.julia/packages/Libtask/MQIAO/src/bbcode.jl:679 =#) t)) (block (&& (call === t Any) (return "")) (&& (call === t (curly Union)) (return "::Union{}")) (return (call string "::" t)))) (= (call _is_terminator_stmt stmt) (block (|| (call isa stmt Terminator) (call isa stmt ReturnNode)))) (function (call (. Base (inert show)) (:: io IO) (:: bb BBlock)) (block (call print io (call _block_str (. bb (inert id))) " ─") (= n (call length (. bb (inert insts)))) (for (= (tuple i (tuple id inst)) (call enumerate (call zip (. bb (inert inst_ids)) (. bb (inert insts))))) (block (call println io) (= prefix (if (call < i n) "│ " "└──")) (= stmt (. inst (inert stmt))) (if (&& (call _is_terminator_stmt stmt) (call == i n)) (block (call print io prefix " " (call _stmt_str stmt))) (block (call print io prefix " " (call _id_str id) " = " (call _stmt_str stmt) (call _type_str (. inst (inert type)))))))))) (function (call (. Base (inert show)) (:: io IO) (:: ir BBCode)) (block (call println io "BBCode (" (call length (. ir (inert argtypes))) " args, " (call length (. ir (inert blocks))) " blocks)") (for (= (tuple i block) (call enumerate (. ir (inert blocks)))) (block (call show io block) (&& (call < i (call length (. ir (inert blocks)))) (call println io)))))) (function (call (. Base (inert show)) (:: io IO) (:: (macrocall @MIME_str :(#= /home/pkgeval/.julia/packages/Libtask/MQIAO/src/bbcode.jl:712 =#) "text/plain")) (:: ir BBCode)) (block (return (call show io ir)))))))  │ └─ @ /home/pkgeval/.julia/packages/Libtask/MQIAO/src/bbcode.jl:1  └─ (macrocall @nospecialize :(#= /home/pkgeval/.julia/packages/Libtask/MQIAO/src/bbcode.jl:46 =#) type)  └─ (macrocall @nospecialize :(#= /home/pkgeval/.julia/packages/Libtask/MQIAO/src/bbcode.jl:46 =#) type)  ├─ @ /home/pkgeval/.julia/packages/Libtask/MQIAO/src/bbcode.jl:46  └─ (macrocall @doc :(#= /home/pkgeval/.julia/packages/Libtask/MQIAO/src/bbcode.jl:1 =#) " module BasicBlockCode\n\nCopied over from Mooncake.jl in order to avoid making this package depend on Mooncake.\nRefer to Mooncake's developer docs for context on this file.\n" (module true BasicBlockCode (block (using (: (. Core Compiler) (. ReturnNode) (. PhiNode) (. GotoIfNot) (. GotoNode) (. NewInstruction) (. IRCode) (. SSAValue) (. PiNode) (. Argument))) (const (= CC (. Core (inert Compiler)))) (export ID seed_id! IDPhiNode IDGotoNode IDGotoIfNot Switch BBlock phi_nodes terminator insert_before_terminator! collect_stmts compute_all_predecessors compute_all_successors BBCode characterise_used_ids characterise_unique_predecessor_blocks InstVector IDInstPair __line_numbers_to_block_numbers! is_reachable_return_node new_inst replace_ids) (const (= (:: _id_count (curly Dict Int Int32)) (call (curly Dict Int Int32)))) (function (call new_inst (macrocall @nospecialize :(#= /home/pkgeval/.julia/packages/Libtask/MQIAO/src/bbcode.jl:46 =#) stmt) (kw (macrocall @nospecialize :(#= /home/pkgeval/.julia/packages/Libtask/MQIAO/src/bbcode.jl:46 =#) type) Any) (kw flag (. CC (inert IR_FLAG_REFINED)))) (block (return (call NewInstruction stmt type (call (. CC (inert NoCallInfo))) (call Int32 1) flag)))) (const (= InstVector (curly Vector NewInstruction))) (struct false ID (block (:: id Int32) (function (call ID) (block (= current_thread_id (call (. Threads (inert threadid)))) (= id_count (call get _id_count current_thread_id (call Int32 0))) (= (ref _id_count current_thread_id) (call + id_count (call Int32 1))) (return (call new id_count)))))) (= (call (. Base (inert copy)) (:: id ID)) (block id)) (function (call seed_id!) (block (return (global (= (ref _id_count (call (. Threads (inert threadid)))) 0))))) (struct false IDPhiNode (block (:: edges (curly Vector ID)) (:: values (curly Vector Any)))) (= (call (. Base (inert ==)) (:: x IDPhiNode) (:: y IDPhiNode)) (block (&& (call == (. x (inert edges)) (. y (inert edges))) (call == (. x (inert values)) (. y (inert values)))))) (= (call (. Base (inert copy)) (:: node IDPhiNode)) (block (call IDPhiNode (call copy (. node (inert edges))) (call copy (. node (inert values)))))) (struct false IDGotoNode (block (:: label ID))) (= (call (. Base (inert copy)) (:: node IDGotoNode)) (block (call IDGotoNode (call copy (. node (inert label)))))) (struct false IDGotoIfNot (block (:: cond Any) (:: dest ID))) (= (call (. Base (inert copy)) (:: node IDGotoIfNot)) (block (call IDGotoIfNot (call copy (. node (inert cond))) (call copy (. node (inert dest)))))) (struct false Switch (block (:: conds (curly Vector Any)) (:: dests (curly Vector ID)) (:: fallthrough_dest ID) (function (call Switch (:: conds (curly Vector Any)) (:: dests (curly Vector ID)) (:: fallthrough_dest ID)) (block (macrocall @assert :(#= /home/pkgeval/.julia/packages/Libtask/MQIAO/src/bbcode.jl:95 =#) (call == (call length conds) (call length dests))) (return (call new conds dests fallthrough_dest)))))) (const (= Terminator (curly Union Switch IDGotoIfNot IDGotoNode ReturnNode))) (struct true BBlock (block (:: id ID) (:: inst_ids (curly Vector ID)) (:: insts InstVector) (function (call BBlock (:: id ID) (:: inst_ids (curly Vector ID)) (:: insts InstVector)) (block (macrocall @assert :(#= /home/pkgeval/.julia/packages/Libtask/MQIAO/src/bbcode.jl:107 =#) (call == (call length inst_ids) (call length insts))) (return (call new id inst_ids insts)))))) (const (= IDInstPair (curly Tuple ID NewInstruction))) (function (call BBlock (:: id ID) (:: inst_pairs (curly Vector IDInstPair))) (block (return (call BBlock id (. first (tuple inst_pairs)) (. last (tuple inst_pairs)))))) (= (call (. Base (inert length)) (:: bb BBlock)) (block (call length (. bb (inert inst_ids))))) (= (call (. Base (inert copy)) (:: bb BBlock)) (block (call BBlock (. bb (inert id)) (call copy (. bb (inert inst_ids))) (call copy (. bb (inert insts)))))) (function (call phi_nodes (:: bb BBlock)) (block (= n_phi_nodes (call findlast (-> x (block (call isa (. x (inert stmt)) IDPhiNode))) (. bb (inert insts)))) (if (call === n_phi_nodes nothing) (block (= n_phi_nodes 0))) (return (tuple (ref (. bb (inert inst_ids)) (call : 1 n_phi_nodes)) (ref (. bb (inert insts)) (call : 1 n_phi_nodes)))))) (function (:: (call (. Base (inert insert!)) (:: bb BBlock) (:: n Int) (:: id ID) (:: inst NewInstruction)) Nothing) (block (call insert! (. bb (inert inst_ids)) n id) (call insert! (. bb (inert insts)) n inst) (return nothing))) (= (call terminator (:: bb BBlock)) (block (if (call isa (. (ref (. bb (inert insts)) end) (inert stmt)) Terminator) (. (ref (. bb (inert insts)) end) (inert stmt)) nothing))) (function (:: (call insert_before_terminator! (:: bb BBlock) (:: id ID) (:: inst NewInstruction)) Nothing) (block (call insert! bb (call + (call length (. bb (inert insts))) (if (call === (call terminator bb) nothing) 1 0)) id inst) (return nothing))) (= (:: (call collect_stmts (:: bb BBlock)) (curly Vector IDInstPair)) (block (call collect (call zip (. bb (inert inst_ids)) (. bb (inert insts)))))) (macrocall @static :(#= /home/pkgeval/.julia/packages/Libtask/MQIAO/src/bbcode.jl:145 =#) (if (call >= VERSION (macrocall @v_str :(#= /home/pkgeval/.julia/packages/Libtask/MQIAO/src/bbcode.jl:145 =#) "1.12-")) (block (struct false BBCode (block (:: blocks (curly Vector BBlock)) (:: argtypes (curly Vector Any)) (:: sptypes (curly Vector (. CC (inert VarState)))) (:: debuginfo (. CC (inert DebugInfoStream))) (:: meta (curly Vector Expr)) (:: valid_worlds (. CC (inert WorldRange))))) (function (call BBCode (:: ir (curly Union IRCode BBCode)) (:: new_blocks (curly Vector BBlock))) (block (return (call BBCode new_blocks (call (. CC (inert copy)) (. ir (inert argtypes))) (call (. CC (inert copy)) (. ir (inert sptypes))) (call (. CC (inert copy)) (. ir (inert debuginfo))) (call (. CC (inert copy)) (. ir (inert meta))) (. ir (inert valid_worlds))))))) (block (struct false BBCode (block (:: blocks (curly Vector BBlock)) (:: argtypes (curly Vector Any)) (:: sptypes (curly Vector (. CC (inert VarState)))) (:: linetable (curly Vector (. Core (inert LineInfoNode)))) (:: meta (curly Vector Expr)))) (function (call BBCode (:: ir (curly Union IRCode BBCode)) (:: new_blocks (curly Vector BBlock))) (block (return (call BBCode new_blocks (call (. CC (inert copy)) (. ir (inert argtypes))) (call (. CC (inert copy)) (. ir (inert sptypes))) (call (. CC (inert copy)) (. ir (inert linetable))) (call (. CC (inert copy)) (. ir (inert meta)))))))))) (= (call (. Base (inert copy)) (:: ir BBCode)) (block (call BBCode ir (call copy (. ir (inert blocks)))))) (= (:: (call compute_all_successors (:: ir BBCode)) (curly Dict ID (curly Vector ID))) (block (call _compute_all_successors (. ir (inert blocks))))) (macrocall @noinline :(#= /home/pkgeval/.julia/packages/Libtask/MQIAO/src/bbcode.jl:190 =#) (function (:: (call _compute_all_successors (:: blks (curly Vector BBlock))) (curly Dict ID (curly Vector ID))) (block (= succs (do (call map (call enumerate blks)) (-> (tuple (tuple n blk)) (block (= is_final_block (call == n (call length blks))) (= t (call terminator blk)) (if (call === t nothing) (block (return (if is_final_block (ref ID) (ref ID (. (ref blks (call + n 1)) (inert id)))))) (elseif (block (call isa t IDGotoNode)) (block (return (vect (. t (inert label))))) (elseif (block (call isa t IDGotoIfNot)) (block (return (if is_final_block (ref ID (. t (inert dest))) (ref ID (. t (inert dest)) (. (ref blks (call + n 1)) (inert id)))))) (elseif (block (call isa t ReturnNode)) (block (return (ref ID))) (elseif (block (call isa t Switch)) (block (return (call vcat (. t (inert dests)) (. t (inert fallthrough_dest))))) (block (call error (string "Unhandled terminator " t)))))))))))) (return (call (curly Dict ID (curly Vector ID)) (generator (tuple (. b (inert id)) succ) (= (tuple b succ) (call zip blks succs)))))))) (function (:: (call compute_all_predecessors (:: ir BBCode)) (curly Dict ID (curly Vector ID))) (block (return (call _compute_all_predecessors (. ir (inert blocks)))))) (function (:: (call _compute_all_predecessors (:: blks (curly Vector BBlock))) (curly Dict ID (curly Vector ID))) (block (= successor_map (call _compute_all_successors blks)) (= ks (call collect (call keys successor_map))) (= predecessor_map (call (curly Dict ID (curly Vector ID)) (call zip ks (call map (-> _ (block (ref ID))) ks)))) (for (= (tuple k succs) successor_map) (block (for (= succ succs) (block (call push! (ref predecessor_map succ) k))))) (return predecessor_map))) (= (:: (call collect_stmts (:: ir BBCode)) (curly Vector IDInstPair)) (block (call reduce vcat (call map collect_stmts (. ir (inert blocks)))))) (function (call id_to_line_map (:: ir BBCode)) (block (= lines (call collect_stmts ir)) (= lines_and_line_numbers (call collect (call zip lines (call eachindex lines)))) (= ids_and_line_numbers (call map (-> x (block (tuple (ref (ref x 1) 1) (ref x 2)))) lines_and_line_numbers)) (return (call Dict ids_and_line_numbers)))) (= (call concatenate_ids (:: bb_code BBCode)) (block (call reduce vcat (call map (-> b (block (. b (inert inst_ids)))) (. bb_code (inert blocks)))))) (= (call concatenate_stmts (:: bb_code BBCode)) (block (call reduce vcat (call map (-> b (block (. b (inert insts)))) (. bb_code (inert blocks)))))) (= (:: (call control_flow_graph (:: bb_code BBCode)) (. (. Core (inert Compiler)) (inert CFG))) (block (call _control_flow_graph (. bb_code (inert blocks))))) (function (:: (call _control_flow_graph (:: blks (curly Vector BBlock))) (. (. Core (inert Compiler)) (inert CFG))) (block (= preds_ids (call _compute_all_predecessors blks)) (= succs_ids (call _compute_all_successors blks)) (= block_ids (call map (-> b (block (. b (inert id)))) blks)) (= id_to_num (call (curly Dict ID Int) (call zip block_ids (call collect (call eachindex block_ids))))) (= preds (call map (-> id (block (call sort (call map (-> p (block (ref id_to_num p))) (ref preds_ids id))))) block_ids)) (= succs (call map (-> id (block (call sort (call map (-> s (block (ref id_to_num s))) (ref succs_ids id))))) block_ids)) (macrocall @static :(#= /home/pkgeval/.julia/packages/Libtask/MQIAO/src/bbcode.jl:261 =#) (if (call >= VERSION (macrocall @v_str :(#= /home/pkgeval/.julia/packages/Libtask/MQIAO/src/bbcode.jl:261 =#) "1.11.6")) (block (call push! (ref preds 1) 0)))) (= index (call .+ (call vcat 0 (call cumsum (call map length blks))) 1)) (= basic_blocks (do (call map (call eachindex blks)) (-> (tuple n) (block (= stmt_range (call (. (. Core (inert Compiler)) (inert StmtRange)) (ref index n) (call - (ref index (call + n 1)) 1))) (return (call (. (. Core (inert Compiler)) (inert BasicBlock)) stmt_range (ref preds n) (ref succs n))))))) (return (call (. (. Core (inert Compiler)) (inert CFG)) basic_blocks (ref index (call : 2 (call - end 1))))))) (function (:: (call _lines_to_blocks (:: insts InstVector) (:: cfg (. CC (inert CFG)))) InstVector) (block (= stmts (call __line_numbers_to_block_numbers! (typed_comprehension Any (generator (. x (inert stmt)) (= x insts))) cfg)) (return (call map (-> (tuple inst stmt) (block (call NewInstruction (parameters stmt) inst))) insts stmts)))) (function (call __line_numbers_to_block_numbers! (:: insts (curly Vector Any)) (:: cfg (. CC (inert CFG)))) (block (for (= i (call eachindex insts)) (block (= stmt (ref insts i)) (if (call isa stmt GotoNode) (block (= (ref insts i) (call GotoNode (call (. CC (inert block_for_inst)) cfg (. stmt (inert label)))))) (elseif (block (call isa stmt GotoIfNot)) (block (= (ref insts i) (call GotoIfNot (. stmt (inert cond)) (call (. CC (inert block_for_inst)) cfg (. stmt (inert dest)))))) (elseif (block (call isa stmt PhiNode)) (block (= (ref insts i) (call PhiNode (typed_comprehension Int32 (generator (call (. CC (inert block_for_inst)) cfg (call Int edge)) (= edge (. stmt (inert edges))))) (. stmt (inert values))))) (elseif (block (call (. Meta (inert isexpr)) stmt (inert enter))) (block (= (ref (. stmt (inert args)) 1) (call (. CC (inert block_for_inst)) cfg (:: (ref (. stmt (inert args)) 1) Int))) (= (ref insts i) stmt)))))))) (return insts))) (function (call BBCode (:: ir IRCode)) (block (= insts (call new_inst_vec (. ir (inert stmts)))) (= (tuple ssa_ids stmts) (call _ssas_to_ids insts)) (= (tuple block_ids stmts) (call _block_nums_to_ids stmts (. ir (inert cfg)))) (= blocks (do (call map (call zip (. (. ir (inert cfg)) (inert blocks)) block_ids)) (-> (tuple (tuple bb id)) (block (return (call BBlock id (ref ssa_ids (. bb (inert stmts))) (ref stmts (. bb (inert stmts))))))))) (return (call BBCode ir blocks)))) (function (call new_inst_vec (:: x (. CC (inert InstructionStream)))) (block (= stmt (macrocall @static :(#= /home/pkgeval/.julia/packages/Libtask/MQIAO/src/bbcode.jl:317 =#) (if (call < VERSION (macrocall @v_str :(#= /home/pkgeval/.julia/packages/Libtask/MQIAO/src/bbcode.jl:317 =#) "1.11.0-rc4")) (. x (inert inst)) (. x (inert stmt))))) (return (call map (-> (tuple (... v)) (block (call NewInstruction (... v)))) stmt (. x (inert type)) (. x (inert info)) (. x (inert line)) (. x (inert flag)))))) (const (= SSAToIdDict (curly Dict SSAValue ID))) (const (= BlockNumToIdDict (curly Dict Integer ID))) (function (:: (call _ssas_to_ids (:: insts InstVector)) (curly Tuple (curly Vector ID) InstVector)) (block (= ids (call map (-> _ (block (call ID))) insts)) (= val_id_map (call SSAToIdDict (call zip (. SSAValue (tuple (call eachindex insts))) ids))) (return (tuple ids (call map (call (. Base (inert Fix1)) _ssa_to_ids val_id_map) insts))))) (function (call _ssa_to_ids (:: d SSAToIdDict) (:: inst NewInstruction)) (block (return (call NewInstruction (parameters (kw stmt (call _ssa_to_ids d (. inst (inert stmt))))) inst)))) (function (call _ssa_to_ids (:: d SSAToIdDict) (:: x ReturnNode)) (block (return (if (call isdefined x (inert val)) (call ReturnNode (call get d (. x (inert val)) (. x (inert val)))) x)))) (= (call _ssa_to_ids (:: d SSAToIdDict) (:: x Expr)) (block (call Expr (. x (inert head)) (... (call map (-> a (block (call get d a a))) (. x (inert args))))))) (= (call _ssa_to_ids (:: d SSAToIdDict) (:: x PiNode)) (block (call PiNode (call get d (. x (inert val)) (. x (inert val))) (call get d (. x (inert typ)) (. x (inert typ)))))) (= (call _ssa_to_ids (:: d SSAToIdDict) (:: x QuoteNode)) (block x)) (= (call _ssa_to_ids (:: d SSAToIdDict) x) (block x)) (function (call _ssa_to_ids (:: d SSAToIdDict) (:: x PhiNode)) (block (= new_values (call (curly Vector Any) undef (call length (. x (inert values))))) (for (= n (call eachindex (. x (inert values)))) (block (if (call isassigned (. x (inert values)) n) (block (= (ref new_values n) (call get d (ref (. x (inert values)) n) (ref (. x (inert values)) n))))))) (return (call PhiNode (. x (inert edges)) new_values)))) (= (call _ssa_to_ids (:: d SSAToIdDict) (:: x GotoNode)) (block x)) (= (call _ssa_to_ids (:: d SSAToIdDict) (:: x GotoIfNot)) (block (call GotoIfNot (call get d (. x (inert cond)) (. x (inert cond))) (. x (inert dest))))) (function (:: (call _block_nums_to_ids (:: insts InstVector) (:: cfg (. CC (inert CFG)))) (curly Tuple (curly Vector ID) InstVector)) (block (= ids (call map (-> _ (block (call ID))) (. cfg (inert blocks)))) (= block_num_id_map (call BlockNumToIdDict (call zip (call eachindex (. cfg (inert blocks))) ids))) (return (tuple ids (call map (call (. Base (inert Fix1)) _block_num_to_ids block_num_id_map) insts))))) (function (call _block_num_to_ids (:: d BlockNumToIdDict) (:: x NewInstruction)) (block (return (call NewInstruction (parameters (kw stmt (call _block_num_to_ids d (. x (inert stmt))))) x)))) (function (call _block_num_to_ids (:: d BlockNumToIdDict) (:: x PhiNode)) (block (return (call IDPhiNode (typed_comprehension ID (generator (ref d e) (= e (. x (inert edges))))) (. x (inert values)))))) (= (call _block_num_to_ids (:: d BlockNumToIdDict) (:: x GotoNode)) (block (call IDGotoNode (ref d (. x (inert label)))))) (= (call _block_num_to_ids (:: d BlockNumToIdDict) (:: x GotoIfNot)) (block (call IDGotoIfNot (. x (inert cond)) (ref d (. x (inert dest)))))) (= (call _block_num_to_ids (:: d BlockNumToIdDict) x) (block x)) (const (= IdToIdDict (curly Dict ID ID))) (function (call replace_ids (:: d IdToIdDict) (:: inst NewInstruction)) (block (return (call NewInstruction (parameters (kw stmt (call replace_ids d (. inst (inert stmt))))) inst)))) (= (call replace_ids (:: d IdToIdDict) (:: x ID)) (block (call get d x x))) (function (call replace_ids (:: d IdToIdDict) (:: x ReturnNode)) (block (return (if (call isdefined x (inert val)) (call ReturnNode (call get d (. x (inert val)) (. x (inert val)))) x)))) (= (call replace_ids (:: d IdToIdDict) (:: x Expr)) (block (call Expr (. x (inert head)) (... (call map (-> a (block (call get d a a))) (. x (inert args))))))) (= (call replace_ids (:: d IdToIdDict) (:: x PiNode)) (block (call PiNode (call get d (. x (inert val)) (. x (inert val))) (call get d (. x (inert typ)) (. x (inert typ)))))) (= (call replace_ids (:: d IdToIdDict) (:: x QuoteNode)) (block x)) (= (call replace_ids (:: d IdToIdDict) x) (block x)) (function (call replace_ids (:: d IdToIdDict) (:: x IDPhiNode)) (block (= new_ids (comprehension (generator (call get d e e) (= e (. x (inert edges)))))) (= new_values (call (curly Vector Any) undef (call length (. x (inert values))))) (for (= n (call eachindex (. x (inert values)))) (block (if (call isassigned (. x (inert values)) n) (block (= (ref new_values n) (call get d (ref (. x (inert values)) n) (ref (. x (inert values)) n))))))) (return (call IDPhiNode new_ids new_values)))) (= (call replace_ids (:: d IdToIdDict) (:: x IDGotoNode)) (block x)) (function (call replace_ids (:: d IdToIdDict) (:: x IDGotoIfNot)) (block (return (call IDGotoIfNot (call get d (. x (inert cond)) (. x (inert cond))) (call get d (. x (inert dest)) (. x (inert dest))))))) (function (call replace_ids (:: d IdToIdDict) (:: x Switch)) (block (= new_conds (call (curly Vector Any) undef (call length (. x (inert conds))))) (for (= n (call eachindex (. x (inert conds)))) (block (if (call isassigned (. x (inert conds)) n) (block (= (ref new_conds n) (call get d (ref (. x (inert conds)) n) (ref (. x (inert conds)) n))))))) (= new_dests (comprehension (generator (call get d dest dest) (= dest (. x (inert dests)))))) (= new_fallthrough_dest (call get d (. x (inert fallthrough_dest)) (. x (inert fallthrough_dest)))) (return (call Switch new_conds new_dests new_fallthrough_dest)))) (function (call (. CC (inert IRCode)) (:: bb_code BBCode)) (block (= bb_code (call _lower_switch_statements bb_code)) (= bb_code (call _remove_double_edges bb_code)) (= insts (call _ids_to_line_numbers bb_code)) (= cfg (call control_flow_graph bb_code)) (= insts (call _lines_to_blocks insts cfg)) (macrocall @static :(#= /home/pkgeval/.julia/packages/Libtask/MQIAO/src/bbcode.jl:418 =#) (if (call >= VERSION (macrocall @v_str :(#= /home/pkgeval/.julia/packages/Libtask/MQIAO/src/bbcode.jl:418 =#) "1.12-")) (block (= lines (call map (-> x (block (. x (inert line)))) insts)) (= lines (call collect (call (. Iterators (inert flatten)) lines))) (return (call IRCode (call (. CC (inert InstructionStream)) (call map (-> x (block (. x (inert stmt)))) insts) (call collect Any (call map (-> x (block (. x (inert type)))) insts)) (call collect (. CC (inert CallInfo)) (call map (-> x (block (. x (inert info)))) insts)) lines (call map (-> x (block (. x (inert flag)))) insts)) cfg (call (. CC (inert copy)) (. bb_code (inert debuginfo))) (call (. CC (inert copy)) (. bb_code (inert argtypes))) (call (. CC (inert copy)) (. bb_code (inert meta))) (call (. CC (inert copy)) (. bb_code (inert sptypes))) (. bb_code (inert valid_worlds))))) (block (return (call IRCode (call (. CC (inert InstructionStream)) (call map (-> x (block (. x (inert stmt)))) insts) (call map (-> x (block (. x (inert type)))) insts) (call map (-> x (block (. x (inert info)))) insts) (call map (-> x (block (. x (inert line)))) insts) (call map (-> x (block (. x (inert flag)))) insts)) cfg (call (. CC (inert copy)) (. bb_code (inert linetable))) (call (. CC (inert copy)) (. bb_code (inert argtypes))) (call (. CC (inert copy)) (. bb_code (inert meta))) (call (. CC (inert copy)) (. bb_code (inert sptypes)))))))))) (function (call _lower_switch_statements (:: bb_code BBCode)) (block (= new_blocks (call (curly Vector BBlock) undef 0)) (for (= block (. bb_code (inert blocks))) (block (= t (call terminator block)) (if (call isa t Switch) (block (= bb (call BBlock (. block (inert id)) (ref (. block (inert inst_ids)) (call : 1 (call - end 1))) (ref (. block (inert insts)) (call : 1 (call - end 1))))) (call push! new_blocks bb) (do (call foreach (. t (inert conds)) (. t (inert dests))) (-> (tuple cond dest) (block (= blk (call BBlock (call ID) (vect (call ID)) (vect (call new_inst (call IDGotoIfNot cond dest) Any)))) (call push! new_blocks blk)))) (= fallthrough_inst (call new_inst (call IDGotoNode (. t (inert fallthrough_dest))) Any)) (call push! new_blocks (call BBlock (call ID) (vect (call ID)) (vect fallthrough_inst)))) (block (call push! new_blocks block))))) (return (call BBCode bb_code new_blocks)))) (function (:: (call _ids_to_line_numbers (:: bb_code BBCode)) InstVector) (block (= block_ids (comprehension (generator (. b (inert id)) (= b (. bb_code (inert blocks)))))) (= block_lengths (call map length (. bb_code (inert blocks)))) (= block_start_ssas (. SSAValue (tuple (call vcat 1 (call .+ (ref (call cumsum block_lengths) (call : 1 (call - end 1))) 1))))) (= line_ids (call concatenate_ids bb_code)) (= line_ssas (. SSAValue (tuple (call eachindex line_ids)))) (= id_to_ssa_map (call Dict (call zip (call vcat block_ids line_ids) (call vcat block_start_ssas line_ssas)))) (return (comprehension (generator (call _to_ssas id_to_ssa_map stmt) (= stmt (call concatenate_stmts bb_code))))))) (= (call _to_ssas (:: d Dict) (:: inst NewInstruction)) (block (call NewInstruction (parameters (kw stmt (call _to_ssas d (. inst (inert stmt))))) inst))) (= (call _to_ssas (:: d Dict) (:: x ReturnNode)) (block (if (call isdefined x (inert val)) (call ReturnNode (call get d (. x (inert val)) (. x (inert val)))) x))) (= (call _to_ssas (:: d Dict) (:: x Expr)) (block (call Expr (. x (inert head)) (... (call map (-> a (block (call get d a a))) (. x (inert args))))))) (= (call _to_ssas (:: d Dict) (:: x PiNode)) (block (call PiNode (call get d (. x (inert val)) (. x (inert val))) (call get d (. x (inert typ)) (. x (inert typ)))))) (= (call _to_ssas (:: d Dict) (:: x QuoteNode)) (block x)) (= (call _to_ssas (:: d Dict) x) (block x)) (function (call _to_ssas (:: d Dict) (:: x IDPhiNode)) (block (= new_values (call (curly Vector Any) undef (call length (. x (inert values))))) (for (= n (call eachindex (. x (inert values)))) (block (if (call isassigned (. x (inert values)) n) (block (= (ref new_values n) (call get d (ref (. x (inert values)) n) (ref (. x (inert values)) n))))))) (return (call PhiNode (call map (-> e (block (call Int32 (. (call getindex d e) (inert id))))) (. x (inert edges))) new_values)))) (= (call _to_ssas (:: d Dict) (:: x IDGotoNode)) (block (call GotoNode (. (ref d (. x (inert label))) (inert id))))) (= (call _to_ssas (:: d Dict) (:: x IDGotoIfNot)) (block (call GotoIfNot (call get d (. x (inert cond)) (. x (inert cond))) (. (ref d (. x (inert dest))) (inert id))))) (function (call _remove_double_edges (:: ir BBCode)) (block (= new_blks (do (call map (call enumerate (. ir (inert blocks)))) (-> (tuple (tuple n blk)) (block (= t (call terminator blk)) (if (&& (call isa t IDGotoIfNot) (call == (. t (inert dest)) (. (ref (. ir (inert blocks)) (call + n 1)) (inert id)))) (block (= new_insts (call vcat (ref (. blk (inert insts)) (call : 1 (call - end 1))) (call NewInstruction (parameters (kw stmt (call IDGotoNode (. t (inert dest))))) t))) (return (call BBlock (. blk (inert id)) (. blk (inert inst_ids)) new_insts))) (block (return blk))))))) (return (call BBCode ir new_blks)))) (function (:: (call characterise_unique_predecessor_blocks (:: blks (curly Vector BBlock))) (curly Tuple (curly Dict ID Bool) (curly Dict ID Bool))) (block (= blk_ids (typed_comprehension ID (generator (. b (inert id)) (= b blks)))) (= preds (call _compute_all_predecessors blks)) (= succs (call _compute_all_successors blks)) (= is_unique_pred (call (curly Dict ID Bool))) (for (= id blk_ids) (block (= ss (ref succs id)) (= (ref is_unique_pred id) (&& (call ! (call isempty ss)) (call all (-> s (block (call == (call length (ref preds s)) 1))) ss))))) (= reachable_return_blocks (do (call filter blks) (-> (tuple blk) (block (call is_reachable_return_node (call terminator blk)))))) (if (call == (call length reachable_return_blocks) 1) (block (= (ref is_unique_pred (. (call only reachable_return_blocks) (inert id))) true))) (= pred_is_unique_pred (call (curly Dict ID Bool))) (for (= id blk_ids) (block (= (ref pred_is_unique_pred id) (&& (call == (call length (ref preds id)) 1) (ref is_unique_pred (call only (ref preds id))))))) (= entry_id (ref blk_ids 1)) (= (ref pred_is_unique_pred entry_id) (call isempty (ref preds entry_id))) (return (tuple is_unique_pred pred_is_unique_pred)))) (= (call is_reachable_return_node (:: x ReturnNode)) (block (call isdefined x (inert val)))) (= (call is_reachable_return_node x) (block false)) (function (:: (call characterise_used_ids (:: stmts (curly Vector IDInstPair))) (curly Dict ID Bool)) (block (= ids (. first (tuple stmts))) (= insts (. last (tuple stmts))) (= is_used (call (curly Dict ID Bool) (call zip ids (call fill false (call length ids))))) (for (= inst insts) (block (call _find_id_uses! is_used (. inst (inert stmt))))) (return is_used))) (function (call _find_id_uses! (:: d (curly Dict ID Bool)) (:: x Expr)) (block (for (= arg (. x (inert args))) (block (&& (call in arg (call keys d)) (call setindex! d true arg)))))) (function (call _find_id_uses! (:: d (curly Dict ID Bool)) (:: x IDGotoIfNot)) (block (return (&& (call in (. x (inert cond)) (call keys d)) (call setindex! d true (. x (inert cond))))))) (= (call _find_id_uses! (:: (curly Dict ID Bool)) (:: IDGotoNode)) (block nothing)) (function (call _find_id_uses! (:: d (curly Dict ID Bool)) (:: x PiNode)) (block (return (&& (call in (. x (inert val)) (call keys d)) (call setindex! d true (. x (inert val))))))) (function (call _find_id_uses! (:: d (curly Dict ID Bool)) (:: x IDPhiNode)) (block (= v (. x (inert values))) (for (= n (call eachindex v)) (block (&& (call isassigned v n) (&& (call in (ref v n) (call keys d)) (call setindex! d true (ref v n)))))))) (function (call _find_id_uses! (:: d (curly Dict ID Bool)) (:: x ReturnNode)) (block (return (&& (call isdefined x (inert val)) (&& (call in (. x (inert val)) (call keys d)) (call setindex! d true (. x (inert val)))))))) (= (call _find_id_uses! (:: d (curly Dict ID Bool)) (:: x QuoteNode)) (block nothing)) (= (call _find_id_uses! (:: d (curly Dict ID Bool)) x) (block nothing)) (= (call _id_str (:: id ID)) (block (call string "%" (. id (inert id))))) (= (call _block_str (:: id ID)) (block (call string "#" (. id (inert id))))) (= (call _val_str (:: x ID)) (block (call _id_str x))) (= (call _val_str (:: x Argument)) (block (call string "_" (. x (inert n))))) (= (call _val_str (:: x QuoteNode)) (block (call repr x))) (= (call _val_str (:: x GlobalRef)) (block (call string x))) (= (call _val_str (:: x Nothing)) (block "nothing")) (= (call _val_str x) (block (call repr x))) (function (call (. Base (inert show)) (:: io IO) (:: id ID)) (block (return (call print io (call _id_str id))))) (function (call (. Base (inert show)) (:: io IO) (:: node IDPhiNode)) (block (call print io "φ (") (for (= (tuple i edge) (call enumerate (. node (inert edges)))) (block (call print io (call _block_str edge) " => ") (if (call isassigned (. node (inert values)) i) (block (call print io (call _val_str (ref (. node (inert values)) i)))) (block (call print io "#undef"))) (&& (call < i (call length (. node (inert edges)))) (call print io ", ")))) (return (call print io ")")))) (function (call (. Base (inert show)) (:: io IO) (:: node IDGotoNode)) (block (return (call print io "goto " (call _block_str (. node (inert label))))))) (function (call (. Base (inert show)) (:: io IO) (:: node IDGotoIfNot)) (block (return (call print io "goto " (call _block_str (. node (inert dest))) " if not " (call _val_str (. node (inert cond))))))) (function (call (. Base (inert show)) (:: io IO) (:: sw Switch)) (block (call print io "switch ") (for (= (tuple i (tuple cond dest)) (call enumerate (call zip (. sw (inert conds)) (. sw (inert dests))))) (block (call print io (call _val_str cond) " => " (call _block_str dest)) (&& (call < i (call length (. sw (inert conds)))) (call print io ", ")))) (return (call print io ", fallthrough " (call _block_str (. sw (inert fallthrough_dest))))))) (function (call _stmt_str stmt) (block (&& (call isa stmt (curly Union IDPhiNode IDGotoNode IDGotoIfNot Switch)) (return (call sprint show stmt))) (&& (call isa stmt ReturnNode) (return (if (call isdefined stmt (inert val)) (call string "return " (call _val_str (. stmt (inert val)))) "unreachable"))) (&& (call isa stmt Expr) (return (call _expr_str stmt))) (&& (call isa stmt PiNode) (return (call string "π (" (call _val_str (. stmt (inert val))) ", " (. stmt (inert typ)) ")"))) (return (call _val_str stmt)))) (function (call _expr_str (:: x Expr)) (block (if (call === (. x (inert head)) (inert call)) (block (= f (call _val_str (ref (. x (inert args)) 1))) (= args (call join (generator (call _val_str a) (= a (ref (. x (inert args)) (call : 2 end)))) ", ")) (return (call string f "(" args ")")))) (= args (call join (generator (call _val_str a) (= a (. x (inert args)))) ", ")) (return (call string "Expr(:" (. x (inert head)) ", " args ")")))) (function (call _type_str (macrocall @nospecialize :(#= /home/pkgeval/.julia/packages/Libtask/MQIAO/src/bbcode.jl:679 =#) t)) (block (&& (call === t Any) (return "")) (&& (call === t (curly Union)) (return "::Union{}")) (return (call string "::" t)))) (= (call _is_terminator_stmt stmt) (block (|| (call isa stmt Terminator) (call isa stmt ReturnNode)))) (function (call (. Base (inert show)) (:: io IO) (:: bb BBlock)) (block (call print io (call _block_str (. bb (inert id))) " ─") (= n (call length (. bb (inert insts)))) (for (= (tuple i (tuple id inst)) (call enumerate (call zip (. bb (inert inst_ids)) (. bb (inert insts))))) (block (call println io) (= prefix (if (call < i n) "│ " "└──")) (= stmt (. inst (inert stmt))) (if (&& (call _is_terminator_stmt stmt) (call == i n)) (block (call print io prefix " " (call _stmt_str stmt))) (block (call print io prefix " " (call _id_str id) " = " (call _stmt_str stmt) (call _type_str (. inst (inert type)))))))))) (function (call (. Base (inert show)) (:: io IO) (:: ir BBCode)) (block (call println io "BBCode (" (call length (. ir (inert argtypes))) " args, " (call length (. ir (inert blocks))) " blocks)") (for (= (tuple i block) (call enumerate (. ir (inert blocks)))) (block (call show io block) (&& (call < i (call length (. ir (inert blocks)))) (call println io)))))) (function (call (. Base (inert show)) (:: io IO) (:: (macrocall @MIME_str :(#= /home/pkgeval/.julia/packages/Libtask/MQIAO/src/bbcode.jl:712 =#) "text/plain")) (:: ir BBCode)) (block (return (call show io ir)))))))  └─ @ /home/pkgeval/.julia/packages/Libtask/MQIAO/src/bbcode.jl:1  Stacktrace:  [1] expand_forms_2(ctx::Base.JuliaLowering.MacroExpansionContext{Dict{Symbol, Dict{Int64, Any}}}, ex::Base.JuliaSyntax.SyntaxTree{Dict{Symbol, Dict{Int64, Any}}})  @ Base.JuliaLowering /source/usr/share/julia/JuliaLowering/src/desugaring.jl:4467  [2] lower_step(iter::Base.JuliaLowering.LoweringIterator{Dict{Symbol, Dict{Int64, Any}}}, mod::Module, world::UInt64; soft_scope::Nothing)  @ Base.JuliaLowering /source/usr/share/julia/JuliaLowering/src/eval.jl:90  [3] getindex(A::Vector{Module}, i::Int64)  @ Base /source/usr/share/julia/JuliaLowering/src/eval.jl:45 [inlined]  [4] _eval(mod::Module, iter::Base.JuliaLowering.LoweringIterator{Dict{Symbol, Dict{Int64, Any}}}; soft_scope::Nothing)  @ Base.JuliaLowering /source/usr/share/julia/JuliaLowering/src/eval.jl:479  [5] _eval  @ /source/usr/share/julia/JuliaLowering/src/eval.jl:475 [inlined]  [6] #eval#134  @ /source/usr/share/julia/JuliaLowering/src/eval.jl:467 [inlined]  [7] top-level scope  @ ~/.julia/packages/Libtask/MQIAO/src/bbcode.jl:1  [8] macro expansion  @ ~/.julia/packages/Libtask/MQIAO/src/bbcode.jl:1 [inlined]  [9] include(mapexpr::Function, mod::Module, _path::String)  @ Base ./Base.jl:327  [10] top-level scope  @ ~/.julia/packages/Libtask/MQIAO/src/Libtask.jl:13  [11] include(mod::Module, _path::String)  @ Base ./Base.jl:326  [12] include_package_for_output(pkg::Base.PkgId, input::String, syntax_version::VersionNumber, depot_path::Vector{String}, dl_load_path::Vector{String}, load_path::Vector{String}, concrete_deps::Vector{Pair{Base.PkgId, UInt128}}, source::Nothing)  @ Base ./loading.jl:3271  [13] top-level scope  @ stdin:5  [14] eval(m::Module, e::Any)  @ Core ./boot.jl:517  [15] include_string(mapexpr::typeof(identity), mod::Module, code::String, filename::String)  @ Base ./loading.jl:3113  [16] push!(a::Vector{SubString{String}}, item::String)  @ Base ./loading.jl:3123 [inlined]  [17] exec_options(opts::Base.JLOptions)  @ Base ./client.jl:353  [18] _start()  @ Base ./client.jl:596 in expression starting at /home/pkgeval/.julia/packages/Libtask/MQIAO/src/bbcode.jl:1 in expression starting at /home/pkgeval/.julia/packages/Libtask/MQIAO/src/Libtask.jl:1 in expression starting at stdin:5 1 dependency had output during precompilation: ┌ Libtask │ [Output was shown above] └ ERROR: The following 1 package failed to precompile: Libtask Failed to precompile Libtask [6f1fad26-d15e-5dc8-ae53-837a1d7b8c9f] to "/home/pkgeval/.julia/compiled/v1.14/Libtask/jl_BceEMj" (ProcessExited(1)). Loading failed after 12.64s ERROR: LoadError: failed process: Process(`/opt/julia/bin/julia -C native -J/opt/julia/lib/julia/sys.so -g1 --check-bounds=yes --inline=yes --check-bounds=yes --pkgimages=existing -e 'using Libtask'`, ProcessExited(1)) [1] Stacktrace: [1] spawn_opts_inherit() @ Base ./process.jl:612 [inlined] [2] run(::Cmd; wait::Bool) @ Base ./process.jl:525 [3] run(::Cmd) @ Base ./process.jl:522 [4] top-level scope @ /PkgEval.jl/scripts/evaluate.jl:197 [5] include(mod::Module, _path::String) @ Base ./Base.jl:326 [6] exec_options(opts::Base.JLOptions) @ Base ./client.jl:355 [7] _start() @ Base ./client.jl:596 in expression starting at /PkgEval.jl/scripts/evaluate.jl:188 PkgEval failed after 63.5s: package fails to precompile