Re: [PATCH, PR50527] Don't assume alignment of vla-related allocas.

2011-10-06 Thread Richard Guenther
On Wed, Oct 5, 2011 at 11:07 PM, Tom de Vries wrote: > On 10/05/2011 10:46 AM, Richard Guenther wrote: >> On Tue, Oct 4, 2011 at 6:28 PM, Tom de Vries wrote: >>> On 10/04/2011 03:03 PM, Richard Guenther wrote: On Tue, Oct 4, 2011 at 9:43 AM, Tom de Vries wrote: > On 10/01/2011 05:

Re: [PATCH, PR50527] Don't assume alignment of vla-related allocas.

2011-10-05 Thread Tom de Vries
On 10/05/2011 10:46 AM, Richard Guenther wrote: > On Tue, Oct 4, 2011 at 6:28 PM, Tom de Vries wrote: >> On 10/04/2011 03:03 PM, Richard Guenther wrote: >>> On Tue, Oct 4, 2011 at 9:43 AM, Tom de Vries wrote: On 10/01/2011 05:46 PM, Tom de Vries wrote: > On 09/30/2011 03:29 PM, Richard G

Re: [PATCH, PR50527] Don't assume alignment of vla-related allocas.

2011-10-05 Thread Richard Guenther
On Tue, Oct 4, 2011 at 6:28 PM, Tom de Vries wrote: > On 10/04/2011 03:03 PM, Richard Guenther wrote: >> On Tue, Oct 4, 2011 at 9:43 AM, Tom de Vries wrote: >>> On 10/01/2011 05:46 PM, Tom de Vries wrote: On 09/30/2011 03:29 PM, Richard Guenther wrote: > On Thu, Sep 29, 2011 at 3:15 PM,

Re: [PATCH, PR50527] Don't assume alignment of vla-related allocas.

2011-10-05 Thread Richard Guenther
On Tue, Oct 4, 2011 at 10:58 PM, Richard Henderson wrote: > On 10/04/2011 01:17 PM, Tom de Vries wrote: >> In general, to fold vlas (which are lowered to allocas) to normal >> declarations, >> if the alloca argument is constant. > > Ah.  Ok, I suppose.  How often are you seeing this happening?  I

Re: [PATCH, PR50527] Don't assume alignment of vla-related allocas.

2011-10-04 Thread Tom de Vries
On 10/04/2011 11:31 PM, Tom de Vries wrote: > On 10/04/2011 10:58 PM, Richard Henderson wrote: >> On 10/04/2011 01:17 PM, Tom de Vries wrote: >>> In general, to fold vlas (which are lowered to allocas) to normal >>> declarations, >>> if the alloca argument is constant. >> >> Ah. Ok, I suppose. H

Re: [PATCH, PR50527] Don't assume alignment of vla-related allocas.

2011-10-04 Thread Tom de Vries
On 10/04/2011 10:58 PM, Richard Henderson wrote: > On 10/04/2011 01:17 PM, Tom de Vries wrote: >> In general, to fold vlas (which are lowered to allocas) to normal >> declarations, >> if the alloca argument is constant. > > Ah. Ok, I suppose. How often are you seeing this happening? I can imag

Re: [PATCH, PR50527] Don't assume alignment of vla-related allocas.

2011-10-04 Thread Richard Henderson
On 10/04/2011 01:17 PM, Tom de Vries wrote: > In general, to fold vlas (which are lowered to allocas) to normal > declarations, > if the alloca argument is constant. Ah. Ok, I suppose. How often are you seeing this happening? I can imagine a few instances via inlining, but even there not so mu

Re: [PATCH, PR50527] Don't assume alignment of vla-related allocas.

2011-10-04 Thread Tom de Vries
On 10/04/2011 08:51 PM, Richard Henderson wrote: > On 10/04/2011 09:28 AM, Tom de Vries wrote: >> Well, that was the idea. But now I wonder, isn't it better to do this in >> expand_builtin_alloca: >> ... >>/* Compute the argument. */ >>op0 = expand_normal (CALL_EXPR_ARG (exp, 0)); >> >> +

Re: [PATCH, PR50527] Don't assume alignment of vla-related allocas.

