1
1
using Core. IR
2
- using Core . Compiler :
2
+ using . CC :
3
3
BasicBlock, CFG, IRCode, IncrementalCompact, Instruction, NewInstruction, NoCallInfo, StmtRange,
4
4
bbidxiter, cfg_delete_edge!, cfg_insert_edge!, compute_basic_blocks, complete,
5
5
construct_domtree, construct_ssa!, domsort_ssa!, finish, insert_node!,
6
6
insert_node_here!, non_dce_finish!, quoted, retrieve_code_info,
7
7
scan_slot_def_use, userefs, SimpleInferenceLattice
8
8
9
9
if VERSION < v " 1.11.0-DEV.1351"
10
- using Core . Compiler : effect_free_and_nothrow as removable_if_unused
10
+ using . CC : effect_free_and_nothrow as removable_if_unused
11
11
else
12
- using Core . Compiler : removable_if_unused
12
+ using . CC : removable_if_unused
13
13
end
14
14
15
15
using Base. Meta
@@ -93,7 +93,7 @@ function expand_switch(code::Vector{Any}, bb_ranges::Vector{UnitRange{Int}}, slo
93
93
# Now rewrite branch targets back to statement indexing
94
94
for i = 1 : length (new_code)
95
95
stmt = new_code[i]
96
- stmt = Core . Compiler . renumber_ssa! (stmt, renumber)
96
+ stmt = CC . renumber_ssa! (stmt, renumber)
97
97
stmt = new_to_regular (stmt)
98
98
if isa (stmt, GotoNode)
99
99
stmt = GotoNode (renumber[first (bb_ranges[stmt. label])]. id)
@@ -239,19 +239,9 @@ function split_critical_edges!(ir)
239
239
return ir′
240
240
end
241
241
242
- Base. iterate (c:: IncrementalCompact , args... ) = Core. Compiler. iterate (c, args... )
243
- Base. iterate (p:: Core.Compiler.Pair , args... ) = Core. Compiler. iterate (p, args... )
244
- Base. iterate (urs:: Core.Compiler.UseRefIterator , args... ) = Core. Compiler. iterate (urs, args... )
245
- Base. iterate (x:: Core.Compiler.BBIdxIter , args... ) = Core. Compiler. iterate (x, args... )
246
- Base. getindex (urs:: Core.Compiler.UseRefIterator , args... ) = Core. Compiler. getindex (urs, args... )
247
- Base. getindex (urs:: Core.Compiler.UseRef , args... ) = Core. Compiler. getindex (urs, args... )
248
- Base. getindex (c:: Core.Compiler.IncrementalCompact , args... ) = Core. Compiler. getindex (c, args... )
249
- Base. setindex! (c:: Core.Compiler.IncrementalCompact , args... ) = Core. Compiler. setindex! (c, args... )
250
- Base. setindex! (urs:: Core.Compiler.UseRef , args... ) = Core. Compiler. setindex! (urs, args... )
251
-
252
- import Core. Compiler: VarState
242
+ import . CC: VarState
253
243
function sptypes (sparams)
254
- VarState[Core . Compiler . VarState .(sparams, false )... ]
244
+ VarState[CC . VarState .(sparams, false )... ]
255
245
end
256
246
257
247
function optic_transform (ci:: CodeInfo , args... )
@@ -277,12 +267,12 @@ function optic_transform!(ci::CodeInfo, mi::MethodInstance, nargs::Int, N::Int)
277
267
argtypes = Any[Any for i = 1 : 2 ]
278
268
meta = Expr[]
279
269
@static if VERSION ≥ v " 1.12.0-DEV.173"
280
- debuginfo = Core . Compiler . DebugInfoStream (mi, ci. debuginfo, length (code))
281
- stmts = Core . Compiler . InstructionStream (code, type, info, debuginfo. codelocs, flag)
270
+ debuginfo = CC . DebugInfoStream (mi, ci. debuginfo, length (code))
271
+ stmts = CC . InstructionStream (code, type, info, debuginfo. codelocs, flag)
282
272
ir = IRCode (stmts, cfg, debuginfo, argtypes, meta, sptypes (sparams))
283
273
else
284
274
linetable = Core. LineInfoNode[ci. linetable... ]
285
- stmts = Core . Compiler . InstructionStream (code, type, info, ci. codelocs, flag)
275
+ stmts = CC . InstructionStream (code, type, info, ci. codelocs, flag)
286
276
ir = IRCode (stmts, cfg, linetable, argtypes, meta, sptypes (sparams))
287
277
end
288
278
@@ -307,7 +297,7 @@ function optic_transform!(ci::CodeInfo, mi::MethodInstance, nargs::Int, N::Int)
307
297
308
298
ir = diffract_ir! (ir, ci, meth, sparams, nargs, N)
309
299
310
- Core . Compiler . replace_code_newstyle! (ci, ir)
300
+ CC . replace_code_newstyle! (ci, ir)
311
301
312
302
ci. ssavaluetypes = length (ci. code)
313
303
ci. ssaflags = SSAFlagType[zero (SSAFlagType) for i= 1 : length (ci. code)]
0 commit comments