On Thu, Oct 20, 2005 at 11:55:30PM +0900, Kaz Kojima wrote:
> Is it assumed that peep2_next_insn never return PEEP2_EOB in change_state?
Yes. We check peep2_current_count to validate this.
> If so, what target bug is most likely?
Dunno. This peep2_current_count is a relatively recent change.
2005-08-27 Paul Brook <[EMAIL PROTECTED]>
* genrecog.c (enum decision_type): Add DT_num_insns.
(struct decision_test): Add u.num_insns.
(add_to_sequence): Add DT_num_insns test.
(maybe_both_true_2, nodes_identical_1): Handle DT_num_insns.
(write_cond, debug_decision_2): Ditto.
(change_state): Assume peep2_next_insn never fails.
Remove "afterward" argument.
(write afterward, write_tree): Update to match.
* recog.c (peep2_current_count): New variable.
(peep2_next_insn): Check it.
(peephole2_optimize): Set peep2_current_count.
* recog.h (peep2_current_count): Declare.
It's possible it's buggy.
r~