Skip to content

Commit 6f6d5a5

Browse files
yhlsvchuravy
authored andcommitted
Enable CFG transforms; turn DCE back on globally
1 parent 25549a3 commit 6f6d5a5

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
@@ -539,7 +539,7 @@ mutable struct IncrementalCompact
539539
cfg_transforms_enabled::Bool
540540
fold_constant_branches::Bool
541541

542-
function IncrementalCompact(code::IRCode, allow_cfg_transforms::Bool=false)
542+
function IncrementalCompact(code::IRCode, allow_cfg_transforms::Bool=true)
543543
# Sort by position with attach after nodes after regular ones
544544
perm = my_sortperm(Int[let new_node = code.new_nodes.info[i]
545545
(new_node.pos * 2 + Int(new_node.attach_after))
@@ -1433,7 +1433,7 @@ function complete(compact::IncrementalCompact)
14331433
return IRCode(compact.ir, compact.result, cfg, compact.new_new_nodes)
14341434
end
14351435

1436-
function compact!(code::IRCode, allow_cfg_transforms::Bool=false)
1436+
function compact!(code::IRCode, allow_cfg_transforms::Bool=true)
14371437
compact = IncrementalCompact(code, allow_cfg_transforms)
14381438
# Just run through the iterator without any processing
14391439
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)