This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: ICE in delete_output_reload


Ian Lance Taylor wrote:
Michael Eager <eager@eagercon.com> writes:

I'm trying to understand an assertion failure in reload1.c:8135.

In delete_output_reload(), I'm getting an assertion failure
in this code:

   for (i1 = reg_equiv_alt_mem_list [REGNO (reg)]; i1; i1 = XEXP (i1, 1))
     {
       gcc_assert (!rtx_equal_p (XEXP (i1, 0), substed));
       n_occurrences += count_occurrences (PATTERN (insn), XEXP (i1, 0), 0);
     }

Sure enough, i1 matches substed.

reg_equiv_memory_loc[regno] (the source for substed) is the same as
reg_equiv_alt_mem_list[regno].

Why is this unexpected and what might cause it?

It's unexpected because you shouldn't see the same memory location in reg_equiv_memory_loc and req_equiv_alt_mem_list. The memory location which holds the value should not also be an alternate location for the value.

The check is there because if they are equal for some reason we will
miscount occurrences.  We already counted occurrences in SUBSTED.

I realize that this is probably not very helpful.

:-)


I patched the code to only count the occurrence if the
locations are different.  Any idea if that has adverse
consequences?

In case it helps, this is where reg_equiv_alt_mem came in:

http://gcc.gnu.org/ml/gcc-patches/2006-07/msg01136.html
http://gcc.gnu.org/ml/gcc-patches/2006-08/msg00070.html

Thanks. I think I saw one or perhaps both. I'll look again.


Has anyone ever done a description of reg allocation or reload?

--
Michael Eager	 eager@eagercon.com
1960 Park Blvd., Palo Alto, CA 94306  650-325-8077


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]