This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: RFC: Remove REG_WAS_0.
- From: Kazu Hirata <kazu at cs dot umass dot edu>
- To: stcarrez at nerim dot fr
- Cc: gcc-patches at gcc dot gnu dot org, denisc at overta dot ru, marekm at linux dot org dot pl, dave dot anglin at nrc dot ca
- Date: Sun, 15 Jun 2003 20:00:11 -0400 (EDT)
- Subject: Re: RFC: Remove REG_WAS_0.
- References: <20030615.052014.102581274.kazu@cs.umass.edu><3EECC372.2060307@nerim.fr>
Hi Stephane,
> Instead of having such REG_WAS_ note, I would have liked to have
> access to a rtx giving the value of each register. Similar to what
> we do in cse reg where we keep up the last rtx assigned to each reg.
The part of m68hc11.c that uses REG_WAS_0 tries to achieve the same
effect as move2add, except that you do so on registers that satisfy
H_REG_P only as you point out in
http://gcc.gnu.org/ml/gcc-patches/2003-04/msg00057.html
I'll do something so you can cleanly use move2add, which should be
better because even if REG_WAS_0 worked as you expected, you could
only go from (const_int 0) to either (const_int 1) or (const_int -1),
whereas with move2add, you can go from (const_int N) to (const_int N +
1) or (const_int N - 1) for any integer N using inc, inx, and iny
instructions. Correct?
Kazu Hirata