[pypy-svn] r17543 - in pypy/dist/pypy/translator/llvm: . module

ericvrp at codespeak.net ericvrp at codespeak.net
Tue Sep 13 20:27:17 CEST 2005


Author: ericvrp
Date: Tue Sep 13 20:27:16 2005
New Revision: 17543

Modified:
   pypy/dist/pypy/translator/llvm/codewriter.py
   pypy/dist/pypy/translator/llvm/module/support.py
Log:
fix to remove unused casts (probably introduced by remove_simple_malloc)


Modified: pypy/dist/pypy/translator/llvm/codewriter.py
==============================================================================
--- pypy/dist/pypy/translator/llvm/codewriter.py	(original)
+++ pypy/dist/pypy/translator/llvm/codewriter.py	Tue Sep 13 20:27:16 2005
@@ -136,6 +136,8 @@
         self.indent("invoke %s void %s(%s) to label %%%s except label %%%s" % (cconv, functionref, ", ".join(arglist), label, except_label))
 
     def cast(self, targetvar, fromtype, fromvar, targettype):
+    	if fromtype == 'void' and targettype == 'void':
+		return
         self.indent("%(targetvar)s = cast %(fromtype)s "
                         "%(fromvar)s to %(targettype)s" % locals())
 

Modified: pypy/dist/pypy/translator/llvm/module/support.py
==============================================================================
--- pypy/dist/pypy/translator/llvm/module/support.py	(original)
+++ pypy/dist/pypy/translator/llvm/module/support.py	Tue Sep 13 20:27:16 2005
@@ -264,7 +264,7 @@
 extfunctions["%main"] = [(), """
 int %main(int %argc, sbyte** %argv) {
 entry:
-    %pypy_argv = call fastcc %RPyListOfString* %pypy_ll_newlist__Ptr_GcStruct_listLlT_Signed.2(int 0)
+    %pypy_argv = call fastcc %RPyListOfString* %pypy_ll_newlist__Ptr_GcStruct_listLlT_Signed(int 0)
     br label %no_exit
 
 no_exit:



More information about the Pypy-commit mailing list