This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Fix vectorizer conditions on updating alignment


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.



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]