Skip to content

Commit 6a250c4

Browse files
committed
Enable CFG transforms; turn DCE back on globally
1 parent ff20764 commit 6a250c4

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

base/compiler/ssair/ir.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -527,7 +527,7 @@ mutable struct IncrementalCompact
527527
cfg_transforms_enabled::Bool
528528
fold_constant_branches::Bool
529529

530-
function IncrementalCompact(code::IRCode, allow_cfg_transforms::Bool=false)
530+
function IncrementalCompact(code::IRCode, allow_cfg_transforms::Bool=true)
531531
# Sort by position with attach after nodes after regular ones
532532
perm = my_sortperm(Int[let new_node = code.new_nodes.info[i]
533533
(new_node.pos * 2 + Int(new_node.attach_after))
@@ -1416,7 +1416,7 @@ function complete(compact::IncrementalCompact)
14161416
return IRCode(compact.ir, compact.result, cfg, compact.new_new_nodes)
14171417
end
14181418

1419-
function compact!(code::IRCode, allow_cfg_transforms::Bool=false)
1419+
function compact!(code::IRCode, allow_cfg_transforms::Bool=true)
14201420
compact = IncrementalCompact(code, allow_cfg_transforms)
14211421
# Just run through the iterator without any processing
14221422
for _ in compact; end # _ isa Pair{Int, Any}

test/compiler/inline.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ function f_ifelse(x)
161161
return b ? x + 1 : x
162162
end
163163
# 2 for now because the compiler leaves a GotoNode around
164-
@test_broken length(code_typed(f_ifelse, (String,))[1][1].code) <= 2
164+
@test length(code_typed(f_ifelse, (String,))[1][1].code) <= 2
165165

166166
# Test that inlining of _apply properly hits the inference cache
167167
@noinline cprop_inline_foo1() = (1, 1)

0 commit comments

Comments
 (0)