public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "vmakarov at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug target/39723] [4.8/4.9/5 Regression][cond-optab] worse code with long long shifts on v850
Date: Fri, 06 Feb 2015 20:21:00 -0000	[thread overview]
Message-ID: <bug-39723-4-yaTxCTs1TT@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-39723-4@http.gcc.gnu.org/bugzilla/>

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=39723

Vladimir Makarov <vmakarov at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |vmakarov at gcc dot gnu.org

--- Comment #9 from Vladimir Makarov <vmakarov at gcc dot gnu.org> ---
(In reply to Jeffrey A. Law from comment #8)

Thanks for the investigation, Jeff.  Coalescing in IRA is done by register cost
propagation.  Unfortunately, p46 gets a hard register (12) first, then p53 is
processed and it gets reg 10 as p53 occurs in insn 14 involving reg 10.

  12: r10:SI=call [r70:SI] argc:0
      REG_CALL_DECL `random'
   14: {r53:SI=r10:SI&0xf;clobber psw:CC;}
      REG_DEAD r10:SI
      REG_UNUSED psw:CC

IRA has a propagation cost algorithm from pseudos (through chains of pseudos). 
This approach was observed as working better than different explicit coalescing
algorithms, especially when we have irregular register files and when we are
using dynamic register classes in IRA.  

The propagation algorithm takes conflicting pseudos costs (preferences) into
account too.  So it is pretty good algorithm.  Unfortunately, there is no
analogous mechanism for hard registers.  If IRA had it, it would propagate
preference of p53 (reg 10) to p46 before assigning a hard reg to p46.

  I am not sure that the PR will be fixed for GCC-5.0 but it would be a good
small project for RA to consider in future.

  Interesting that if p53 were processed first for assigning, we would not have
such problem.


  parent reply	other threads:[~2015-02-06 20:21 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <bug-39723-4@http.gcc.gnu.org/bugzilla/>
2010-12-16 13:10 ` [Bug target/39723] [4.5/4.6 " rguenth at gcc dot gnu.org
2011-04-28 15:08 ` [Bug target/39723] [4.5/4.6/4.7 " rguenth at gcc dot gnu.org
2012-07-02 12:55 ` [Bug target/39723] [4.6/4.7/4.8 " rguenth at gcc dot gnu.org
2013-04-12 15:15 ` [Bug target/39723] [4.7/4.8/4.9 " jakub at gcc dot gnu.org
2014-06-12 13:42 ` [Bug target/39723] [4.7/4.8/4.9/4.10 " rguenth at gcc dot gnu.org
2014-12-19 13:34 ` [Bug target/39723] [4.8/4.9/5 " jakub at gcc dot gnu.org
2015-02-06 18:36 ` law at redhat dot com
2015-02-06 20:21 ` vmakarov at gcc dot gnu.org [this message]
2015-02-08  4:44 ` law at redhat dot com
2015-06-23  8:18 ` [Bug target/39723] [4.8/4.9/5/6 " rguenth at gcc dot gnu.org
2015-06-26 20:04 ` [Bug target/39723] [4.9/5/6 " jakub at gcc dot gnu.org
2015-06-26 20:33 ` jakub at gcc dot gnu.org

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=bug-39723-4-yaTxCTs1TT@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /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).