Commit aecd4d81 by Richard Guenther Committed by Richard Biener

re PR debug/42455 ("-fcompare-debug failure" at -O2 in 'recent' builds)

2010-01-01  Richard Guenther  <rguenther@suse.de>

	PR debug/42455
	* tree-sra.c (analyze_all_variable_accesses): Work in DECL_UID
	order.

From-SVN: r155559
parent dadab4fd
2010-01-01 Richard Guenther <rguenther@suse.de>
PR debug/42455
* tree-sra.c (analyze_all_variable_accesses): Work in DECL_UID
order.
2010-01-01 Richard Guenther <rguenther@suse.de>
PR c/42570
* c-decl.c (grokdeclarator): For zero-size arrays force
structural equality checks as layout_type does.
......
/* Scalar Replacement of Aggregates (SRA) converts some structure
references into scalar references, exposing them to the scalar
optimizers.
Copyright (C) 2008, 2009 Free Software Foundation, Inc.
Copyright (C) 2008, 2009, 2010 Free Software Foundation, Inc.
Contributed by Martin Jambor <mjambor@suse.cz>
This file is part of GCC.
......@@ -1885,13 +1885,15 @@ propagate_all_subaccesses (void)
static bool
analyze_all_variable_accesses (void)
{
tree var;
referenced_var_iterator rvi;
int res = 0;
bitmap tmp = BITMAP_ALLOC (NULL);
bitmap_iterator bi;
unsigned i;
FOR_EACH_REFERENCED_VAR (var, rvi)
if (bitmap_bit_p (candidate_bitmap, DECL_UID (var)))
bitmap_copy (tmp, candidate_bitmap);
EXECUTE_IF_SET_IN_BITMAP (tmp, 0, i, bi)
{
tree var = referenced_var (i);
struct access *access;
access = sort_and_splice_var_accesses (var);
......@@ -1904,9 +1906,10 @@ analyze_all_variable_accesses (void)
propagate_all_subaccesses ();
FOR_EACH_REFERENCED_VAR (var, rvi)
if (bitmap_bit_p (candidate_bitmap, DECL_UID (var)))
bitmap_copy (tmp, candidate_bitmap);
EXECUTE_IF_SET_IN_BITMAP (tmp, 0, i, bi)
{
tree var = referenced_var (i);
struct access *access = get_first_repr_for_decl (var);
if (analyze_access_trees (access))
......@@ -1925,6 +1928,8 @@ analyze_all_variable_accesses (void)
disqualify_candidate (var, "No scalar replacements to be created.");
}
BITMAP_FREE (tmp);
if (res)
{
statistics_counter_event (cfun, "Scalarized aggregates", res);
......
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