public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
From: Vladimir Makarov <vmakarov@redhat.com>
To: Dave Korn <dave.korn.cygwin@googlemail.com>
Cc: Albert Cohen <Albert.Cohen@inria.fr>,
	reply@meinersbur.de, gcc@gcc.gnu.org,
	        Sid Touati <Sid.Touati@inria.fr>,
	        Frederic Brault <frederic.brault@inria.fr>
Subject: Re: Register Pressure in Instruction Level Parallelism
Date: Mon, 29 Jun 2009 18:04:00 -0000	[thread overview]
Message-ID: <4A48EB5A.2030205@redhat.com> (raw)
In-Reply-To: <4A47F8EC.6060909@gmail.com>

Dave Korn wrote:
> Albert Cohen wrote:
>
>   
>> Unfortunately, the state of the art (more recent that the thesis
>> referenced in the original email, see Touati's web page) is limited to
>> basic block and software-pipelining scopes, and limited to scheduling.
>>
>> Compared to the tasks currently managed by reload, it certainly misses a
>> whole bunch of instruction selection and immediate operand/address mode
>> corner case problems (depending on the target). It also misses global
>> scheduling, but extended BB scheduling is not very hard to approximate,
>> as well as superblock scheduling.
>>
>> I'm not at all a knowledgeable person to tell you what to do in the case
>> of GCC, but for sure saturation/sufficiency-based approches are not
>> sufficient to kill the dragon.
>>     
>
>   In a brief exchange I had with Michael off-list, we discussed that.  I
> observed that of the things that reload does,
> constraint-satisfaction/insn-variant-selection is its primary purpose, and
> spill/reload code generation is something it often does suboptimally (and
> secondary reloads even worse).  If a clever pass running before reload could
> insert explicit spill/reload code at well-chosen places (bearing in mind
> class-based register pressure), it could relieve reload of the necessity to
> generate its own spill code most of the time, and let it just do what it does
> best.
IRA actually already inserts spill code in most important places (on 
loop borders).  Besides loop regions, IRA could be extended to other 
regions (and even bb parts to relief pressure inside the blocks).  I am 
going to work on it to evaluate how much it could give.

Most spill/restore code at least for x86 is generated by reload because 
one insn operand should be a register.  Some cooperation of IRA and 
reload on this issue, I hope, has a potential to improve code 
performance more.
>   So, yes, it doesn't kill the dragon, reload would need to be retained
> and would still need the last-resort ability to do all the stuff it does now -
> but mostly it wouldn't have to in practice, and a sleeping dragon is still an
> improvement on a wide-awake one that's stomping round in a furious bad temper
> burning everything in sight....  Reload would definitely generate better code
> if it was fed stuff that avoided exercising its weakest points; sounds like a
> pre-conditioning pass based on your techniques might work really well.
>
>   

  parent reply	other threads:[~2009-06-29 16:27 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-06-28 12:37 Michael Kruse
2009-06-28 19:06 ` Dave Korn
2009-06-28 22:53   ` Albert Cohen
2009-06-28 23:56     ` Dave Korn
2009-06-29  6:13       ` Albert Cohen
2009-06-29 18:04       ` Vladimir Makarov [this message]
2009-07-01  6:09         ` Jeff Law
2009-07-02 21:53           ` Vladimir Makarov
2009-07-01  5:58       ` Jeff Law
2009-06-29  0:30     ` Michael Kruse
     [not found]     ` <303e1d290906281549t4ebfce81m5152069742fa9a1@mail.gmail.com>
2009-06-29  6:28       ` Fwd: " Kenneth Zadeck
2009-06-28 23:01   ` Michael Kruse
2009-06-29  0:03     ` Dave Korn
2009-06-29 17:05   ` Vladimir Makarov
2009-06-29 16:27 ` Vladimir Makarov
2009-06-29 20:03   ` Michael Kruse
2009-06-29 20:40     ` Vladimir Makarov
2009-06-29 21:04       ` Michael Kruse
2009-06-30 15:01       ` Albert Cohen
2009-07-01  6:06   ` Jeff Law

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=4A48EB5A.2030205@redhat.com \
    --to=vmakarov@redhat.com \
    --cc=Albert.Cohen@inria.fr \
    --cc=Sid.Touati@inria.fr \
    --cc=dave.korn.cygwin@googlemail.com \
    --cc=frederic.brault@inria.fr \
    --cc=gcc@gcc.gnu.org \
    --cc=reply@meinersbur.de \
    /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).