summaryrefslogtreecommitdiff
path: root/gcc/tree-vect-analyze.c
diff options
context:
space:
mode:
authordorit <dorit@138bc75d-0d04-0410-961f-82ee72b054a4>2006-08-03 20:35:05 +0000
committerdorit <dorit@138bc75d-0d04-0410-961f-82ee72b054a4>2006-08-03 20:35:05 +0000
commit9896f25bbd2ccf9ac0d487e0fdbdf048386d28c7 (patch)
tree5600c4515b0df41a7300352395b0f3c145a96196 /gcc/tree-vect-analyze.c
parentf03c0a41f8c4ff72fae7b0e8485a35e241cb06bb (diff)
downloadgcc-9896f25bbd2ccf9ac0d487e0fdbdf048386d28c7.tar.gz
PR tree-optimization/27770
* tree-vectorizer.h (get_vectype_for_scalar_type): Function declaration removed (moved to tree-flow.h). (vect_can_force_dr_alignment_p): Likewise. * tree-flow.h (get_vectype_for_scalar_type): New function declaration (moved from tree-vectorizer.h). (vect_can_force_dr_alignment_p): Likewise. * tree-vectorizer.c (vect_print_dump_info): Allow calling this function from outside the vectorizer - in particular from cgraph stage. * tree-vect-analyze.c (vect_compute_data_ref_alignment): Don't increase the alignment of global arrays when -fsection-anchors is enabled. * cgraphunit.c (cgraph_increase_alignment): New function. (cgraph_optimize): Call cgraph_increase_alignment. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@115910 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/tree-vect-analyze.c')
-rw-r--r--gcc/tree-vect-analyze.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/gcc/tree-vect-analyze.c b/gcc/tree-vect-analyze.c
index b031ceb1640..9df8ba26606 100644
--- a/gcc/tree-vect-analyze.c
+++ b/gcc/tree-vect-analyze.c
@@ -754,7 +754,10 @@ vect_compute_data_ref_alignment (struct data_reference *dr)
if (!base_aligned)
{
- if (!vect_can_force_dr_alignment_p (base, TYPE_ALIGN (vectype)))
+ /* Do not change the alignment of global variables if
+ flag_section_anchors is enabled. */
+ if (!vect_can_force_dr_alignment_p (base, TYPE_ALIGN (vectype))
+ || (TREE_STATIC (base) && flag_section_anchors))
{
if (vect_print_dump_info (REPORT_DETAILS))
{