Commit caf2df93 by Jan Hubicka Committed by Jan Hubicka

re PR tree-optimization/65355 (vectorizer increase alignment of symbols already placed in anchors)


	PR tree-optimization/65355
	* varasm.c (notice_global_symbol): Do not produce RTL.
	* symtab.c (symtab_node::can_increase_alignment_p): Check for section
	anchor.
	* tree-vect-data-refs.c (vect_compute_data_ref_alignment): Do not
	check for section anchors.
	* gcc.dg/vect/section-anchors-vect-69.c: Update template.

From-SVN: r221297
parent 57ace19f
2015-03-10 Jan Hubicka <hubicka@ucw.cz>
PR tree-optimization/65355
* varasm.c (notice_global_symbol): Do not produce RTL.
* symtab.c (symtab_node::can_increase_alignment_p): Check for section
anchor.
* tree-vect-data-refs.c (vect_compute_data_ref_alignment): Do not
check for section anchors.
2015-03-10 Alan Modra <amodra@gmail.com>
PR target/65286
......
......@@ -1924,6 +1924,13 @@ symtab_node::can_increase_alignment_p (void)
if (TREE_ASM_WRITTEN (target->decl))
return false;
/* If target is already placed in an anchor, we can not touch its
alignment. */
if (DECL_RTL_SET_P (target->decl)
&& MEM_P (DECL_RTL (target->decl))
&& SYMBOL_REF_HAS_BLOCK_INFO_P (XEXP (DECL_RTL (target->decl), 0)))
return false;
/* Constant pool entries may be shared. */
if (DECL_IN_CONSTANT_POOL (target->decl))
return false;
......
2015-03-10 Jan Hubicka <hubicka@ucw.cz>
PR tree-optimization/65355
* gcc.dg/vect/section-anchors-vect-69.c: Update template.
2015-03-09 Jakub Jelinek <jakub@redhat.com>
PR c/65120
......
......@@ -115,6 +115,6 @@ int main (void)
/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 0 "vect" } } */
/* Alignment forced using versioning until the pass that increases alignment
is extended to handle structs. */
/* { dg-final { scan-tree-dump-times "Alignment of access forced using peeling" 4 "vect" { target {vect_int && vector_alignment_reachable } } } } */
/* { dg-final { scan-tree-dump-times "Alignment of access forced using peeling" 2 "vect" { target {vect_int && vector_alignment_reachable } } } } */
/* { dg-final { scan-tree-dump-times "Alignment of access forced using versioning" 4 "vect" { target {vect_int && {! vector_alignment_reachable} } } } } */
/* { dg-final { cleanup-tree-dump "vect" } } */
......@@ -758,12 +758,7 @@ vect_compute_data_ref_alignment (struct data_reference *dr)
&& TREE_CODE (TREE_OPERAND (base, 0)) == ADDR_EXPR)
base = TREE_OPERAND (TREE_OPERAND (base, 0), 0);
/* Do not change the alignment of global variables here if
flag_section_anchors is enabled as we already generated
RTL for other functions. Most global variables should
have been aligned during the IPA increase_alignment pass. */
if (!vect_can_force_dr_alignment_p (base, TYPE_ALIGN (vectype))
|| (TREE_STATIC (base) && flag_section_anchors))
if (!vect_can_force_dr_alignment_p (base, TYPE_ALIGN (vectype)))
{
if (dump_enabled_p ())
{
......
......@@ -1630,35 +1630,30 @@ default_ctor_section_asm_out_constructor (rtx symbol,
void
notice_global_symbol (tree decl)
{
const char **type = &first_global_object_name;
const char **t = &first_global_object_name;
if (first_global_object_name
|| !TREE_PUBLIC (decl)
|| DECL_EXTERNAL (decl)
|| !DECL_NAME (decl)
|| (TREE_CODE (decl) == VAR_DECL && DECL_HARD_REGISTER (decl))
|| (TREE_CODE (decl) != FUNCTION_DECL
&& (TREE_CODE (decl) != VAR_DECL
|| (DECL_COMMON (decl)
&& (DECL_INITIAL (decl) == 0
|| DECL_INITIAL (decl) == error_mark_node))))
|| !MEM_P (DECL_RTL (decl)))
|| DECL_INITIAL (decl) == error_mark_node)))))
return;
/* We win when global object is found, but it is useful to know about weak
symbol as well so we can produce nicer unique names. */
if (DECL_WEAK (decl) || DECL_ONE_ONLY (decl) || flag_shlib)
type = &weak_global_object_name;
t = &weak_global_object_name;
if (!*type)
if (!*t)
{
const char *p;
const char *name;
rtx decl_rtl = DECL_RTL (decl);
p = targetm.strip_name_encoding (XSTR (XEXP (decl_rtl, 0), 0));
name = ggc_strdup (p);
*type = name;
tree id = DECL_ASSEMBLER_NAME (decl);
ultimate_transparent_alias_target (&id);
*t = ggc_strdup (targetm.strip_name_encoding (IDENTIFIER_POINTER (id)));
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment