Skip to content

Commit

Permalink
IRShow: fix problematic code (#41603)
Browse files Browse the repository at this point in the history
* IRShow: fix problematic code

* Update base/compiler/ssair/show.jl

Co-authored-by: Simeon Schaub <[email protected]>

Co-authored-by: Simeon Schaub <[email protected]>
  • Loading branch information
aviatesk and simeonschaub authored Jul 16, 2021
1 parent 3ac7c38 commit 2893de7
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions base/compiler/ssair/show.jl
Original file line number Diff line number Diff line change
Expand Up @@ -726,7 +726,7 @@ function statementidx_lineinfo_printer(f, code::CodeInfo)
end
statementidx_lineinfo_printer(code) = statementidx_lineinfo_printer(DILineInfoPrinter, code)

function stmts_used(code::IRCode, warn_unset_entry=true)
function stmts_used(io::IO, code::IRCode, warn_unset_entry=true)
stmts = code.stmts
used = BitSet()
for stmt in stmts
Expand All @@ -744,7 +744,7 @@ function stmts_used(code::IRCode, warn_unset_entry=true)
return used
end

function stmts_used(code::CodeInfo)
function stmts_used(::IO, code::CodeInfo)
stmts = code.code
used = BitSet()
for stmt in stmts
Expand All @@ -763,7 +763,7 @@ default_config(code::CodeInfo) = IRShowConfig(statementidx_lineinfo_printer(code
function show_ir(io::IO, code::Union{IRCode, CodeInfo}, config::IRShowConfig=default_config(code);
pop_new_node! = code isa IRCode ? ircode_new_nodes_iter(code) : Returns(nothing))
stmts = code isa IRCode ? code.stmts : code.code
used = stmts_used(code)
used = stmts_used(io, code)
cfg = code isa IRCode ? code.cfg : compute_basic_blocks(stmts)
bb_idx = 1

Expand Down

2 comments on commit 2893de7

@nanosoldier
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Executing the daily package evaluation, I will reply here when finished:

@nanosoldier runtests(ALL, isdaily = true)

@nanosoldier
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Something went wrong when running your job:

ProcessExitedException(2)

cc @maleadt

Please sign in to comment.