Author: Antonio Cuni <[email protected]>
Branch: autoreds
Changeset: r58964:263d3356e0d1
Date: 2012-11-16 22:07 +0100
http://bitbucket.org/pypy/pypy/changeset/263d3356e0d1/
Log: don't rely on threshold but explicitly set _always_inline_
diff --git a/pypy/jit/metainterp/test/test_warmspot.py
b/pypy/jit/metainterp/test/test_warmspot.py
--- a/pypy/jit/metainterp/test/test_warmspot.py
+++ b/pypy/jit/metainterp/test/test_warmspot.py
@@ -474,7 +474,7 @@
self.check_resops(int_add=4)
self.check_trace_count(2)
- def test_inline_in_portal_exception(self):
+ def test_jitdriver_inline_exception(self):
# this simulates what happens in a real case scenario: inside the next
# we have a call which we cannot inline (e.g. space.next in the case
# of W_InterpIterable), but we need to put it in a try/except block.
diff --git a/pypy/jit/metainterp/warmspot.py b/pypy/jit/metainterp/warmspot.py
--- a/pypy/jit/metainterp/warmspot.py
+++ b/pypy/jit/metainterp/warmspot.py
@@ -294,6 +294,7 @@
func = getattr(callee, 'func', None)
_inline_jit_merge_point_ = getattr(func,
'_inline_jit_merge_point_', None)
if _inline_jit_merge_point_:
+ _inline_jit_merge_point_._always_inline_ = True
op_jmp_call, jmp_graph = get_jmp_call(callee,
_inline_jit_merge_point_)
#
# now we move the op_jmp_call from callee to caller, just
@@ -312,7 +313,7 @@
new_portals.add(caller)
# inline them!
- inline_threshold =
self.translator.config.translation.backendopt.inline_threshold
+ inline_threshold = 0.1 # we rely on the _always_inline_ set above
auto_inlining(self.translator, inline_threshold, new_callgraph)
# make a fresh copy of the JitDriver in all newly created
_______________________________________________
pypy-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit