tree-ssa bootstrap failure on Alpha

Diego Novillo dnovillo@redhat.com
Wed Jun 4 12:17:00 GMT 2003


On Tue, 2003-06-03 at 17:01, Falk Hueffner wrote:

> the bootstrap fails as follows:
> 
Thanks.  Fixed with the attached patch.  Jeff's patch to avoid
gimplifying an already gimplified expression triggered a bug in the
gimplification of CALL_EXPRs.

The problem is that there are some machine-dependent builtins that we
refuse to gimplify because the back ends typically want those builtins
to have specific arguments (this used to trigger compilation problems on
IA64).  So, we refuse to gimplify those CALL_EXPRs.

Before, the is_simple_call_expr predicate would just return 'true' on MD
builtins and then the gimplifier would proceed to mark the builtin as
non-gimple in simplify_call_expr.  But now, we have the short circuit
that will refuse to gimplify expressions that are already in gimple
form.

The patch moves the code to mark the CALL_EXPR non-gimple into the
is_simple_call_expr predicate.  I'm not sure I like having a predicate
with such a side-effect, but I see no other obvious place to move this
code to.  Jason, any suggestions?


Diego.
-------------- next part --------------
2003-06-03  Diego Novillo  <dnovillo@redhat.com>

	* gimplify.c (simplify_call_expr): Move code to mark MD builtins
	non-simplifiable...
	* tree-simple.c (is_simple_call_expr): ... here.


Index: gimplify.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/Attic/gimplify.c,v
retrieving revision 1.1.2.50
diff -d -u -p -r1.1.2.50 gimplify.c
--- gimplify.c	3 Jun 2003 16:02:27 -0000	1.1.2.50
+++ gimplify.c	4 Jun 2003 04:15:52 -0000
@@ -1372,15 +1372,6 @@ simplify_call_expr (expr_p, pre_p, post_
     abort ();
 #endif
 
-  /* Some builtins cannot be simplified because they require specific
-     arguments (e.g., MD builtins).  */
-  if (!is_simplifiable_builtin (*expr_p))
-    {
-      /* Mark the whole expression not simplifiable.  */
-      mark_not_simple (expr_p);
-      return;
-    }
-
   /* This may be a call to a builtin function.
 
      Builtin function calls may be transformed into different
Index: tree-simple.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/Attic/tree-simple.c,v
retrieving revision 1.1.4.38
diff -d -u -p -r1.1.4.38 tree-simple.c
--- tree-simple.c	2 Jun 2003 17:51:05 -0000	1.1.4.38
+++ tree-simple.c	4 Jun 2003 04:15:52 -0000
@@ -452,9 +452,15 @@ is_simple_call_expr (t)
     return 0;
 
   /* Some builtins cannot be simplified because the require specific
-     arguments.  */
+     arguments (e.g., MD builtins).  */
   if (!is_simplifiable_builtin (t))
-    return 1;
+    {
+      /* Mark the CALL_EXPR not simplifiable so that optimizers don't
+         assume anything about it.  Return nonzero to prevent any more
+	 gimplification on this expression.  */
+      mark_not_simple (&t);
+      return 1;
+    }
 
   return (is_simple_id (TREE_OPERAND (t, 0))
           && is_simple_arglist (TREE_OPERAND (t, 1)));


More information about the Gcc-patches mailing list