[PATCH] Fix ICE after sel-sched merge
Eric Botcazou
ebotcazou@adacore.com
Wed Sep 17 11:01:00 GMT 2008
> * haifa-sched.c (dep_cost_1): Recognize the producer even if the
> consumer is an asm. Add comment why this is important.
> (choose_ready): Add comment to the "INSN_CODE (insn) >= 0 ||
> recog_memoized (insn) < 0" assert.
OK with the following modifications:
> Index: haifa-sched.c
> ===================================================================
> --- haifa-sched.c (revision 139918)
> +++ haifa-sched.c (working copy)
> @@ -646,21 +646,28 @@
>
> /* Compute cost of dependence LINK.
> This is the number of cycles between instruction issue and
> - instruction results. */
> + instruction results. We also use this function to call
> + recog_memoized on all insns. */
Put the new sentence on a new line starting with a ???.
> int
> dep_cost_1 (dep_t link, dw_t dw)
> {
> - rtx used = DEP_CON (link);
> + rtx used;
> + rtx insn;
> int cost;
>
> + used = DEP_CON (link);
> + insn = DEP_PRO (link);
Put the initializations back in the declarations.
> @@ -2305,6 +2312,8 @@
> {
> insn = ready_element (ready, i);
>
> + /* If this insn is recognizable we should have already
> + recognized it in dep_cost_1. */
> gcc_assert (INSN_CODE (insn) >= 0
>
> || recog_memoized (insn) < 0);
Put an #ifdef ENABLE_CHECKING/#endif around the whole thing and also add a ???
comment along the lines of:
/* If this insn is recognizable we should have already recognized earlier.
??? Not very clear where this is supposed to be done. See dep_cost_1. */
Thanks for fixing this.
--
Eric Botcazou
More information about the Gcc-patches
mailing list