public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
From: Jan Hubicka <jh@suse.cz>
To: Richard Henderson <rth@redhat.com>, Jan Hubicka <jh@suse.cz>,
	Ulrich Weigand <Ulrich.Weigand@de.ibm.com>,
	gcc@gcc.gnu.org, aj@suse.de
Subject: Re: Profiling on S390
Date: Wed, 23 Apr 2003 21:29:00 -0000	[thread overview]
Message-ID: <20030423195701.GD4751@kam.mff.cuni.cz> (raw)
In-Reply-To: <20030423193215.GA24723@redhat.com>

> On Wed, Apr 23, 2003 at 08:50:15PM +0200, Jan Hubicka wrote:
> > Perhaps, but Zdenek already has come code to measure extra stuff (like
> > value ranges) that do other thinks than plain add.  How would one
> > accomplish that?
> 
> Hum.  Perhaps
> 
>   (1) Do life analysis to verify something's live across here.  Here we
>       only have to check hard registers, and then we only have to care
>       about those with
> 
> 	GET_MODE_CLASS (reg_raw_mode[i]) == MODE_CC.
> 
>       In the vast majority of cases, no such will be live, so we can
>       avoid extra work.
This is interesting idea, we can do it more generally because ...
> 
>   (2) Generate the code sequence for the edge.  Examine it to see if
>       the flags register is actually killed.  If not, do nothing.

This work should in general be doable using my code hoisting functions I
made for GCSE some time ago (BTW these are still unmerged and we still
don't do parallels.  What do you think if I re-continued patches that
direction? (moving GCSE to code hoisting beasts, later doing pre-GCSE
liveness pass and even later making GCSE to actually use it and update)

In case we want to make an invariant that machine description implied
clobbers and hard reg sets are deadly only for MODE_CC as suggested in
(1), we could add it here.
>       Should help Sparc-like targets that have fine-grained control
>       over the setting of the flags register.
> 
>   (3) Locate the (a) set that causes the flags register(s) to be live.
>       Remember the mode of the register, and we'll use gen_move_insn to
>       save/restore the value to a pseudo.  If AVOID_CCMODE_COPIES, abort;
>       either the machine description or an optimizer is incorrect.
> 
>       There are probably targets for which either AVOID_CCMODE_COPIES
>       or CCmode move support is missing.
> 
>       Document that AVOID_CCMODE_COPIES implies that the flags register
>       cannot be live across basic blocks.
This all sounds fine.  It is bit expensive but I guess not deadly.

Honza
> 
> 
> r~

  reply	other threads:[~2003-04-23 19:56 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-04-22 22:34 Ulrich Weigand
2003-04-22 23:13 ` Richard Henderson
2003-04-23 10:59   ` Jan Hubicka
2003-04-23 18:26     ` Richard Henderson
2003-04-23 19:18       ` Jan Hubicka
2003-04-23 19:56         ` Richard Henderson
2003-04-23 21:29           ` Jan Hubicka [this message]
2003-04-23 22:33             ` Richard Henderson
2003-04-25 17:01               ` Jan Hubicka
  -- strict thread matches above, loose matches on Subject: below --
2003-04-23 21:50 Ulrich Weigand
2003-04-23 22:08 ` Richard Henderson
2003-04-23 18:18 Ulrich Weigand
2003-04-23 12:19 Ulrich Weigand
2003-04-18 12:11 Jan Hubicka

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=20030423195701.GD4751@kam.mff.cuni.cz \
    --to=jh@suse.cz \
    --cc=Ulrich.Weigand@de.ibm.com \
    --cc=aj@suse.de \
    --cc=gcc@gcc.gnu.org \
    --cc=rth@redhat.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).