Author: Maciej Fijalkowski <fij...@gmail.com> Branch: optresult-unroll Changeset: r79307:4b8a4aee4962 Date: 2015-08-30 23:51 +0200 http://bitbucket.org/pypy/pypy/changeset/4b8a4aee4962/
Log: disable max_guards apparently I have no idea what it is doing diff --git a/rpython/jit/metainterp/optimizeopt/unroll.py b/rpython/jit/metainterp/optimizeopt/unroll.py --- a/rpython/jit/metainterp/optimizeopt/unroll.py +++ b/rpython/jit/metainterp/optimizeopt/unroll.py @@ -171,15 +171,12 @@ else: debug_print("Retrace count reached, jumping to preamble") return self.jump_to_preamble(cell_token, jump_op, info) - maxguards = warmrunnerdescr.memory_manager.max_retrace_guards - guard_count = 0 - for op in self.optimizer._newoperations: - if op.is_guard(): - guard_count += 1 - if guard_count > maxguards: - target_token = cell_token.target_tokens[0] - target_token.targeting_jitcell_token.retraced_count = sys.maxint - return self.jump_to_preamble(cell_token, jump_op, info) + #maxguards = warmrunnerdescr.memory_manager.max_retrace_guards + #guard_count = self.count_guards(self.optimizer._newoperations) + #if guard_count > maxguards: + # target_token = cell_token.target_tokens[0] + # target_token.targeting_jitcell_token.retraced_count = sys.maxint + # return self.jump_to_preamble(cell_token, jump_op, info) exported_state = self.export_state(start_label, operations[-1].getarglist(), info.inputargs) @@ -345,6 +342,13 @@ return effectinfo.extraeffect != effectinfo.EF_ELIDABLE_CANNOT_RAISE return False + def count_guards(self, ops): + guard_count = 0 + for op in ops: + if op.is_guard(): + guard_count += 1 + return guard_count + class UnrollInfo(LoopInfo): """ A state after optimizing the peeled loop, contains the following: diff --git a/rpython/jit/metainterp/test/test_recursive.py b/rpython/jit/metainterp/test/test_recursive.py --- a/rpython/jit/metainterp/test/test_recursive.py +++ b/rpython/jit/metainterp/test/test_recursive.py @@ -1111,7 +1111,7 @@ assert main(0, 1) == 2095 res = self.meta_interp(main, [0, 1], inline=True) assert res == 2095 - self.check_resops(call_assembler_i=12) + self.check_resops(call_assembler_n=12) def test_inline_recursion_limit(self): driver = JitDriver(greens = ["threshold", "loop"], reds=["i"]) @@ -1137,7 +1137,7 @@ res1 = portal(10, True, 0) res2 = self.meta_interp(portal, [10, True, 0], inline=True) assert res1 == res2 - self.check_resops(call_assembler=2) + self.check_resops(call_assembler_i=2) res1 = portal(9, True, 0) res2 = self.meta_interp(portal, [9, True, 0], inline=True) _______________________________________________ pypy-commit mailing list pypy-commit@python.org https://mail.python.org/mailman/listinfo/pypy-commit