[pypy-commit] pypy default: add an include_guard_not_invalidated option which defaults to true
bivab
noreply at buildbot.pypy.org
Wed Jul 3 17:19:49 CEST 2013
Author: David Schneider <david.schneider at picle.org>
Branch:
Changeset: r65171:a75c05b8580e
Date: 2013-07-03 17:14 +0200
http://bitbucket.org/pypy/pypy/changeset/a75c05b8580e/
Log: add an include_guard_not_invalidated option which defaults to true
diff --git a/pypy/module/pypyjit/test_pypy_c/model.py b/pypy/module/pypyjit/test_pypy_c/model.py
--- a/pypy/module/pypyjit/test_pypy_c/model.py
+++ b/pypy/module/pypyjit/test_pypy_c/model.py
@@ -131,18 +131,19 @@
def has_id(self, id):
return id in self.ids
- def _ops_for_chunk(self, chunk):
+ def _ops_for_chunk(self, chunk, include_guard_not_invalidated):
for op in chunk.operations:
- if op.name != 'debug_merge_point':
+ if op.name != 'debug_merge_point' and \
+ (op.name != 'guard_not_invalidated' or include_guard_not_invalidated):
yield op
- def _allops(self, opcode=None):
+ def _allops(self, opcode=None, include_guard_not_invalidated=True):
opcode_name = opcode
for chunk in self.flatten_chunks():
opcode = chunk.getopcode()
if opcode_name is None or \
(opcode and opcode.__class__.__name__ == opcode_name):
- for op in self._ops_for_chunk(chunk):
+ for op in self._ops_for_chunk(chunk, include_guard_not_invalidated):
yield op
else:
for op in chunk.operations:
@@ -162,7 +163,7 @@
def print_ops(self, *args, **kwds):
print self.format_ops(*args, **kwds)
- def _ops_by_id(self, id, opcode=None):
+ def _ops_by_id(self, id, include_guard_not_invalidated=True, opcode=None):
opcode_name = opcode
target_opcodes = self.ids[id]
loop_ops = self.allops(opcode)
@@ -170,7 +171,7 @@
opcode = chunk.getopcode()
if opcode in target_opcodes and (opcode_name is None or
opcode.__class__.__name__ == opcode_name):
- for op in self._ops_for_chunk(chunk):
+ for op in self._ops_for_chunk(chunk, include_guard_not_invalidated):
if op in loop_ops:
yield op
diff --git a/pypy/module/pypyjit/test_pypy_c/test_containers.py b/pypy/module/pypyjit/test_pypy_c/test_containers.py
--- a/pypy/module/pypyjit/test_pypy_c/test_containers.py
+++ b/pypy/module/pypyjit/test_pypy_c/test_containers.py
@@ -223,5 +223,5 @@
log = self.run(main, [1000])
assert log.result == main(1000)
loop, = log.loops_by_filename(self.filepath)
- ops = loop.ops_by_id('getitem')
+ ops = loop.ops_by_id('getitem', include_guard_not_invalidated=False)
assert log.opnames(ops) == []
More information about the pypy-commit
mailing list