Re: [PATCH] PR60092 - lower posix_memalign to make align-info accessible

2014-02-12 Thread Jakub Jelinek
On Wed, Feb 12, 2014 at 11:42:09AM +0100, Richard Biener wrote: > But as the testcase was supposed to test field-sensitive points-to > I chose to disable SRA for the testcase (and queue pass interchange > for 4.10 - unless you think it's ok now - I think it's harmless > and should only improve earl

Re: [PATCH] PR60092 - lower posix_memalign to make align-info accessible

2014-02-12 Thread Richard Biener
On Wed, 12 Feb 2014, Richard Biener wrote: > On Wed, 12 Feb 2014, Jakub Jelinek wrote: > > > On Wed, Feb 12, 2014 at 10:30:01AM +0100, Richard Biener wrote: > > > Bah. I am testing the following. > > > > But then there is no guarantee that ptr is aligned after the call. > > char buf[32] __attri

Re: [PATCH] PR60092 - lower posix_memalign to make align-info accessible

2014-02-12 Thread Richard Biener
On Wed, 12 Feb 2014, Jakub Jelinek wrote: > On Wed, Feb 12, 2014 at 10:30:01AM +0100, Richard Biener wrote: > > Bah. I am testing the following. > > But then there is no guarantee that ptr is aligned after the call. > char buf[32] __attribute__((aligned (32))); > int > foo (void) > { > void *p

Re: [PATCH] PR60092 - lower posix_memalign to make align-info accessible

2014-02-12 Thread Jakub Jelinek
On Wed, Feb 12, 2014 at 10:30:01AM +0100, Richard Biener wrote: > Bah. I am testing the following. But then there is no guarantee that ptr is aligned after the call. char buf[32] __attribute__((aligned (32))); int foo (void) { void *ptr = buf + 1; posix_memalign (&ptr, 32, -1); /* Assume po

Re: [PATCH] PR60092 - lower posix_memalign to make align-info accessible

2014-02-12 Thread Richard Biener
On Wed, 12 Feb 2014, Andreas Krebbel wrote: > On 07/02/14 10:33, Richard Biener wrote: > > + static void > > + lower_builtin_posix_memalign (gimple_stmt_iterator *gsi) > > + { > > + gimple stmt = gsi_stmt (*gsi); > > + tree pptr = gimple_call_arg (stmt, 0); > > + tree align = gimple_call_arg

Re: [PATCH] PR60092 - lower posix_memalign to make align-info accessible

2014-02-12 Thread Andreas Krebbel
On 07/02/14 10:33, Richard Biener wrote: > + static void > + lower_builtin_posix_memalign (gimple_stmt_iterator *gsi) > + { > + gimple stmt = gsi_stmt (*gsi); > + tree pptr = gimple_call_arg (stmt, 0); > + tree align = gimple_call_arg (stmt, 1); > + tree ptr = create_tmp_reg (ptr_type_node,

Re: [PATCH] PR60092 - lower posix_memalign to make align-info accessible

2014-02-07 Thread Jakub Jelinek
On Fri, Feb 07, 2014 at 10:33:45AM +0100, Richard Biener wrote: > Thus like the following. > > Bootstrapped and tested on x86_64-unknown-linux-gnu, ok for trunk > at this stage? > > Thanks, > Richard. > > 2014-02-07 Richard Biener > > PR middle-end/60092 > * gimple-low.c (lower_b

Re: [PATCH] PR60092 - lower posix_memalign to make align-info accessible

2014-02-07 Thread Richard Biener
On Thu, 6 Feb 2014, Richard Biener wrote: > On Thu, 6 Feb 2014, Richard Biener wrote: > > > > > This re-writes posix_memalign calls to > > > > posix_memalign (ptr, align, size); > > tem = *ptr; > > tem = __builtin_assume_aligned (align); > > *ptr = tem; > > > > during C

Re: [PATCH] PR60092 - lower posix_memalign to make align-info accessible

2014-02-06 Thread Richard Biener
On Thu, 6 Feb 2014, Richard Biener wrote: > > This re-writes posix_memalign calls to > > posix_memalign (ptr, align, size); > tem = *ptr; > tem = __builtin_assume_aligned (align); > *ptr = tem; > > during CF lowering (yeah, ok ...) to make alignment info accessible > to

[PATCH] PR60092 - lower posix_memalign to make align-info accessible

2014-02-06 Thread Richard Biener
This re-writes posix_memalign calls to posix_memalign (ptr, align, size); tem = *ptr; tem = __builtin_assume_aligned (align); *ptr = tem; during CF lowering (yeah, ok ...) to make alignment info accessible to SSA based analysis. I have to adjust the added alias-31.c test