This is the mail archive of the
mailing list for the GCC project.
Re: [patch i386]: Combine memory and indirect jump
- From: Jeff Law <law at redhat dot com>
- To: Kai Tietz <ktietz70 at googlemail dot com>
- Cc: Richard Henderson <rth at redhat dot com>, Steven Bosscher <stevenb dot gcc at gmail dot com>, GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Tue, 17 Jun 2014 13:26:03 -0600
- Subject: Re: [patch i386]: Combine memory and indirect jump
- Authentication-results: sourceware.org; auth=none
- References: <CAEwic4brJeBvoe+J5ss=Qo+=qoo-=2nV0FnjdUxBhm-fV4aqeQ at mail dot gmail dot com> <CABu31nNwUoLaAo0QcD-3O1QYhBWpLsYuH0cMS-XOgz2W+8KMAA at mail dot gmail dot com> <CAEwic4Zwd4HECD+kxtkouyA3Urbyzh2NFar7kZ5XLdNnUK9w6A at mail dot gmail dot com> <CAEwic4anzQysfHqfQGgKF_Hu-c_hLY+mkWr2CzERVe=gQ5AWRw at mail dot gmail dot com> <539B1A7F dot 8020200 at redhat dot com> <539B1F1E dot 3000809 at redhat dot com> <539B1FA4 dot 4070803 at redhat dot com> <CAEwic4aDiZ_42ddHSKjoLHhrb6oMhds1p0jJZQHFMFc6x4_DfQ at mail dot gmail dot com>
On 06/13/14 10:59, Kai Tietz wrote:
So can you tell us why this sample code misses opportunities? Otherwise
we have to dig into it ourselves to tease out that information.
2014-06-13 17:58 GMT+02:00 Jeff Law <firstname.lastname@example.org>:
On 06/13/14 09:56, Richard Henderson wrote:
On 06/13/2014 08:36 AM, Jeff Law wrote:
So you may have answered this already, but why can't this be a combiner
Until pass_duplicate_computed_gotos, we (intentionally) have a single
branch in the entire function. This vastly reduces the size of the CFG.
Ah, the factoring bits. Should have known.
Peep2 is currently running before d_c_g, so currently Kai can't solve this
problem in peep2.
I don't think peep2 should run after sched2, but I'll bet we can reorder
a bit so that d_c_g runs before peep2.
Yea, seems worth a try.
Well, I tested to put the second sched2 pass before the sched2 pass.
That works in general. There are just some opportunties which weren't
caught then. I attached a sample, which demonstrates that pretty
well. I noticed that I had to put that pass behind reload blocks was
necessary for better hit-rate of the peephole optimization.
I think we're zeroing in on a path to move d_c_g before peep2, but I'd
like to have a clearer understanding of why we'd still be missing
opportunities. If we can avoid running peep2 twice, that'd be good.