This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Fix vectorizer conditions on updating alignment
- From: Richard Biener <richard dot guenther at gmail dot com>
- To: "H.J. Lu" <hjl dot tools at gmail dot com>,Jan Hubicka <hubicka at ucw dot cz>
- Cc: GCC Patches <gcc-patches at gcc dot gnu dot org>,Eric Botcazou <ebotcazou at adacore dot com>
- Date: Sat, 22 Nov 2014 19:32:55 +0100
- Subject: Re: Fix vectorizer conditions on updating alignment
- Authentication-results: sourceware.org; auth=none
- References: <20140612221423 dot GC4551 at kam dot mff dot cuni dot cz> <CAMe9rOq2H708Nk92UoZjmcWRorqdMrwfAVpo+MNLwzGLSugSaA at mail dot gmail dot com>
On November 22, 2014 6:38:03 PM CET, "H.J. Lu" <hjl.tools@gmail.com> wrote:
>On Thu, Jun 12, 2014 at 3:14 PM, Jan Hubicka <hubicka@ucw.cz> wrote:
>> Hi,
>> while updating vect_can_force_dr_alignment_p for section API I
>noticed the
>> predicate is bit confused about when it can update the alignment.
>>
>> We need to check that decl_binds_to_current_def_p and in case we
>compile
>> a partition also that the symbol is not homed in other partition.
>> Previous code was wrong i.e. for COMDATs, weaks or -fpic.
>>
>> Also when having an alias, only way to promote the alignment is to
>bump
>> up alignment of target.
>>
>> On the other hand comment about DECL_IN_CONSTANT_POOL seems confused
>- we have
>> no sharing across partitions. I assume it was old hack and removed
>it.
It's quite recent and it will break Ada iirc.
Richard.
>>
>> I also see no reason for disregarding DECL_PRESERVE - we only update
>> alignment that should not disturb whatever magic user does. But I
>kept
>> it.
>>
>> We probably should separate the logic into symtab predicate - it just
>checks if
>> we can change definition of variable to meet our needs. I can do that
>> incrementally.
>>
>> Bootstrapped/regtested x86_64-linux, comitted.
>>
>> Honza
>>
>> * tree-vect-data-refs.c (vect_can_force_dr_alignment_p):
>Reorg
>> to use symtab and decl_binds_to_current_def_p
>> * tree-vectorizer.c (increase_alignment): Increase alignment
>> of alias target, too.
>
>It caused:
>
>https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64024
>https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64028
>
>H.J.