This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Problem with peephole to peephole2 conversion
- From: Richard Henderson <rth at redhat dot com>
- To: Ashwin <ashwin at codito dot com>
- Cc: gcc at gcc dot gnu dot org, abhijit at codito dot com, pranav at codito dot com, ramana at codito dot com, saurabh dot verma at codito dot com
- Date: Thu, 25 Aug 2005 08:55:31 -0700
- Subject: Re: Problem with peephole to peephole2 conversion
- References: <430C7419.80201@codito.com> <20050824170639.GA5376@redhat.com> <430D8230.3000907@codito.com>
On Thu, Aug 25, 2005 at 02:02:48PM +0530, Ashwin wrote:
> However if the pattern happens to be something like this :
>
> op0 = 1
> op0 = op0 leftshift op2
Ah, I see. Well, peep2_reg_dead_p doesn't include "or_set" in its
definition, so it shouldn't do what you're suggesting. I wouldn't
be opposed to adding a new function with this semantics. A
cursory glance across existing uses of the function turn up at least
one instance of
"true_regnum (operands[0]) == true_regnum (operands[2])
|| peep2_reg_dead_p (2, operands[0])"
which for that particular case corresponds to the condition you're
asking for. But it would seem that the vast majority of the time
we do not require the "or_set" semantics.
r~