[pypy-svn] r70501 - in pypy/branch/loop-invariant-decorator/pypy/jit: backend metainterp

cfbolz at codespeak.net cfbolz at codespeak.net
Mon Jan 11 15:13:22 CET 2010


Author: cfbolz
Date: Mon Jan 11 15:13:21 2010
New Revision: 70501

Modified:
   pypy/branch/loop-invariant-decorator/pypy/jit/backend/model.py
   pypy/branch/loop-invariant-decorator/pypy/jit/metainterp/resoperation.py
Log:
Add a new operation CALL_LOOPINVARIANT. The operation behaves exactly like CALL.
The idea is that the backend never has to generate code for this operation,
because the optimizer turns it into a normal CALL.


Modified: pypy/branch/loop-invariant-decorator/pypy/jit/backend/model.py
==============================================================================
--- pypy/branch/loop-invariant-decorator/pypy/jit/backend/model.py	(original)
+++ pypy/branch/loop-invariant-decorator/pypy/jit/backend/model.py	Mon Jan 11 15:13:21 2010
@@ -209,6 +209,9 @@
     def do_call(self, args, calldescr):
         raise NotImplementedError
 
+    def do_call_loopinvariant(self, args, calldescr):
+        return self.do_call(args, calldescr)
+
     def do_cond_call_gc_wb(self, args, calldescr):
         if args[0].getint() & args[1].getint():
             self.do_call(args[2:], calldescr)

Modified: pypy/branch/loop-invariant-decorator/pypy/jit/metainterp/resoperation.py
==============================================================================
--- pypy/branch/loop-invariant-decorator/pypy/jit/metainterp/resoperation.py	(original)
+++ pypy/branch/loop-invariant-decorator/pypy/jit/metainterp/resoperation.py	Mon Jan 11 15:13:21 2010
@@ -226,6 +226,7 @@
     '_CANRAISE_FIRST', # ----- start of can_raise operations -----
     'CALL',
     'CALL_MAY_FORCE',
+    'CALL_LOOPINVARIANT',
     'OOSEND',                     # ootype operation
     '_CANRAISE_LAST', # ----- end of can_raise operations -----
 



More information about the Pypy-commit mailing list