This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Profiling on S390


> 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~


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]