This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: peep2_next_insn returns PEEP2_EOB
- From: Richard Henderson <rth at redhat dot com>
- To: Kaz Kojima <kkojima at rr dot iij4u dot or dot jp>
- Cc: gcc at gcc dot gnu dot org, joern dot rennecke at st dot com, aoliva at redhat dot com
- Date: Thu, 20 Oct 2005 10:06:21 -0700
- Subject: Re: peep2_next_insn returns PEEP2_EOB
- References: <20051020.235530.23714900.kkojima@rr.iij4u.or.jp>
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 <paul@codesourcery.com>
* 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~