'Loop lifting analysis and transformation'

def frontend_looplift(self):

    loop_flags = self.flags.copy()
    outer_flags = self.flags.copy()
    outer_flags.unset('enable_looplift')
    loop_flags.unset('enable_looplift')
    if (not self.flags.enable_pyobject_looplift):
        loop_flags.unset('enable_pyobject')
    (main, loops) = transforms.loop_lifting(self.func_ir, typingctx=self.typingctx, targetctx=self.targetctx, locals=self.locals, flags=loop_flags)
    if loops:
        if (config.DEBUG_FRONTEND or config.DEBUG):
            for loop in loops:
                print('Lifting    loop', loop.get_source_location())
        cres = compile_ir(self.typingctx, self.targetctx, main, self.args, self.return_type, outer_flags, self.locals, lifted=tuple(loops), lifted_from=None)
        return cres
