This is the mail archive of the
mailing list for the GCC project.
Re: [PATCH, i386] Add prefixes avoidance tuning for silvermont target
- From: Ilya Enkovich <enkovich dot gnu at gmail dot com>
- To: Uros Bizjak <ubizjak at gmail dot com>
- Cc: "gcc-patches at gcc dot gnu dot org" <gcc-patches at gcc dot gnu dot org>, Jakub Jelinek <jakub at redhat dot com>
- Date: Tue, 15 Jul 2014 12:25:32 +0400
- Subject: Re: [PATCH, i386] Add prefixes avoidance tuning for silvermont target
- Authentication-results: sourceware.org; auth=none
- References: <CAFULd4ZGWB72AH44rh3KHKtjJo+uFqFUk6i0T-pX4MaCDNu4eA at mail dot gmail dot com> <CAMbmDYZKq6CJa3tGtAseXzQZceNBSQBQevbgKbHHsyy6vnD8VQ at mail dot gmail dot com> <CAFULd4ZMK9nUwjD670DweBtrY-Ro8D1YomnLkddm7vuz=sm+cg at mail dot gmail dot com> <CAMbmDYYKv+CYsaYH+_gABQomB3o5rfZ+dbO=iiUbKmxjqmKiDg at mail dot gmail dot com> <CAFULd4aL+MYcYH4+bgkCi7=0U9c6GOyzyP8=25X_PcZa4dHWWw at mail dot gmail dot com> <CAMbmDYb167cYiOx5qVuOy=2hxBV6oU_TJWkKzusqTuugyBpHUw at mail dot gmail dot com> <CAFULd4ZtADqy=_jgX5iaAmqpnc+kd3ZaK_8M0kRnGzywHxQ8nA at mail dot gmail dot com>
2014-07-14 23:58 GMT+04:00 Uros Bizjak <firstname.lastname@example.org>:
> On Thu, Jul 3, 2014 at 3:38 PM, Ilya Enkovich <email@example.com> wrote:
>> 2014-07-03 16:07 GMT+04:00 Uros Bizjak <firstname.lastname@example.org>:
>>> On Thu, Jul 3, 2014 at 1:50 PM, Ilya Enkovich <email@example.com> wrote:
>>>> I didn't find a nice way to fix peephole2 patterns to take register
>>>> constraints into account. Is there any way to do it?
>>> Use REX_SSE_REGNO_P (REGNO (operands[...])) in the insn C constraint.
>> Peephole doesn't know whether it works with tuned instruction or not,
>> right? I would need to mark all instructions I modify with some
>> attribute and then check for it in peephole.
>>>> Also fully restrict xmm8-15 does not seem right. It is just costly
>>>> but not fully disallowed.
>>> As said earlier, you can try "Ya*x" as a constraint.
>> I tried it. It does not seem to affect allocation much. I do not see
>> any gain on targeted tests.
> Strange, because the documentation claims:
> Says that the following character should be ignored when choosing
> register preferences. '*' has no effect on the meaning of the
> constraint as a constraint, and no effect on reloading. For LRA
> '*' additionally disparages slightly the alternative if the
> following character matches the operand.
> Let me rethink this a bit. Prehaps we could reconsider Jakub's
> proposal with "Ya,!x" (with two alternatives). IIRC this approach was
> needed for some MMX alternatives, where we didn't want RA to allocate
> a MMX register when the value could be passed in integer regs, but the
> value was still allowed in MMX register.
That's is what my patch already does, but with '?' instead of '!'.
Will try it with '!' and see if there is a big difference.
> As a side note, I'll investigate pushdf pattern, if it needs to be
> updated. The proposed approach is from reload era, and things changed
> substantially since then.