qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH] tcg: fix dead computation for repeated input ar


From: Aurelien Jarno
Subject: Re: [Qemu-devel] [PATCH] tcg: fix dead computation for repeated input arguments
Date: Thu, 21 May 2015 20:35:54 +0200
User-agent: Mutt/1.5.23 (2014-03-12)

On 2015-05-19 07:46, Richard Henderson wrote:
> On 05/19/2015 03:26 AM, Aurelien Jarno wrote:
> > @@ -1522,6 +1522,9 @@ static void tcg_liveness_analysis(TCGContext *s)
> >                      if (dead_temps[arg]) {
> >                          dead_args |= (1 << i);
> >                      }
> > +                }
> > +                for (i = nb_oargs; i < nb_oargs + nb_iargs; i++) {
> > +                    arg = args[i];
> >                      dead_temps[arg] = 0;
> >                  }
> >                  s->op_dead_args[oi] = dead_args;
> 
> How about another line of commentary for each loop?
> 
> Something like
> 
>   /* Record arguments that die in this opcode.  */
> 
> for the first and
> 
>   /* Input arguments are live for preceeding opcodes.  */
> 
> for the second.

Good point.

> As for the same loop for calls, you're right that it may well cause us to do a
> tiny bit of redundant work, but nothing else bad will happen.  We'll enter
> temp_dead more times than necessary.  I'm always skeptical about knowingly
> giving a compiler bad information though.  You tend to not know how data is
> going to be used in future, and *then* get bad results.

You are correct. Anyway I don't think it'll make a big difference in
performance.

I'll send a new version of the patch.

-- 
Aurelien Jarno                          GPG: 4096R/1DDD8C9B
address@hidden                 http://www.aurel32.net



reply via email to

[Prev in Thread] Current Thread [Next in Thread]