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

2015-05-21 Thread Aurelien Jarno
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); > > } > >

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

2015-05-19 Thread Richard Henderson
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;

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

2015-05-19 Thread Aurelien Jarno
When the same temp is used twice or more as an input argument to a TCG instruction, the dead computation code doesn't recognize the second use as a dead temp. This is because the temp is marked as live in the same loop where dead inputs are checked. The fix is to split the loop in two parts. This