aboutsummaryrefslogtreecommitdiff
path: root/gcc/varasm.c
diff options
context:
space:
mode:
authorJan Hubicka <hubicka@ucw.cz>2015-03-10 05:24:21 +0100
committerJan Hubicka <hubicka@gcc.gnu.org>2015-03-10 04:24:21 +0000
commitcaf2df93de6eda7d35f78e31517a13a3676b1f5c (patch)
tree6649fcc416406122c827c2e5a9961675ab392c9a /gcc/varasm.c
parent57ace19f92d886930470b037f7b3cd8ef4cafae4 (diff)
downloadgcc-caf2df93de6eda7d35f78e31517a13a3676b1f5c.zip
gcc-caf2df93de6eda7d35f78e31517a13a3676b1f5c.tar.gz
gcc-caf2df93de6eda7d35f78e31517a13a3676b1f5c.tar.bz2
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
Diffstat (limited to 'gcc/varasm.c')
-rw-r--r--gcc/varasm.c21
1 files changed, 8 insertions, 13 deletions
diff --git a/gcc/varasm.c b/gcc/varasm.c
index 5fa6e4c..752dccf 100644
--- a/gcc/varasm.c
+++ b/gcc/varasm.c
@@ -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)));
}
}