[pypy-svn] pypy jit-short-preamble: cleanup

hakanardo commits-noreply at bitbucket.org
Sat Jan 15 10:20:22 CET 2011


Author: Hakan Ardo <hakan at debian.org>
Branch: jit-short-preamble
Changeset: r40707:ad166b18243f
Date: 2011-01-15 10:19 +0100
http://bitbucket.org/pypy/pypy/changeset/ad166b18243f/

Log:	cleanup

diff --git a/pypy/jit/metainterp/optimizeopt/unroll.py b/pypy/jit/metainterp/optimizeopt/unroll.py
--- a/pypy/jit/metainterp/optimizeopt/unroll.py
+++ b/pypy/jit/metainterp/optimizeopt/unroll.py
@@ -447,15 +447,9 @@
         elif opnum == rop.CALL:
             effectinfo = descr.get_extra_info()
             if effectinfo is not None:
-                if effectinfo.extraeffect == EffectInfo.EF_LOOPINVARIANT:
+                if effectinfo.extraeffect == EffectInfo.EF_LOOPINVARIANT or \
+                   effectinfo.extraeffect == EffectInfo.EF_PURE:
                     return True
-            #arg = op.getarg(0)
-            #if isinstance(arg, Const):
-            #    key = make_hashable_int(arg.getint())
-            #    resvalue = self.optimizer.loop_invariant_results.get(key,None)
-            #    if resvalue:
-            #        return True # This once was CALL_LOOPINVARIANT
-            #                    # FIXME: Can we realy be sure of that?
         elif opnum == rop.GUARD_NO_EXCEPTION:
             return True # FIXME: Is this safe?
         return False


More information about the Pypy-commit mailing list