def _loop_lift_modify_blocks(func_ir, loopinfo, blocks, typingctx, targetctx, flags, locals):
 from numba.dispatcher import LiftedLoop
 loop = loopinfo.loop
 loopblockkeys = ((set(loop.body) | set(loop.entries)) | set(loop.exits))
 loopblocks = dict(((k, blocks[k].copy()) for k in loopblockkeys))
 _loop_lift_prepare_loop_func(loopinfo, loopblocks)
 lifted_ir = func_ir.derive(blocks=loopblocks, arg_names=tuple(loopinfo.inputs), arg_count=len(loopinfo.inputs), force_non_generator=True)
 liftedloop = LiftedLoop(lifted_ir, typingctx, targetctx, flags, locals)
 callblock = _loop_lift_modify_call_block(liftedloop, blocks[loopinfo.callfrom], loopinfo.inputs, loopinfo.outputs, loopinfo.returnto)
 for k in loopblockkeys:
  del blocks[k]
 blocks[loopinfo.callfrom] = callblock
 return liftedloop

def _loop_lift_modify_blocks ( func_ir , loopinfo , blocks , typingctx , targetctx , flags , locals ) : from numba . dispatcher import LiftedLoop loop = loopinfo . loop loopblockkeys = ( ( set ( loop . body ) | set ( loop . entries ) ) | set ( loop . exits ) ) loopblocks = dict ( ( ( k , blocks [ k ] . copy ( ) ) for k in loopblockkeys ) ) _loop_lift_prepare_loop_func ( loopinfo , loopblocks ) lifted_ir = func_ir . derive ( blocks = loopblocks , arg_names = tuple ( loopinfo . inputs ) , arg_count = len ( loopinfo . inputs ) , force_non_generator = True ) liftedloop = LiftedLoop ( lifted_ir , typingctx , targetctx , flags , locals ) callblock = _loop_lift_modify_call_block ( liftedloop , blocks [ loopinfo . callfrom ] , loopinfo . inputs , loopinfo . outputs , loopinfo . returnto ) for k in loopblockkeys : del blocks [ k ] blocks [ loopinfo . callfrom ] = callblock return liftedloop
modify the block inplace to call to the lifted-loop .