Commits

Sven Hager committed 7af2636

more cleanups

Comments (0)

Files changed (3)

pypy/jit/backend/ppc/codebuilder.py

 from pypy.jit.backend.ppc.arch import (IS_PPC_32, WORD, IS_PPC_64)
 import pypy.jit.backend.ppc.register as r
 from pypy.jit.backend.llsupport.asmmemmgr import BlockBuilderMixin
-from pypy.jit.backend.llsupport.regalloc import RegisterManager
 from pypy.rpython.lltypesystem import lltype, rffi
 from pypy.jit.metainterp.resoperation import rop
 from pypy.tool.udir import udir

pypy/jit/backend/ppc/ppc_assembler.py

                                               FPR_SAVE_AREA,
                                               FLOAT_INT_CONVERSION, FORCE_INDEX,
                                               SIZE_LOAD_IMM_PATCH_SP)
-from pypy.jit.backend.ppc.helper.assembler import (gen_emit_cmp_op, 
-                                                   decode64, Saved_Volatiles)
+from pypy.jit.backend.ppc.helper.assembler import Saved_Volatiles
 from pypy.jit.backend.ppc.helper.regalloc import _check_imm_arg
 import pypy.jit.backend.ppc.register as r
 import pypy.jit.backend.ppc.condition as c
 from pypy.jit.metainterp.history import AbstractFailDescr
 from pypy.jit.backend.llsupport.asmmemmgr import MachineDataBlockWrapper
-from pypy.jit.backend.llsupport.regalloc import compute_vars_longevity
 from pypy.jit.backend.model import CompiledLoopToken
 from pypy.rpython.lltypesystem import lltype, rffi, llmemory
 from pypy.jit.metainterp.resoperation import rop
         bytecode = rffi.cast(rffi.UCHARP, mem_loc)
         num = 0
         value = 0
-        fvalue = 0
         code_inputarg = False
         while True:
             code = rffi.cast(lltype.Signed, bytecode[0])
 
         operations = self.setup(looptoken, operations)
         self.startpos = self.mc.currpos()
-        longevity = compute_vars_longevity(inputargs, operations)
         regalloc = Regalloc(assembler=self, frame_manager=PPCFrameManager())
 
         regalloc.prepare_loop(inputargs, operations)
-        regalloc_head = self.mc.currpos()
 
         start_pos = self.mc.currpos()
         looptoken._ppc_loop_code = start_pos
         operations = self.setup(looptoken, operations)
         assert isinstance(faildescr, AbstractFailDescr)
         code = self._find_failure_recovery_bytecode(faildescr)
-        frame_depth = faildescr._ppc_frame_depth
         arglocs = self.decode_inputargs(code)
         if not we_are_translated():
             assert len(inputargs) == len(arglocs)

pypy/jit/backend/ppc/regalloc.py

             arglocs.append(t)
         return arglocs
 
-    # from ../x86/regalloc.py:791
-    def _unpack_fielddescr(self, fielddescr):
-        assert isinstance(fielddescr, BaseFieldDescr)
-        ofs = fielddescr.offset
-        size = fielddescr.get_field_size(self.cpu.translate_support_code)
-        ptr = fielddescr.is_pointer_field()
-        return ofs, size, ptr
-
-    # from ../x86/regalloc.py:779
-    def _unpack_arraydescr(self, arraydescr):
-        assert isinstance(arraydescr, BaseArrayDescr)
-        cpu = self.cpu
-        ofs_length = arraydescr.get_ofs_length(cpu.translate_support_code)
-        ofs = arraydescr.get_base_size(cpu.translate_support_code)
-        size = arraydescr.get_item_size(cpu.translate_support_code)
-        ptr = arraydescr.is_array_of_pointers()
-        scale = 0
-        while (1 << scale) < size:
-            scale += 1
-        assert (1 << scale) == size
-        return size, scale, ofs, ofs_length, ptr
-
     def prepare_force_spill(self, op):
         self.force_spill_var(op.getarg(0))
         return []