[pypy-commit] pypy vecopt2: creating basic classes needed
plan_rich
noreply at buildbot.pypy.org
Tue May 5 09:45:17 CEST 2015
Author: Richard Plangger <rich at pasra.at>
Branch: vecopt2
Changeset: r77070:489fa3b98d90
Date: 2015-03-11 16:04 +0100
http://bitbucket.org/pypy/pypy/changeset/489fa3b98d90/
Log: creating basic classes needed
diff --git a/rpython/jit/metainterp/optimizeopt/vectorize.py b/rpython/jit/metainterp/optimizeopt/vectorize.py
--- a/rpython/jit/metainterp/optimizeopt/vectorize.py
+++ b/rpython/jit/metainterp/optimizeopt/vectorize.py
@@ -132,6 +132,19 @@
self.vectorized = True
+ def vectorize_trace(self, loop):
+ """ Implementation of the algorithm introduced by Larsen. Refer to
+ '''Exploiting Superword Level Parallelism
+ with Multimedia Instruction Sets'''
+ for more details.
+ """
+
+
+ # was not able to vectorize
+ return False
+
+
+
class LoopVectorizeChecker(object):
def __init__(self):
@@ -157,19 +170,35 @@
default=LoopVectorizeChecker.default_count)
LoopVectorizeChecker.inspect_operation = dispatch_opt
-"""
-Implementation of the algorithm introduced by Larsen. Refer to
-'Exploiting Superword Level Parallelism with Multimedia Instruction Sets'
-for more details.
-"""
class Pack(object):
- pass
+ """ A pack is a set of n statements that are:
+ * isomorphic
+ * independant
+ Statements are named operations in the code.
+ """
+ def __init__(self, ops):
+ self.operations = ops
-class Pair(object):
+class Pair(Pack):
+ """ A special Pack object with only two statements. """
def __init__(self, left_op, right_op):
assert isinstance(left_op, rop.ResOperation)
assert isinstance(right_op, rop.ResOperation)
self.left_op = left_op
self.right_op = right_op
+ Pack.__init__(self, [left_op, right_op])
+
+class MemoryAccess(object):
+ def __init__(self, array, origin, offset):
+ self.array = array
+ self.origin = origin
+ self.offset = offset
+
+ def is_adjacent_to(self, mem_acc):
+ if self.array == mem_acc.array:
+ # TODO
+ return self.offset == mem_acc.offset
+
+
More information about the pypy-commit
mailing list