On Wed, May 25, 2011 at 1:33 PM, Richard Sandiford
<rdsandif...@googlemail.com> wrote:
> "H.J. Lu" <hjl.to...@gmail.com> writes:
>> On Wed, May 25, 2011 at 7:47 AM, Richard Sandiford
>> <richard.sandif...@linaro.org> wrote:
>>> "H.J. Lu" <hjl.to...@gmail.com> writes:
>>>> No one is listed to review genrecog.c.  Could global reviewers comment
>>>> on my patch?
>>>
>>> FWIW, one argument against this form of the change:
>>>
>>> http://gcc.gnu.org/ml/gcc-patches/2011-03/msg02159.html
>>
>> What you suggested is quite intrusive.  I don't believe my approach
>> is more "hackish"/(ASCII-specific) than what we have today.
>
> OK, I suppose I should back my objection up with a patch.
> Rather than use strings, it uses a one-to-one mapping between
> positions and position objects.  I agree it's more intrusive,
> but it's not that much more code.  It also makes some operations
> cheaper.
>
> I diffed the old and new insn-recog.cs on x86_64-linux-gnu.
> The only difference was the removal of some:
>
>  tem = peep2_next_insn (0);
>  x1 = PATTERN (tem);
>
> sequences.  In the old code, these came from make_insn_sequence
> using 'A' as the c_test position for single-instruction peepholes.
> Elsewhere we try to avoid calling peep2_next_insn (0), because its
> pattern is already available as x0, so I think this is an improvement.
> ("tem" and "x1" aren't part of the .md file interface, and AFAICT,
> no .md files are sneakily using them regardless.)
>
> Bootstrapped & regresion-tested on x86_64-linux-gnu.  OK to install?
>
> Is it OK to remove the static forward declarations too?
>
> Richard
>
>
> gcc/
>        PR rtl-optimization/48575
>        * genrecog.c (position_type): New enum.
>        (position): New structure.
>        (decision): Use position structure instead of a string.
>        (root_pos, peep2_insn_pos_list): New variables.
>        (next_position, compare_positions): New functions.
>        (new_decision): Use position structures instead of strings.
>        (maybe_both_true): Likewise.
>        (change_state): Likewise.
>        (write_tree): Likewise.
>        (make_insn_sequence): Likewise.
>

Appreciate it.

Thanks.


-- 
H.J.

Reply via email to