This is the mail archive of the
mailing list for the GCC project.
Re: [PATCH 1/3] Fix PR46029: reimplement if-convert stores.
On Wed, 10 Nov 2010, Sebastian Pop wrote:
> Hi Richi,
> On Fri, Nov 5, 2010 at 11:08, Sebastian Pop <firstname.lastname@example.org> wrote:
> >> Note that if you want to make vectorization happy you would need
> >> to ensure that for
> >> ?if (x)
> >> ? ?a[i] = ...;
> >> the scratchpad you'll end up using will have the _same_ alignment
> >> as a[i] (same or larger for all offsets). ?Using a local array
> >> of chars should make it possible for the vectorizer to adjust
> >> its alignment if needed.
> > Ok, thanks for the recommendation, I will try to use a local array.
> Do you happen to know how to declare an automatic variable?
> I was looking at the code in tree-switch-conversion.c:build_one_array.
> Does that look the right approach to statically declare the scratchpad
> on the stack?
As simple as
var = create_tmp_var (type, NULL_TREE);
switch-conversion builds a local static array, not an automatic var.
Richard Guenther <email@example.com>
Novell / SUSE Labs
SUSE LINUX Products GmbH - Nuernberg - AG Nuernberg - HRB 16746 - GF: Markus Rex