[pypy-commit] pypy vecopt: removed allocation of comparison objects to track guard comparisons. This is handled by the guard strengthing operation
plan_rich
noreply at buildbot.pypy.org
Mon Jun 8 15:43:41 CEST 2015
Author: Richard Plangger <rich at pasra.at>
Branch: vecopt
Changeset: r77957:3bc0e1fb8db8
Date: 2015-06-08 15:12 +0200
http://bitbucket.org/pypy/pypy/changeset/3bc0e1fb8db8/
Log: removed allocation of comparison objects to track guard comparisons.
This is handled by the guard strengthing operation
diff --git a/rpython/jit/metainterp/optimizeopt/dependency.py b/rpython/jit/metainterp/optimizeopt/dependency.py
--- a/rpython/jit/metainterp/optimizeopt/dependency.py
+++ b/rpython/jit/metainterp/optimizeopt/dependency.py
@@ -810,7 +810,7 @@
class IntegralForwardModification(object):
- """ Calculates integral modifications on an integer box. """
+ """ Calculates integral modifications on integer boxes. """
def __init__(self, memory_refs, index_vars, comparison_vars, invariant_vars):
self.index_vars = index_vars
self.comparison_vars = comparison_vars
@@ -828,21 +828,6 @@
var = self.index_vars[arg] = IndexVar(arg)
return var
- bool_func_source = """
- def operation_{name}(self, op, node):
- box_a0 = op.getarg(0)
- box_a1 = op.getarg(1)
- left = self.index_vars.get(box_a0, None)
- right = self.index_vars.get(box_a1, None)
- box_r = op.result
- self.comparison_vars[box_r] = CompareOperation(op.getopnum(), left, right)
- """
- for name in ['INT_LT', 'INT_LE', 'INT_EQ', 'INT_NE', 'INT_NE',
- 'INT_GT', 'INT_GE', 'UINT_LT', 'UINT_LE', 'UINT_GT',
- 'UINT_GE']:
- exec py.code.Source(bool_func_source.format(name=name)).compile()
- del bool_func_source
-
additive_func_source = """
def operation_{name}(self, op, node):
box_r = op.result
@@ -923,25 +908,6 @@
IntegralForwardModification.inspect_operation = integral_dispatch_opt
del integral_dispatch_opt
-class CompareOperation(object):
- def __init__(self, opnum, lindex_var, rindex_var):
- self.opnum = opnum
- self.lindex_var = lindex_var
- self.rindex_var = rindex_var
-
- def getindex_vars(self):
- if self.lindex_var and self.rindex_var:
- return (self.lindex_var, self.rindex_var)
- elif self.lindex_var:
- return (self.lindex_var, None)
- elif self.rindex_var:
- return (self.rindex_var, None)
- else:
- return (None, None)
-
- def adapt_operation(self, op):
- pass
-
class IndexVar(AbstractValue):
""" IndexVar is an AbstractValue only to ensure that a box can be assigned
to the same variable as an index var.
More information about the pypy-commit
mailing list