[pypy-svn] r79601 - pypy/branch/jit-unroll-loops/pypy/jit/metainterp

hakanardo at codespeak.net hakanardo at codespeak.net
Sat Nov 27 20:36:24 CET 2010


Author: hakanardo
Date: Sat Nov 27 20:36:23 2010
New Revision: 79601

Modified:
   pypy/branch/jit-unroll-loops/pypy/jit/metainterp/compile.py
   pypy/branch/jit-unroll-loops/pypy/jit/metainterp/pyjitpl.py
Log:
have the interpreter call the first preamble and dont compile the second

Modified: pypy/branch/jit-unroll-loops/pypy/jit/metainterp/compile.py
==============================================================================
--- pypy/branch/jit-unroll-loops/pypy/jit/metainterp/compile.py	(original)
+++ pypy/branch/jit-unroll-loops/pypy/jit/metainterp/compile.py	Sat Nov 27 20:36:23 2010
@@ -82,8 +82,8 @@
 
     if loop.preamble.operations is not None:
         send_loop_to_backend(metainterp_sd, loop, "loop")
-        send_loop_to_backend(metainterp_sd, loop.preamble, "entry bridge")
         if full_preamble_needed or not loop.preamble.token.short_preamble:
+            send_loop_to_backend(metainterp_sd, loop.preamble, "entry bridge")
             insert_loop_token(old_loop_tokens, loop.preamble.token)
             jitdriver_sd.warmstate.attach_unoptimized_bridge_from_interp(
                 greenkey, loop.preamble.token)

Modified: pypy/branch/jit-unroll-loops/pypy/jit/metainterp/pyjitpl.py
==============================================================================
--- pypy/branch/jit-unroll-loops/pypy/jit/metainterp/pyjitpl.py	(original)
+++ pypy/branch/jit-unroll-loops/pypy/jit/metainterp/pyjitpl.py	Sat Nov 27 20:36:23 2010
@@ -1843,6 +1843,8 @@
                                 bridge_arg_boxes):
         num_green_args = self.jitdriver_sd.num_green_args
         original_inputargs = self.history.inputargs
+        greenkey = original_boxes[:num_green_args]
+        old_loop_tokens = self.get_compiled_merge_points(greenkey)
         original_operations = self.history.operations
         self.history.inputargs = original_boxes[num_green_args:]
         greenkey = original_boxes[:num_green_args]
@@ -1866,7 +1868,7 @@
         assert target_loop_token is not None
 
         self.history.operations = original_operations
-        raise GenerateMergePoint(live_arg_boxes, target_loop_token)
+        raise GenerateMergePoint(live_arg_boxes, old_loop_tokens[0])
 
     def compile_done_with_this_frame(self, exitbox):
         self.gen_store_back_in_virtualizable()



More information about the Pypy-commit mailing list