Re: xlr/xlp __atomic builtins using ldadd and swap

2011-12-30 Thread Richard Sandiford
Tom de Vries writes: > I'm interested in implementing (some of) the new __atomic builtins using the > xlr/xlp atomic instructions ldadd and swap. > > Do you perhaps have work in progress there? 'Fraid not. I don't have any hardware to test it on (or at least that's my excuse). Thanks for checki

RTL Conditional and Call

2011-12-30 Thread Matt Davis
Hi, I am having an RTL problem trying to make a function call from a COND_EXEC rtx. The reload pass has been called, and very simply I want to compare on an 64bit x86 %rdx with a specific integer value, and if that value is true, my function call executes. I can call the function fine outside of

Re: RTL Conditional and Call

2011-12-30 Thread Alexander Monakov
On Sat, 31 Dec 2011, Matt Davis wrote: > Hi, > I am having an RTL problem trying to make a function call from a > COND_EXEC rtx. The reload pass has been called, and very simply I > want to compare on an 64bit x86 %rdx with a specific integer value, > and if that value is true, my function call

Static code analysis follow ups

2011-12-30 Thread sa...@hederstierna.com
Hi! I'm currently looking into possibilities to improve GCC for static-code-analysis features. Some weeks ago I proposed re-introducing -Wunreachable-code for finding dead code: http://gcc.gnu.org/ml/gcc-patches/2011-12/msg00385.html (The warning was removed in http://gcc.gnu.org/ml/gcc-pat

Re: Static code analysis follow ups

2011-12-30 Thread Basile Starynkevitch
On Fri, 30 Dec 2011 15:15:40 +0100 "sa...@hederstierna.com" wrote: > Hi! > > I'm currently looking into possibilities to improve GCC for > static-code-analysis features. > Some weeks ago I proposed re-introducing -Wunreachable-code for finding dead > code: > > http://gcc.gnu.org/ml/gcc-patc

Re: Lingering tbaa in anti_dependence?

2011-12-30 Thread Richard Guenther
On Thu, Dec 29, 2011 at 5:24 PM, Richard Sandiford wrote: > AIUI, the outcome of PR38964 was that we can't use TBAA for testing an > anti_dependence between a load X and store Y because Y might be defining > a new object in the same space as the object that was being read by X. > But it looks like

Re: fixed_scalar_and_varying_struct_p and varies_p

2011-12-30 Thread Richard Guenther
On Thu, Dec 29, 2011 at 8:48 PM, Eric Botcazou wrote: >> fixed_scalar_and_varying_struct_p passes an _address_ rather than a MEM. >> So in these cases fixed_scalar_and_varying_struct_p effectively becomes >> a no-op on targets that don't allow MEMs in addresses and takes on >> suspicious semantics

private member in union { union }

2011-12-30 Thread Jakub Staszak
Hello, I've found that: class Prv { private: union { union { unsigned int Bits; }; }; }; unsigned int getBits(Prv *P) { return P->Bits; } doesn't generate any error. Is it a bug? -- Jakub Staszak

Re: Static code analysis follow ups

2011-12-30 Thread Richard Guenther
On Fri, Dec 30, 2011 at 3:15 PM, sa...@hederstierna.com wrote: > Hi! > > I'm currently looking into possibilities to improve GCC for > static-code-analysis features. > Some weeks ago I proposed re-introducing -Wunreachable-code for finding dead > code: > >  http://gcc.gnu.org/ml/gcc-patches/2011

Re: private member in union { union }

2011-12-30 Thread Jonathan Wakely
On 30 December 2011 15:25, Jakub Staszak wrote: > Hello, > > I've found that: > > class Prv { > private: >  union >  { >    union >    { >      unsigned int Bits; >    }; >  }; > }; > > unsigned int getBits(Prv *P) { >  return P->Bits; > } > > doesn't generate any error. Is it a bug? Yes, I think

Re: Lingering tbaa in anti_dependence?

2011-12-30 Thread Jakub Jelinek
On Thu, Dec 29, 2011 at 04:24:31PM +, Richard Sandiford wrote: > AIUI, the outcome of PR38964 was that we can't use TBAA for testing an > anti_dependence between a load X and store Y because Y might be defining > a new object in the same space as the object that was being read by X. > But it lo

Re: a nifty feature for c preprocessor

2011-12-30 Thread Basile Starynkevitch
On Thu, 29 Dec 2011 13:12:19 -0800 Ian Lance Taylor wrote: > Any gcc developer who feels that this proposal is a good idea, please > chime in here. > > I personally do not feel it is worth the effort. It's easy to use a > more powerful macro processor, such as m4, to generate your C code. I a

Re: RTL Conditional and Call

2011-12-30 Thread Matt Davis
On Sat, Dec 31, 2011 at 12:51 AM, Alexander Monakov wrote: > > > On Sat, 31 Dec 2011, Matt Davis wrote: > >> Hi, >> I am having an RTL problem trying to make a function call from a >> COND_EXEC rtx.  The reload pass has been called, and very simply I >> want to compare on an 64bit x86 %rdx with a