Re: [PING][RFC][PATCH] RL78 - Add predicates to reduce code bloat when accessing volatile memory.

2014-05-12 Thread Richard Hulme
On 09/05/14 21:20, DJ Delorie wrote: The key to the msp430 change is that I reviewed every pattern that used the predicates, and only changed the ones where the pattern was known to be volatile-safe. For the RL78, the devirtualizer may make a pattern non-volatile-safe, and many patterns are

Re: [PING][RFC][PATCH] RL78 - Add predicates to reduce code bloat when accessing volatile memory.

2014-05-12 Thread DJ Delorie
My understanding of 'volatile' is that even the resulting code I gave as an example is not actually volatile-safe: mova, !240 ora, #32 mov!240, a as the value stored in address 240 could change just before and/or just after the 'or', and get overwritten by the second

[PING][RFC][PATCH] RL78 - Add predicates to reduce code bloat when accessing volatile memory.

2014-05-09 Thread Richard Hulme
http://gcc.gnu.org/ml/gcc-patches/2014-04/msg01108.html Original Message Subject: [RFC][PATCH] RL78 - Add predicates to reduce code bloat when accessing volatile memory. Date: Fri, 18 Apr 2014 21:15:01 +0200 From: Richard Hulme pepe...@yahoo.com To: GCC Patches gcc-patches

Re: [PING][RFC][PATCH] RL78 - Add predicates to reduce code bloat when accessing volatile memory.

2014-05-09 Thread DJ Delorie
The key to the msp430 change is that I reviewed every pattern that used the predicates, and only changed the ones where the pattern was known to be volatile-safe. For the RL78, the devirtualizer may make a pattern non-volatile-safe, and many patterns are macros which are not always

Re: [PING][RFC][PATCH] RL78 - Add predicates to reduce code bloat when accessing volatile memory.

2014-05-09 Thread Andrew Pinski
On Fri, May 9, 2014 at 12:20 PM, DJ Delorie d...@redhat.com wrote: The key to the msp430 change is that I reviewed every pattern that used the predicates, and only changed the ones where the pattern was known to be volatile-safe. For the RL78, the devirtualizer may make a pattern

[RFC][PATCH] RL78 - Add predicates to reduce code bloat when accessing volatile memory.

2014-04-18 Thread Richard Hulme
Hi, This patch adds predicates (taken and renamed from the MSP430 backend) to allow more efficient code generation when accessing volatile memory turning this (for example): movwr10, #240 movwax, r10 movwhl, ax mov a, [hl] or a, #32 mov [hl], a into this: mov