This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Problem with peephole to peephole2 conversion
- From: Ashwin <ashwin at codito dot com>
- To: gcc at gcc dot gnu dot org
- Cc: abhijit at codito dot com, pranav at codito dot com, ramana at codito dot com, saurabh dot verma at codito dot com
- Date: Wed, 24 Aug 2005 18:50:25 +0530
- Subject: Problem with peephole to peephole2 conversion
I am converting peepholes to peephole2's. However, after compiling the
kernel with the patched build, I get size regressions. Although the
obj-dump shows that the peephole should have matched, it is actually not
getting matched. This is because the pattern to be matched is not
present at the time of peephole2 pass (it is a 3 insn pattern, out of
which 2 are together, but the third one is put in later by the
scheduler) The pattern matches in the original peephole pass because the
peephole pass happens just before assembly generation, when the 3 insns
are present together. Has anybody encountered a similar problem? Does
this mean that peephole2 and peephole both should be kept on.
Secondly, after taking a look at other ports, i realised that all are
using peep2_dead_reg_p instead of dead_or_set_p to check if a register
is dead. The former is smarter than the later in the sense that it also
checks if the current insn "sets" the register which is to be verified
as dead. So, why do other ports use peep2_reg_dead_p instead of
dead_or_set_p. Pls help me to find the advantages of using
peep2_reg_dead_p over its counterpart.