[pypy-svn] r70445 - in pypy/branch/morearraycopy/pypy: jit/metainterp rlib
arigo at codespeak.net
arigo at codespeak.net
Thu Jan 7 21:50:06 CET 2010
Author: arigo
Date: Thu Jan 7 21:50:05 2010
New Revision: 70445
Modified:
pypy/branch/morearraycopy/pypy/jit/metainterp/codewriter.py
pypy/branch/morearraycopy/pypy/jit/metainterp/policy.py
pypy/branch/morearraycopy/pypy/rlib/rgc.py
Log:
Fix, and add a nice way to print the traceback of calls from
codewriter.py.
Modified: pypy/branch/morearraycopy/pypy/jit/metainterp/codewriter.py
==============================================================================
--- pypy/branch/morearraycopy/pypy/jit/metainterp/codewriter.py (original)
+++ pypy/branch/morearraycopy/pypy/jit/metainterp/codewriter.py Thu Jan 7 21:50:05 2010
@@ -86,12 +86,22 @@
if leave_graph is not None:
todo.append(leave_graph)
self.candidate_graphs = seen = set(todo)
+
+ def callers():
+ graph = top_graph
+ print graph
+ while graph in coming_from:
+ graph = coming_from[graph]
+ print '<-', graph
+ coming_from = {}
+
while todo:
top_graph = todo.pop()
for _, op in top_graph.iterblockops():
if op.opname not in ("direct_call", "indirect_call", "oosend"):
continue
kind = self.guess_call_kind(op, is_candidate)
+ # use callers() to view the calling chain in pdb
if kind != "regular":
continue
for graph in self.graphs_from(op, is_candidate):
@@ -100,6 +110,7 @@
assert is_candidate(graph)
todo.append(graph)
seen.add(graph)
+ coming_from[graph] = top_graph
return self.candidate_graphs
def graphs_from(self, op, is_candidate=None):
Modified: pypy/branch/morearraycopy/pypy/jit/metainterp/policy.py
==============================================================================
--- pypy/branch/morearraycopy/pypy/jit/metainterp/policy.py (original)
+++ pypy/branch/morearraycopy/pypy/jit/metainterp/policy.py Thu Jan 7 21:50:05 2010
@@ -49,8 +49,6 @@
def look_inside_graph(self, graph):
from pypy.translator.backendopt.support import find_backedges
contains_loop = bool(find_backedges(graph))
- unsupported = contains_unsupported_variable_type(graph,
- self.supports_floats)
try:
func = graph.func
except AttributeError:
@@ -61,7 +59,8 @@
contains_loop = contains_loop and not getattr(
func, '_jit_unroll_safe_', False)
- res = see_function and not unsupported
+ res = see_function and not contains_unsupported_variable_type(graph,
+ self.supports_floats)
if res and contains_loop:
self.unsafe_loopy_graphs.add(graph)
return res and not contains_loop
Modified: pypy/branch/morearraycopy/pypy/rlib/rgc.py
==============================================================================
--- pypy/branch/morearraycopy/pypy/rlib/rgc.py (original)
+++ pypy/branch/morearraycopy/pypy/rlib/rgc.py Thu Jan 7 21:50:05 2010
@@ -364,6 +364,7 @@
keepalive_until_here(source)
keepalive_until_here(dest)
ll_arraycopy._annspecialcase_ = 'specialize:ll'
+ll_arraycopy._jit_look_inside_ = False
def no_collect(func):
func._dont_inline_ = True
More information about the Pypy-commit
mailing list