[pypy-svn] r14094 - pypy/dist/pypy/translator/llvm2

hpk at codespeak.net hpk at codespeak.net
Sat Jul 2 15:54:26 CEST 2005


Author: hpk
Date: Sat Jul  2 15:54:26 2005
New Revision: 14094

Modified:
   pypy/dist/pypy/translator/llvm2/funcnode.py
Log:
fix actual invocation of backend optimizations  
(untested right here on osx) 



Modified: pypy/dist/pypy/translator/llvm2/funcnode.py
==============================================================================
--- pypy/dist/pypy/translator/llvm2/funcnode.py	(original)
+++ pypy/dist/pypy/translator/llvm2/funcnode.py	Sat Jul  2 15:54:26 2005
@@ -2,7 +2,7 @@
 from pypy.objspace.flow.model import Block, Constant, Variable, Link
 from pypy.objspace.flow.model import flatten, mkentrymap, traverse
 from pypy.rpython import lltype
-from pypy.translator.llvm2.cfgtransform import prepare_graph
+from pypy.translator.backendoptimization import remove_same_as 
 from pypy.translator.llvm2.node import LLVMNode
 from pypy.translator.llvm2.log import log 
 log = log.funcnode
@@ -38,8 +38,9 @@
     def __init__(self, db, const_ptr_func):
         self.db = db
         self.ref = "%" + const_ptr_func.value._obj._name
-        self.graph = prepare_graph(const_ptr_func.value._obj.graph,
-                                   db._translator)
+        self.graph = const_ptr_func.value._obj.graph 
+        remove_same_as(self.graph) 
+        
     def __str__(self):
         return "<FuncNode %r>" %(self.ref,)
     
@@ -53,6 +54,7 @@
                 for op in node.operations:
                     map(self.db.prepare_arg, op.args)
                     self.db.prepare_arg(op.result)
+        assert self.graph, "cannot traverse"
         traverse(visit, self.graph)
         self._issetup = True
     # ______________________________________________________________________



More information about the Pypy-commit mailing list