[PATCH] Fix powerpc bootstrap when using --enable-checking=rtl

David Edelsohn dje@watson.ibm.com
Mon Nov 20 17:03:00 GMT 2006


+/* Return the dest of a store insn.  */
+
+static rtx
+get_store_dest (rtx pat)
+{
+  gcc_assert (is_store_insn1 (pat));
+
+  if (GET_CODE (pat) == SET)
+    return SET_DEST (pat);
+  else if (GET_CODE (pat) == PARALLEL)
+    {
+      int i;
+
+      for (i = 0; i < XVECLEN (pat, 0); i++)
+	if (is_store_insn1 (XVECEXP (pat, 0, i)))
+	  return XVECEXP (pat, 0, i);

	Is it overly wasteful to call is_store_insn1() here?  PAT already
is known to be a PARALLEL and I don't think one can have recursive
PARALLELs.  I guess the abstraction isn't horrible.

+    }
+  /* We shouldn't get here, because we should have either a simple
+     store insn or a store with update which are covered above.  */
+  gcc_assert (0);

	Should't this be gcc_unreachable()?

+}
+
 /* Returns whether the dependence between INSN and NEXT is considered
    costly by the given target.  */

Thanks, David



More information about the Gcc-patches mailing list