This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
RE: [PATCH] Target hook for disabling the delay slot filler.
- From: Simon Dardis <Simon dot Dardis at imgtec dot com>
- To: Jeff Law <law at redhat dot com>, Bernd Schmidt <bschmidt at redhat dot com>
- Cc: "gcc-patches at gcc dot gnu dot org" <gcc-patches at gcc dot gnu dot org>
- Date: Thu, 17 Sep 2015 09:52:40 +0000
- Subject: RE: [PATCH] Target hook for disabling the delay slot filler.
- Authentication-results: sourceware.org; auth=none
- References: <B83211783F7A334B926F0C0CA42E32CAF2CF01 at hhmail02 dot hh dot imgtec dot org> <55F82ADF dot 2030905 at redhat dot com> <55F832CF dot 2010406 at redhat dot com>
The profitability of using an ordinary branch over a delay slot branch
depends on how the delay slot is filled. If a delay slot can be filled from
an instruction preceding the branch or instructions proceeding that must be
executed on both sides then it is profitable to use a delay slot branch.
For cases when instructions are chosen from one side of the branch,
the proposed optimization strategy is to not speculatively execute
instructions when ordinary branches could be used. Performance-wise
this avoids executing instructions which the eager delay filler picked
wrongly.
Since most branches have a compact form disabling the eager delay filler
should be no worse than altering it not to fill delay slots in this case.
Thanks,
Simon
-----Original Message-----
From: Jeff Law [mailto:law@redhat.com]
Sent: 15 September 2015 16:02
To: Bernd Schmidt; Simon Dardis; gcc-patches@gcc.gnu.org
Subject: Re: [PATCH] Target hook for disabling the delay slot filler.
On 09/15/2015 08:27 AM, Bernd Schmidt wrote:
> On 09/15/2015 04:19 PM, Simon Dardis wrote:
>> This patch adds a target hook for disabling the eager delay slot
>> filler which when disabled can give better code. No new regressions.
>> Ok to commit?
>
> Hmm. Whether a branch was filled by the simple or eager filler is an
> implementation detail - is there some better way to describe which
> kind of branch is profitable?
And more importantly, it's far better to be able to describe when it is not profitable to use eager filling rather than just disabling it completely.
Jeff