This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCHv2] Fixing m68hc11 reorg after dataflow merge
- From: Kenneth Zadeck <zadeck at naturalbridge dot com>
- To: Rask Ingemann Lambertsen <rask at sygehus dot dk>
- Cc: "Seongbae Park (ëìë, ææå)" <seongbae dot park at gmail dot com>, gcc-patches at gcc dot gnu dot org, Stephane Carrez <stcarrez at nerim dot fr>
- Date: Tue, 19 Jun 2007 16:46:03 -0400
- Subject: Re: [PATCHv2] Fixing m68hc11 reorg after dataflow merge
- References: <20070616093026.GP5690@sygehus.dk> <ab3a61990706161325w48311cc6pbc61f9fa528a08e5@mail.gmail.com> <20070616235925.GU5690@sygehus.dk> <20070619203701.GN5690@sygehus.dk>
Rask Ingemann Lambertsen wrote:
> On Sun, Jun 17, 2007 at 01:59:25AM +0200, Rask Ingemann Lambertsen wrote:
>
>> On Sat, Jun 16, 2007 at 01:25:33PM -0700, Seongbae Park (ëìë, ææå) wrote:
>>
>>> On 6/16/07, Rask Ingemann Lambertsen <rask@sygehus.dk> wrote:
>>>
>>>> I need some help making m68hc11_reorg() work after the dataflow merge,
>>>> in particular this bit:
>>>>
>> [snip]
>>
>>
>>> Try:
>>>
>>> df_note_add_problem ();
>>> df_analyze ();
>>>
>
> As suggested by Kenneth Zadeck[1], I have added a call to
> df_remove_problem (df_note).
>
> With this patch, I can at least build cc1. It dies compiling libgcc,
>
> /n/08/rask/src/gcc/libgcc/../gcc/libgcc2.c: In function '__muldi3':
> /n/08/rask/src/gcc/libgcc/../gcc/libgcc2.c:566: internal compiler error: in df_refs_verify, at df-scan.c:4066
>
> but it is a start. Ok for trunk?
>
> [1] http://gcc.gnu.org/ml/gcc/2007-06/msg00536.html
>
> 2007-06-19 Rask Ingemann Lambertsen <rask@sygehus.dk>
>
> * config/m68hc11/m68hc11.c: Include dataflow header file.
> (m68hc11_reorg): Port to dataflow.
>
> Index: config/m68hc11/m68hc11.c
> ===================================================================
> --- config/m68hc11/m68hc11.c (revision 125852)
> +++ config/m68hc11/m68hc11.c (working copy)
> @@ -59,6 +59,7 @@ Note:
> #include "reload.h"
> #include "target.h"
> #include "target-def.h"
> +#include "df.h"
>
> static void emit_move_after_reload (rtx, rtx, rtx);
> static rtx simplify_logical (enum machine_mode, int, rtx, rtx *);
> @@ -5004,7 +5005,7 @@ static void
> m68hc11_reorg (void)
> {
> int split_done = 0;
> - rtx insn, first;
> + rtx first;
>
> z_replacement_completed = 0;
> z_reg = gen_rtx_REG (HImode, HARD_Z_REGNUM);
> @@ -5036,29 +5037,9 @@ m68hc11_reorg (void)
> description to use the best assembly directives. */
> if (optimize)
> {
> - /* Before recomputing the REG_DEAD notes, remove all of them.
> - This is necessary because the reload_cse_regs() pass can
> - have replaced some (MEM) with a register. In that case,
> - the REG_DEAD that could exist for that register may become
> - wrong. */
> - for (insn = first; insn; insn = NEXT_INSN (insn))
> - {
> - if (INSN_P (insn))
> - {
> - rtx *pnote;
> -
> - pnote = ®_NOTES (insn);
> - while (*pnote != 0)
> - {
> - if (REG_NOTE_KIND (*pnote) == REG_DEAD)
> - *pnote = XEXP (*pnote, 1);
> - else
> - pnote = &XEXP (*pnote, 1);
> - }
> - }
> - }
> -
> - life_analysis (PROP_REG_INFO | PROP_DEATH_NOTES);
> + df_note_add_problem ();
> + df_analyze ();
> + df_remove_problem (df_note);
> }
>
> z_replacement_completed = 2;
>
>
>
check it in,
open a bugzilla with this and assign it to me.
make sure to include a configure string and if possible, a .i file where
it fails.