2011-10-04 Thread Richard Henderson
On 10/04/2011 09:28 AM, Tom de Vries wrote: > Well, that was the idea. But now I wonder, isn't it better to do this in > expand_builtin_alloca: > ... >/* Compute the argument. */ >op0 = expand_normal (CALL_EXPR_ARG (exp, 0)); > > + align = > +(DECL_FUNCTION_CODE (get_callee_fndecl (e

Re: [PATCH, PR50527] Don't assume alignment of vla-related allocas.

2011-10-04 Thread Tom de Vries
On 10/04/2011 03:03 PM, Richard Guenther wrote: > On Tue, Oct 4, 2011 at 9:43 AM, Tom de Vries wrote: >> On 10/01/2011 05:46 PM, Tom de Vries wrote: >>> On 09/30/2011 03:29 PM, Richard Guenther wrote: On Thu, Sep 29, 2011 at 3:15 PM, Tom de Vries wrote: > On 09/28/2011 11:53 AM, Ri

Re: [PATCH, PR50527] Don't assume alignment of vla-related allocas.

2011-10-04 Thread Richard Guenther
On Tue, Oct 4, 2011 at 9:43 AM, Tom de Vries wrote: > On 10/01/2011 05:46 PM, Tom de Vries wrote: >> On 09/30/2011 03:29 PM, Richard Guenther wrote: >>> On Thu, Sep 29, 2011 at 3:15 PM, Tom de Vries >>> wrote: On 09/28/2011 11:53 AM, Richard Guenther wrote: > On Wed, Sep 28, 2011 at 11:

Re: [PATCH, PR50527] Don't assume alignment of vla-related allocas.

2011-10-04 Thread Tom de Vries
On 10/01/2011 05:46 PM, Tom de Vries wrote: > On 09/30/2011 03:29 PM, Richard Guenther wrote: >> On Thu, Sep 29, 2011 at 3:15 PM, Tom de Vries wrote: >>> On 09/28/2011 11:53 AM, Richard Guenther wrote: On Wed, Sep 28, 2011 at 11:34 AM, Tom de Vries wrote: > Richard, > > I g

Re: [PATCH, PR50527] Don't assume alignment of vla-related allocas.

2011-10-01 Thread Tom de Vries
On 09/30/2011 03:29 PM, Richard Guenther wrote: > On Thu, Sep 29, 2011 at 3:15 PM, Tom de Vries wrote: >> On 09/28/2011 11:53 AM, Richard Guenther wrote: >>> On Wed, Sep 28, 2011 at 11:34 AM, Tom de Vries >>> wrote: Richard, I got a patch for PR50527. The patch prevents

Re: [PATCH, PR50527] Don't assume alignment of vla-related allocas.

2011-09-30 Thread Richard Guenther
On Thu, Sep 29, 2011 at 3:15 PM, Tom de Vries wrote: > On 09/28/2011 11:53 AM, Richard Guenther wrote: >> On Wed, Sep 28, 2011 at 11:34 AM, Tom de Vries >> wrote: >>> Richard, >>> >>> I got a patch for PR50527. >>> >>> The patch prevents the alignment of vla-related allocas to be set to >>> BIGG

Re: [PATCH, PR50527] Don't assume alignment of vla-related allocas.

2011-09-29 Thread Tom de Vries
On 09/28/2011 11:53 AM, Richard Guenther wrote: > On Wed, Sep 28, 2011 at 11:34 AM, Tom de Vries wrote: >> Richard, >> >> I got a patch for PR50527. >> >> The patch prevents the alignment of vla-related allocas to be set to >> BIGGEST_ALIGNMENT in ccp. The alignment may turn out smaller after fold

Re: [PATCH, PR50527] Don't assume alignment of vla-related allocas.

2011-09-28 Thread Richard Guenther
On Wed, Sep 28, 2011 at 11:34 AM, Tom de Vries wrote: > Richard, > > I got a patch for PR50527. > > The patch prevents the alignment of vla-related allocas to be set to > BIGGEST_ALIGNMENT in ccp. The alignment may turn out smaller after folding > the alloca. > > Bootstrapped and regtested on x86_

[PATCH, PR50527] Don't assume alignment of vla-related allocas.

2011-09-28 Thread Tom de Vries
Richard, I got a patch for PR50527. The patch prevents the alignment of vla-related allocas to be set to BIGGEST_ALIGNMENT in ccp. The alignment may turn out smaller after folding the alloca. Bootstrapped and regtested on x86_64. OK for trunk? Thanks, - Tom 2011-09-27 Tom de Vries