Commit 88d03811 by Jan Hubicka Committed by Jan Hubicka

cgraphunit.c (cgraph_varpool_analyze_pending_decls): Call align_variable.


	* cgraphunit.c (cgraph_varpool_analyze_pending_decls): Call align_variable.
	* output.h (align_variable): Declare.
	* varasm.c (align_variable): Export.
	* value-prof.c (tree_value_profile_transformations): Recompute iterator
	when basic block changed.

From-SVN: r115421
parent 56dbe89d
2006-07-13 Jan Hubicka <jh@suse.cz>
* cgraphunit.c (cgraph_varpool_analyze_pending_decls): Call
align_variable.
* output.h (align_variable): Declare.
* varasm.c (align_variable): Export.
* value-prof.c (tree_value_profile_transformations): Recompute iterator
when basic block changed.
2006-07-13 Nick Clifton <nickc@redhat.com> 2006-07-13 Nick Clifton <nickc@redhat.com>
* config/sh/sh.c (sh_reorg): Ignore deleted insns whilst * config/sh/sh.c (sh_reorg): Ignore deleted insns whilst
......
...@@ -281,6 +281,10 @@ cgraph_varpool_analyze_pending_decls (void) ...@@ -281,6 +281,10 @@ cgraph_varpool_analyze_pending_decls (void)
cgraph_varpool_first_unanalyzed_node = cgraph_varpool_first_unanalyzed_node->next_needed; cgraph_varpool_first_unanalyzed_node = cgraph_varpool_first_unanalyzed_node->next_needed;
/* Compute the alignment early so function body expanders are
already informed about increased alignment. */
align_variable (decl, 0);
if (DECL_INITIAL (decl)) if (DECL_INITIAL (decl))
{ {
visited_nodes = pointer_set_create (); visited_nodes = pointer_set_create ();
......
...@@ -200,6 +200,10 @@ extern void assemble_end_function (tree, const char *); ...@@ -200,6 +200,10 @@ extern void assemble_end_function (tree, const char *);
initial value (that will be done by the caller). */ initial value (that will be done by the caller). */
extern void assemble_variable (tree, int, int, int); extern void assemble_variable (tree, int, int, int);
/* Compute the alignment of variable specified by DECL.
DONT_OUTPUT_DATA is from assemble_variable. */
extern void align_variable (tree decl, bool dont_output_data);
/* Output something to declare an external symbol to the assembler. /* Output something to declare an external symbol to the assembler.
(Most assemblers don't need this, so we normally output nothing.) (Most assemblers don't need this, so we normally output nothing.)
Do nothing if DECL is not external. */ Do nothing if DECL is not external. */
......
2006-07-13 Jan Hubicka <jh@suse.cz>
* gcc.target/i386/memcpy-1.c: New.
2006-07-12 Geoffrey Keating <geoffk@apple.com> 2006-07-12 Geoffrey Keating <geoffk@apple.com>
* g++.dg/ext/visibility/fvisibility-inlines-hidden-2.C: New. * g++.dg/ext/visibility/fvisibility-inlines-hidden-2.C: New.
/* { dg-do compile { target i?86-*-* } } */
/* { dg-options "-O2 -march=pentiumpro -minline-all-stringops" } */
/* { dg-final { scan-assembler "rep" } } */
/* { dg-final { scan-assembler "movs" } } */
/* { dg-final { scan-assembler-not "test" } } */
/* { dg-final { scan-assembler "\.L?:" } } */
/* A and B are aligned, but we used to lose track of it.
Ensure that memcpy is inlined and alignment prologue is missing. */
char a[900];
char b[900];
t()
{
__builtin_memcpy (a,b,900);
}
...@@ -147,7 +147,11 @@ tree_value_profile_transformations (void) ...@@ -147,7 +147,11 @@ tree_value_profile_transformations (void)
{ {
changed = true; changed = true;
/* Original statement may no longer be in the same block. */ /* Original statement may no longer be in the same block. */
bb = bb_for_stmt (stmt); if (bb != bb_for_stmt (stmt))
{
bb = bb_for_stmt (stmt);
bsi = bsi_for_stmt (stmt);
}
} }
/* Free extra storage from compute_value_histograms. */ /* Free extra storage from compute_value_histograms. */
......
...@@ -834,7 +834,7 @@ bss_initializer_p (tree decl) ...@@ -834,7 +834,7 @@ bss_initializer_p (tree decl)
/* Compute the alignment of variable specified by DECL. /* Compute the alignment of variable specified by DECL.
DONT_OUTPUT_DATA is from assemble_variable. */ DONT_OUTPUT_DATA is from assemble_variable. */
static void void
align_variable (tree decl, bool dont_output_data) align_variable (tree decl, bool dont_output_data)
{ {
unsigned int align = DECL_ALIGN (decl); unsigned int align = DECL_ALIGN (decl);
......
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