This is the mail archive of the
mailing list for the GCC project.
Re: [PATCH v3, rs6000] Add -mspeculate-indirect-jumps option and implement non-speculating bctr / bctrl
- From: Bill Schmidt <wschmidt at linux dot vnet dot ibm dot com>
- To: Segher Boessenkool <segher at kernel dot crashing dot org>
- Cc: Richard Biener <richard dot guenther at gmail dot com>, GCC Patches <gcc-patches at gcc dot gnu dot org>, David Edelsohn <dje dot gcc at gmail dot com>
- Date: Tue, 16 Jan 2018 08:31:05 -0600
- Subject: Re: [PATCH v3, rs6000] Add -mspeculate-indirect-jumps option and implement non-speculating bctr / bctrl
- Authentication-results: sourceware.org; auth=none
- References: <firstname.lastname@example.org> <CAFiYyc1OuftGmFpN3k+s1T5vuQKJJ6MsP7mgV=Q8n_yjpH_mOw@mail.gmail.com> <20180116121355.GP21977@gate.crashing.org>
On Jan 16, 2018, at 6:13 AM, Segher Boessenkool <email@example.com> wrote:
> On Tue, Jan 16, 2018 at 09:29:13AM +0100, Richard Biener wrote:
>> Did you consider simply removing the tablejump/casesi support so
>> expansion always
>> expands to a balanced tree? At least if we have any knobs to tune we
>> should probably
>> tweak them away from the indirect jump using variants with
> We can generate indirect jumps for other situations so this patch will
> still be needed.
Also, I'm not convinced that a balanced tree for a large jump table
is a slam dunk better performer than this (adding hundreds of poorly
predictable branches that can clog up hardware predictors for, say,
an interpreter loop). I'd want to do some performance testing to look
for crossover points (as you say, tuning knobs). But for smaller tables
this is a good idea.
>> Performance optimization, so shouldn't block this patch - I just
>> thought I should probably
>> mention this.
> Yeah let's get this done first :-)