Skip to content

Commit 5cd9f67

Browse files
committed
Use StmtRange explicitly
1 parent d8fb471 commit 5cd9f67

File tree

2 files changed

+2
-6
lines changed

2 files changed

+2
-6
lines changed

src/stage1/compiler_utils.jl

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,6 @@ if VERSION < v"1.12.0-DEV.1268"
3030

3131
Base.copy(ir::IRCode) = CC.copy(ir)
3232

33-
CC.BasicBlock(x::UnitRange) =
34-
BasicBlock(StmtRange(first(x), last(x)))
35-
CC.BasicBlock(x::UnitRange, preds::Vector{Int}, succs::Vector{Int}) =
36-
BasicBlock(StmtRange(first(x), last(x)), preds, succs)
3733
Base.length(c::CC.NewNodeStream) = CC.length(c)
3834
Base.setindex!(i::Instruction, args...) = CC.setindex!(i, args...)
3935
Base.size(x::CC.UnitRange) = CC.size(x)

src/stage1/recurse.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -183,10 +183,10 @@ function split_critical_edges!(ir)
183183
bb = ir.stmts[i][:inst].args[1]
184184
ir.stmts[i][:inst] = nothing
185185
bbnew = bb + ninserted
186-
insert!(cfg.blocks, bbnew, BasicBlock(i:i))
186+
insert!(cfg.blocks, bbnew, BasicBlock(StmtRange(i:i)))
187187
bb_rename_offset[bb] += 1
188188
bblock = cfg.blocks[bbnew+1]
189-
cfg.blocks[bbnew+1] = BasicBlock((i+1):last(bblock.stmts),
189+
cfg.blocks[bbnew+1] = BasicBlock(StmtRange((i+1):last(bblock.stmts)),
190190
bblock.preds, bblock.succs)
191191
i += 1
192192
while i <= last(bblock.stmts)

0 commit comments

Comments
 (0)