This is the mail archive of the gcc-patches@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]

Re: [PATCH] Re: REG_DEAD/REG_EQUIV problem.


> On Thu, 1 Feb 2001, Alan Modra wrote:
> 
> > (insn 17 15 21 (set (reg/v:DI 69)
> >         (mem/u:DI (lo_sum:DI (reg:DI 70)
> >                 (unspec:DI[ 
> >                         (symbol_ref/v/f:DI ("*L$C0001"))
> >                     ]  0)) 0)) 83 {*pa.md:2368} (insn_list 15 (nil))
> >     (expr_list:REG_EQUIV (mem/u:DI (lo_sum:DI (reg:DI 70)
> >                 (unspec:DI[ 
> >                         (symbol_ref/v/f:DI ("*L$C0001"))
> >                     ]  0)) 0)
> >         (expr_list:REG_DEAD (reg:DI 70)
> >             (nil))))
> 
> Whee, maybe I'll be a gcc hacker one day.
> 
> This fixes the problem for me.  I've no idea whether it's the ideal
> solution - it may well be possible and desirable to prevent these
> conflicting notes being issued.
> 
> gcc/ChangeLog
>	* rtlanal.c (reg_death_note_p): New function.
> 	(reg_mentioned_dies): New function.
> 	* rtl.h (reg_mentioned_dies): Declare.
> 	* reload1.c (reload): Don't set reg_equiv_memory_loc for an insn
> 	that references memory via a reg that dies.

I tried this patch together with
<http://gcc.gnu.org/ml/gcc-patches/2001-02/msg00012.html> and
<http://gcc.gnu.org/ml/gcc-bugs/2001-01/msg00743.html>.

The good news is that I was able to do a complete bootstrap with -fPIC
under hpux 10.20.  However, there is still a related problem:

Executing on host: /xxx/gnu/gcc-2.97/objdir/gcc/xgcc -B/xxx/gnu/gcc-2.97/objdir/gcc/ /xxx/gnu/gcc-2.97/gcc/testsuite/gcc.c-torture/execute/941014-1.c  -w  -O0  -lm   -fPIC -o /xxx/gnu/gcc-2.97/objdir/gcc/testsuite/941014-1.x0    (timeout = -1)
/xxx/gnu/gcc-2.97/gcc/testsuite/gcc.c-torture/execute/941014-1.c: In function `main':
/xxx/gnu/gcc-2.97/gcc/testsuite/gcc.c-torture/execute/941014-1.c:15: Insn does not satisfy its constraints:
(insn 89 34 92 (set (reg:SI 100)
        (reg:SI 20 %r20)) 69 {*pa.md:2099} (nil)
    (nil))
/xxx/gnu/gcc-2.97/gcc/testsuite/gcc.c-torture/execute/941014-1.c:15: Internal compiler error in extract_constrain_insn_cached, at recog.c:2127
Please submit a full bug report, with preprocessed source if appropriate.
See <URL:http://www.gnu.org/software/gcc/bugs.html> for instructions.
compiler exited with status 1

This is the intiital rtl that causes the problem:

(insn 31 29 32 (set (reg:SI 100)
        (mem/u:SI (lo_sum:SI (reg:SI 100)
                (unspec:SI[ 
                        (symbol_ref/u:SI ("*L$C0000"))
                    ]  0)) 0)) -1 (nil)
    (nil))

(insn 32 31 34 (set (reg:SI 99)
        (reg:SI 100)) -1 (nil)
    (nil))

(insn 34 32 36 (set (reg:SI 100)
        (mem:SI (reg:SI 99) 0)) -1 (nil)
    (nil))

(insn 36 34 37 (set (reg:SI 99)
        (reg:SI 100)) -1 (nil)
    (nil))
  
For some reason reg:SI 100 doesn't get a hard register in the greg pass.

Dave
-- 
J. David Anglin                                  dave.anglin@nrc.ca
National Research Council of Canada              (613) 990-0752 (FAX: 952-6605)

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