This is the mail archive of the
mailing list for the GCC project.
Re: [x86,PATCH] Simple fix for Atom LEA splitting.
- From: Uros Bizjak <ubizjak at gmail dot com>
- To: Yuri Rumyantsev <ysrumyan at gmail dot com>
- Cc: gcc-patches <gcc-patches at gcc dot gnu dot org>, Igor Zamyatin <izamyatin at gmail dot com>
- Date: Mon, 16 Sep 2013 15:46:19 +0200
- Subject: Re: [x86,PATCH] Simple fix for Atom LEA splitting.
- Authentication-results: sourceware.org; auth=none
- References: <CAEoMCqSR-0sWVgxZz43LRQGCzfOVvqDNv6O6UFy_UBKOnZjUEA at mail dot gmail dot com>
On Mon, Sep 16, 2013 at 2:50 PM, Yuri Rumyantsev <email@example.com> wrote:
> Hi All,
> Here is 1-line fix which improves Atom performance by better distance
> estimation. We got ~20% speedup on one of bench from eembc2.0 with
> this fix.
> Bootstrapping and regression testing were successful for x86-64.
> Is it OK for trunk?
> 2013-09-16 Yuri Rumyantsev <firstname.lastname@example.org>
> * config/i386/i386.c (distance_agu_use_in_bb) : Proper initialization
> of 'prev' var to get better distance estimation.
Please rewrite this part to:
basic_block bb = NULL;
rtx next = start;
rtx prev = NULL;
if (start != NULL_RTX)
bb = BLOCK_FOR_INSN (start);
if (start != BB_HEAD (bb))
prev = insn;
A comment would be also nice here. It took me quite some time to
decipher the code.
OK with these changes.