[tree-ssa] Gimplifying Java

Andrew Haley aph@redhat.com
Fri Jun 13 16:42:00 GMT 2003


This fixes the bug that prevents inlining.

We were producing

    call *(fpointer_t)(vtable_element_t)&function

this patch changes this in the direct case to

    call *(fpointer_t)&function

Andrew.

2003-06-13  Andrew Haley  <aph@redhat.com>

	* parse.y (patch_invoke): remove unnecessary NOP_EXPR.

Index: parse.y
===================================================================
RCS file: /cvs/gcc/gcc/gcc/java/parse.y,v
retrieving revision 1.387.2.22
diff -u -r1.387.2.22 parse.y
--- parse.y	3 Jun 2003 16:52:07 -0000	1.387.2.22
+++ parse.y	13 Jun 2003 16:20:23 -0000
@@ -10667,7 +10681,10 @@
 	}
 
       /* Ensure self_type is initialized, (invokestatic). FIXME */
-      func = build1 (NOP_EXPR, build_pointer_type (TREE_TYPE (method)), func);
+      if (TREE_CODE (func) == ADDR_EXPR)
+	TREE_TYPE (func) = build_pointer_type (TREE_TYPE (method));
+      else
+	func = build1 (NOP_EXPR, build_pointer_type (TREE_TYPE (method)), func);
     }
 
   TREE_TYPE (patch) = TREE_TYPE (TREE_TYPE (method));



More information about the Gcc-patches mailing list