[pypy-svn] r35867 - in pypy/dist/pypy: jit/goal rpython/lltypesystem

ac at codespeak.net ac at codespeak.net
Mon Dec 18 22:00:55 CET 2006


Author: ac
Date: Mon Dec 18 22:00:54 2006
New Revision: 35867

Modified:
   pypy/dist/pypy/jit/goal/targetjit.py
   pypy/dist/pypy/rpython/lltypesystem/lloperation.py
Log:
(arigo, pedronis, arre) Do normal backendopts after timeshifting.



Modified: pypy/dist/pypy/jit/goal/targetjit.py
==============================================================================
--- pypy/dist/pypy/jit/goal/targetjit.py	(original)
+++ pypy/dist/pypy/jit/goal/targetjit.py	Mon Dec 18 22:00:54 2006
@@ -8,12 +8,21 @@
 class __extend__(TranslationDriver):
     __metaclass__ = extendabletype
 
+    def task_prehannotatebackendopt(self):
+        from pypy.translator.backendopt.all import backend_optimizations
+        backend_optimizations(self.translator,
+                              inline_threshold=0,
+                              merge_if_blocks=False)
+    #
+    task_prehannotatebackendopt = taskdef(task_prehannotatebackendopt,
+                                         [TranslationDriver.RTYPE],
+                                         "Backendopt before Hint-annotate")
     def task_hintannotate(self):
         from pypy.jit.goal import jitstep
         jitstep.hintannotate(self)
     #
     task_hintannotate = taskdef(task_hintannotate,
-                                [TranslationDriver.BACKENDOPT],
+                                ['prehannotatebackendopt'],
                                 "Hint-annotate")
 
     def task_timeshift(self):
@@ -35,8 +44,6 @@
         return super(PyPyJITTarget, self).target(driver, args)
 
     def handle_config(self, config):
-        config.translation.backendopt.inline_threshold = 0
-        config.translation.backendopt.merge_if_blocks = False
         config.translation.fork_before = 'hintannotate'
 
     def handle_translate_config(self, translateconfig):

Modified: pypy/dist/pypy/rpython/lltypesystem/lloperation.py
==============================================================================
--- pypy/dist/pypy/rpython/lltypesystem/lloperation.py	(original)
+++ pypy/dist/pypy/rpython/lltypesystem/lloperation.py	Mon Dec 18 22:00:54 2006
@@ -320,7 +320,7 @@
     'direct_fieldptr':      LLOp(canfold=True),
     'direct_arrayitems':    LLOp(canfold=True),
     'direct_ptradd':        LLOp(canfold=True),
-    'cast_opaque_ptr':      LLOp(canfold=True),
+    'cast_opaque_ptr':      LLOp(sideeffects=False),
 
     # __________ address operations __________
 



More information about the Pypy-commit mailing list