[pypy-commit] pypy ppc-jit-backend: more code cleanups
hager
noreply at buildbot.pypy.org
Thu Mar 1 18:25:15 CET 2012
Author: hager <sven.hager at uni-duesseldorf.de>
Branch: ppc-jit-backend
Changeset: r53076:ce1f0e276c60
Date: 2012-03-01 09:24 -0800
http://bitbucket.org/pypy/pypy/changeset/ce1f0e276c60/
Log: more code cleanups
diff --git a/pypy/jit/backend/ppc/codebuilder.py b/pypy/jit/backend/ppc/codebuilder.py
--- a/pypy/jit/backend/ppc/codebuilder.py
+++ b/pypy/jit/backend/ppc/codebuilder.py
@@ -1,27 +1,13 @@
import os
-import struct
from pypy.jit.backend.ppc.ppc_form import PPCForm as Form
from pypy.jit.backend.ppc.ppc_field import ppc_fields
-from pypy.jit.backend.ppc.regalloc import (TempInt, PPCFrameManager,
- Regalloc)
from pypy.jit.backend.ppc.assembler import Assembler
-from pypy.jit.backend.ppc.symbol_lookup import lookup
-from pypy.jit.backend.ppc.arch import (IS_PPC_32, WORD, NONVOLATILES,
- GPR_SAVE_AREA, IS_PPC_64)
-from pypy.jit.backend.ppc.helper.assembler import gen_emit_cmp_op
+from pypy.jit.backend.ppc.arch import (IS_PPC_32, WORD, IS_PPC_64)
import pypy.jit.backend.ppc.register as r
-import pypy.jit.backend.ppc.condition as c
-from pypy.jit.metainterp.history import (Const, ConstPtr, JitCellToken,
- TargetToken, AbstractFailDescr)
-from pypy.jit.backend.llsupport.asmmemmgr import (BlockBuilderMixin, AsmMemoryManager, MachineDataBlockWrapper)
-from pypy.jit.backend.llsupport.regalloc import (RegisterManager,
- compute_vars_longevity)
-from pypy.jit.backend.llsupport import symbolic
-from pypy.jit.backend.model import CompiledLoopToken
-from pypy.rpython.lltypesystem import lltype, rffi, rstr, llmemory
+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.jit.metainterp.history import (BoxInt, ConstInt, ConstPtr,
- ConstFloat, Box, INT, REF, FLOAT)
from pypy.tool.udir import udir
from pypy.rlib.objectmodel import we_are_translated
@@ -1181,17 +1167,6 @@
assert self.r0_in_use
self.r0_in_use = False
- def _dump_trace(self, addr, name, formatter=-1):
- if not we_are_translated():
- if formatter != -1:
- name = name % formatter
- dir = udir.ensure('asm', dir=True)
- f = dir.join(name).open('wb')
- data = rffi.cast(rffi.CCHARP, addr)
- for i in range(self.currpos()):
- f.write(data[i])
- f.close()
-
class scratch_reg(object):
def __init__(self, mc):
self.mc = mc
diff --git a/pypy/jit/backend/ppc/helper/assembler.py b/pypy/jit/backend/ppc/helper/assembler.py
--- a/pypy/jit/backend/ppc/helper/assembler.py
+++ b/pypy/jit/backend/ppc/helper/assembler.py
@@ -1,9 +1,8 @@
import pypy.jit.backend.ppc.condition as c
-from pypy.rlib.rarithmetic import r_uint, r_longlong, intmask
+from pypy.rlib.rarithmetic import intmask
from pypy.jit.backend.ppc.arch import (MAX_REG_PARAMS, IS_PPC_32, WORD,
BACKCHAIN_SIZE)
from pypy.jit.metainterp.history import FLOAT
-from pypy.rlib.unroll import unrolling_iterable
import pypy.jit.backend.ppc.register as r
from pypy.rpython.lltypesystem import rffi, lltype
diff --git a/pypy/jit/backend/ppc/helper/regalloc.py b/pypy/jit/backend/ppc/helper/regalloc.py
--- a/pypy/jit/backend/ppc/helper/regalloc.py
+++ b/pypy/jit/backend/ppc/helper/regalloc.py
@@ -1,5 +1,4 @@
from pypy.jit.metainterp.history import ConstInt
-from pypy.rlib.objectmodel import we_are_translated
from pypy.jit.metainterp.history import Box
IMM_SIZE = 2 ** 15 - 1
@@ -63,8 +62,6 @@
def f(self, op):
boxes = op.getarglist()
b0, b1 = boxes
- imm_b0 = check_imm_box(b0)
- imm_b1 = check_imm_box(b1)
l0 = self._ensure_value_is_boxed(b0, boxes)
l1 = self._ensure_value_is_boxed(b1, boxes)
locs = [l0, l1]
diff --git a/pypy/jit/backend/ppc/locations.py b/pypy/jit/backend/ppc/locations.py
--- a/pypy/jit/backend/ppc/locations.py
+++ b/pypy/jit/backend/ppc/locations.py
@@ -1,4 +1,4 @@
-from pypy.jit.metainterp.history import INT, FLOAT, REF
+from pypy.jit.metainterp.history import INT, FLOAT
import sys
# XXX import from arch.py, currently we have a circular import
diff --git a/pypy/jit/backend/ppc/regalloc.py b/pypy/jit/backend/ppc/regalloc.py
--- a/pypy/jit/backend/ppc/regalloc.py
+++ b/pypy/jit/backend/ppc/regalloc.py
@@ -1,17 +1,15 @@
from pypy.jit.backend.llsupport.regalloc import (RegisterManager, FrameManager,
TempBox, compute_vars_longevity)
from pypy.jit.backend.ppc.arch import (WORD, MY_COPY_OF_REGS)
-from pypy.jit.backend.ppc.jump import (remap_frame_layout_mixed,
- remap_frame_layout)
+from pypy.jit.backend.ppc.jump import remap_frame_layout
from pypy.jit.backend.ppc.locations import imm
from pypy.jit.backend.ppc.helper.regalloc import (_check_imm_arg,
- check_imm_box,
- prepare_cmp_op,
- prepare_unary_int_op,
- prepare_binary_int_op,
- prepare_binary_int_op_with_imm,
- prepare_unary_cmp)
-from pypy.jit.metainterp.history import (Const, ConstInt, ConstFloat, ConstPtr,
+ prepare_cmp_op,
+ prepare_unary_int_op,
+ prepare_binary_int_op,
+ prepare_binary_int_op_with_imm,
+ prepare_unary_cmp)
+from pypy.jit.metainterp.history import (Const, ConstInt, ConstPtr,
Box, BoxPtr,
INT, REF, FLOAT)
from pypy.jit.metainterp.history import JitCellToken, TargetToken
@@ -20,9 +18,7 @@
from pypy.rpython.lltypesystem import rffi, lltype, rstr
from pypy.jit.backend.llsupport import symbolic
from pypy.jit.backend.llsupport.descr import ArrayDescr
-from pypy.jit.codewriter.effectinfo import EffectInfo
import pypy.jit.backend.ppc.register as r
-from pypy.jit.codewriter import heaptracker
from pypy.jit.backend.llsupport.descr import unpack_arraydescr
from pypy.jit.backend.llsupport.descr import unpack_fielddescr
from pypy.jit.backend.llsupport.descr import unpack_interiorfielddescr
diff --git a/pypy/jit/backend/ppc/runner.py b/pypy/jit/backend/ppc/runner.py
--- a/pypy/jit/backend/ppc/runner.py
+++ b/pypy/jit/backend/ppc/runner.py
@@ -1,22 +1,12 @@
import py
from pypy.rpython.lltypesystem import lltype, llmemory, rffi
-from pypy.rpython.lltypesystem.lloperation import llop
from pypy.rpython.llinterp import LLInterpreter
-from pypy.rlib.objectmodel import we_are_translated
-from pypy.jit.metainterp import history, compile
-from pypy.jit.metainterp.history import BoxPtr
-from pypy.jit.backend.x86.assembler import Assembler386
from pypy.jit.backend.ppc.arch import FORCE_INDEX_OFS
-from pypy.jit.backend.x86.profagent import ProfileAgent
from pypy.jit.backend.llsupport.llmodel import AbstractLLCPU
-from pypy.jit.backend.x86 import regloc
-from pypy.jit.backend.x86.support import values_array
from pypy.jit.backend.ppc.ppc_assembler import AssemblerPPC
-from pypy.jit.backend.ppc.arch import NONVOLATILES, GPR_SAVE_AREA, WORD
-from pypy.jit.backend.ppc.regalloc import PPCRegisterManager, PPCFrameManager
+from pypy.jit.backend.ppc.arch import WORD
from pypy.jit.backend.ppc.codebuilder import PPCBuilder
from pypy.jit.backend.ppc import register as r
-import sys
from pypy.tool.ansi_print import ansi_log
log = py.log.Producer('jitbackend')
More information about the pypy-commit
mailing list