[pypy-commit] pypy small-unroll-improvements: no need to call generalization_of any more

cfbolz noreply at buildbot.pypy.org
Wed Apr 9 21:22:53 CEST 2014


Author: Carl Friedrich Bolz <cfbolz at gmx.de>
Branch: small-unroll-improvements
Changeset: r70510:fbac02bbbb90
Date: 2014-04-09 16:45 +0200
http://bitbucket.org/pypy/pypy/changeset/fbac02bbbb90/

Log:	no need to call generalization_of any more

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
@@ -559,23 +559,21 @@
 
             bad = {}
             debugmsg = 'Did not match '
-            if target.virtual_state.generalization_of(
-                    virtual_state, bad,
-                    cpu = self.optimizer.cpu):
+            try:
+                cpu = self.optimizer.cpu
+                target.virtual_state.generate_guards(virtual_state,
+                                                     values,
+                                                     cpu,
+                                                     extra_guards)
+
                 ok = True
-                debugmsg = 'Matched '
-            else:
-                try:
-                    cpu = self.optimizer.cpu
-                    target.virtual_state.generate_guards(virtual_state,
-                                                         values,
-                                                         cpu,
-                                                         extra_guards)
+                if extra_guards:
+                    debugmsg = 'Guarded to match '
+                else:
+                    debugmsg = 'Matched '
+            except InvalidLoop:
+                continue
 
-                    ok = True
-                    debugmsg = 'Guarded to match '
-                except InvalidLoop:
-                    pass
             assert patchguardop is not None or (extra_guards == [] and len(target.short_preamble) == 1)
 
             target.virtual_state.debug_print(debugmsg, bad)


More information about the pypy-commit mailing list