public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
From: Mingjie Xing <mingjie.xing@gmail.com>
To: Chung-Lin Tang <cltang@codesourcery.com>
Cc: gcc@gcc.gnu.org, rdsandiford@googlemail.com
Subject: Re: [MIPS] Test case dspr2-MULT is failed
Date: Thu, 13 Jan 2011 05:50:00 -0000	[thread overview]
Message-ID: <AANLkTinrLck=0R+2aijaVHCAn2fp7JGNhc3nCpM8q-6C@mail.gmail.com> (raw)
In-Reply-To: <4D260AC3.8080105@codesourcery.com>

2011/1/7 Chung-Lin Tang <cltang@codesourcery.com>:
> I analyzed this testcase regression a while earlier; the direct cause of
> this is due to mips_order_regs_for_local_alloc(), which now serves as
> MIPS' ADJUST_REG_ALLOC_ORDER macro.
>
> The mips_order_regs_for_local_alloc() function seems to be written for
> the old local-alloc.c, still left as the deprecated
> ORDER_REGS_FOR_LOCAL_ALLOC macro after the transition to IRA (actually
> not called at all during then), and relatively recently 'revived' after
> a patch by Bernd that created the ADJUST_REG_ALLOC_ORDER macro went in.
>
> So you have a local-alloc.c heuristic working in IRA, which seemed to
> cause these regressions.
>
> Removing mips_order_regs_for_local_alloc() will let this testcase pass;
> of course the real fix should be to review the MIPS reg-ordering logic,
> left for you MIPS people...
>
> Chung-Lin
>

As I can see, mips_order_regs_for_local_alloc() is only used to
reorder $24 (T_REG) for MIPS16.  Since current definition of
REG_ALLOC_ORDER for IRA is not {0,1,2,...} any more, the old loop
code,

  for (i = 0; i < FIRST_PSEUDO_REGISTER; i++)
    reg_alloc_order[i] = i;

in mips_order_regs_for_local_alloc() seems inadequate.  Because this
will override the definition of REG_ALLOC_ORDER.

Anyway, when I tried to rewrite the function to keep the register
order, the testcase is passed, but I can't see the speedup on my port.

Thanks,
Mingjie

  reply	other threads:[~2011-01-13  5:50 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-12-29  8:14 Mingjie Xing
2010-12-31 13:38 ` Richard Sandiford
2011-01-06 18:32   ` Chung-Lin Tang
2011-01-13  5:50     ` Mingjie Xing [this message]
2011-02-18  1:19     ` Fu, Chao-Ying
2011-02-18  6:21       ` Mingjie Xing
2011-02-18  6:43         ` Fu, Chao-Ying

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='AANLkTinrLck=0R+2aijaVHCAn2fp7JGNhc3nCpM8q-6C@mail.gmail.com' \
    --to=mingjie.xing@gmail.com \
    --cc=cltang@codesourcery.com \
    --cc=gcc@gcc.gnu.org \
    --cc=rdsandiford@googlemail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).