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.


Reply via email to