[trans-mem] optimize read for write

Richard Henderson rth@redhat.com
Tue Sep 29 16:51:00 GMT 2009


On 09/29/2009 09:26 AM, Aldy Hernandez wrote:
> In the code below, the first read is transformed into a read-for-write
> and the second is transformed into a write-after-write.  I believe this
> is correct.  Is this what you were expecting?
>
>    D.2742_6 = _ITM_RU1 (&c);
>    c.0_1 = (char) D.2742_6;
>    c.1_2 = c.0_1 + 1;
>    D.2743_7 = (unsigned char) c.1_2;
>    _ITM_WU1 (&c, D.2743_7);

Yep.  RfW acquires the write lock; WaW assumes the write lock has
already been acquired.

> 	* trans-mem.c (tm_memopt_compute_antic): New.
> 	(tm_memopt_compute_available): Merge seed and initialization
> 	loops.  Remove entry_block check.
> 	(tm_memopt_compute_antin): New.
> 	(execute_tm_memopt): Call tm_memopt_compute_antic.

Ok.


r~



More information about the Gcc-patches mailing list