[pypy-commit] pypy memoryerror: some more changes
plan_rich
noreply at buildbot.pypy.org
Mon Aug 24 11:06:11 CEST 2015
Author: Richard Plangger <rich at pasra.at>
Branch: memoryerror
Changeset: r79184:e967b7cba547
Date: 2015-08-24 10:51 +0200
http://bitbucket.org/pypy/pypy/changeset/e967b7cba547/
Log: some more changes
diff --git a/rpython/jit/metainterp/compile.py b/rpython/jit/metainterp/compile.py
--- a/rpython/jit/metainterp/compile.py
+++ b/rpython/jit/metainterp/compile.py
@@ -532,7 +532,7 @@
class ResumeGuardDescr(ResumeDescr):
_attrs_ = ('rd_numb', 'rd_count', 'rd_consts', 'rd_virtuals',
'rd_frame_info_list', 'rd_pendingfields', 'rd_accum_list',
- 'status')
+ 'status', 'version')
rd_numb = lltype.nullptr(NUMBERING)
rd_count = 0
@@ -543,6 +543,7 @@
rd_accum_list = None
status = r_uint(0)
+ version = None
def copy_all_attributes_from(self, other):
assert isinstance(other, ResumeGuardDescr)
@@ -747,11 +748,6 @@
class CompileLoopVersionDescr(ResumeGuardDescr):
guard_opnum = rop.GUARD_EARLY_EXIT
- operations = None
- inputargs = None
- faillocs = None
- version = None
-
def handle_fail(self, deadframe, metainterp_sd, jitdriver_sd):
assert 0, "this guard must never fail"
diff --git a/rpython/jit/metainterp/history.py b/rpython/jit/metainterp/history.py
--- a/rpython/jit/metainterp/history.py
+++ b/rpython/jit/metainterp/history.py
@@ -893,6 +893,7 @@
#
self.operations = self.operations[:-1] + loop.operations
self.versions = loop.versions
+ loop.versions = None
if loop.quasi_immutable_deps:
self.quasi_immutable_deps.update(loop.quasi_immutable_deps)
@@ -910,10 +911,6 @@
return None
def snapshot(self):
- if len(self.versions) == 0:
- # create a root version, simplyfies the code in compile.py
- self.versions.append(LoopVersion(None))
- root_version = self.versions[0]
version = LoopVersion(self)
self.versions.append(version)
return version
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
@@ -42,7 +42,9 @@
if user_code and user_loop_bail_fast_path(loop, warmstate):
return
# the original loop (output of optimize_unroll)
+ loop.versions.append(LoopVersion(None))
version = loop.snapshot()
+ old_loop_len = len(loop.operations)
try:
debug_start("vec-opt-loop")
metainterp_sd.logger_noopt.log_loop(loop.inputargs, loop.operations, -2, None, None, "pre vectorize")
@@ -65,7 +67,7 @@
#
nano = int((end-start)*10.0**9)
debug_print("# vecopt factor: %d opcount: (%d -> %d) took %dns" % \
- (opt.unroll_count+1, len(version.operations), len(loop.operations), nano))
+ (opt.unroll_count+1, old_loop_len, len(loop.operations), nano))
debug_stop("vec-opt-loop")
#
except NotAVectorizeableLoop:
@@ -87,8 +89,7 @@
from rpython.rtyper.lltypesystem import lltype
from rpython.rtyper.lltypesystem.lloperation import llop
llop.debug_print_traceback(lltype.Void)
- else:
- raise
+ raise e
def user_loop_bail_fast_path(loop, warmstate):
""" In a fast path over the trace loop: try to prevent vecopt
@@ -628,7 +629,8 @@
descr = None
guard_true_false = tgt_op.getopnum() in (rop.GUARD_TRUE, rop.GUARD_FALSE)
if guard_true_false:
- descr = CompileLoopVersionDescr()
+ #descr = CompileLoopVersionDescr()
+ descr = ResumeAtLoopHeaderDescr()
else:
descr = ResumeAtLoopHeaderDescr()
if olddescr:
More information about the pypy-commit
mailing list