re PR debug/47106 (-fcompare-debug failure (length) with -fpartial-inlining -flto -fconserve-stack)

PR debug/47106
PR debug/47402
* tree-flow.h (referenced_var_lookup): Add fn parameter.
Adjust all callers.
* tree-dfa.c (referenced_var_lookup): Use fn instead of cfun.
* tree-flow-inline.h: Adjust.
* gimple-pretty-print.c: Adjust.
* tree-into-ssa.c: Adjust.
* tree-ssa.c: Adjust.
* cfgexpand.c: Adjust.

From-SVN: r170185
This commit is contained in:
Alexandre Oliva 2011-02-15 18:36:16 +00:00 committed by Alexandre Oliva
parent 679e818369
commit 27c6b08686
8 changed files with 21 additions and 8 deletions

View File

@ -1,3 +1,16 @@
2011-02-15 Alexandre Oliva <aoliva@redhat.com>
PR debug/47106
PR debug/47402
* tree-flow.h (referenced_var_lookup): Add fn parameter.
Adjust all callers.
* tree-dfa.c (referenced_var_lookup): Use fn instead of cfun.
* tree-flow-inline.h: Adjust.
* gimple-pretty-print.c: Adjust.
* tree-into-ssa.c: Adjust.
* tree-ssa.c: Adjust.
* cfgexpand.c: Adjust.
2011-02-15 Nathan Froyd <froydnj@codesourcery.com>
* config/iq2000/i2000.h (REG_CLASS_FROM_LETTER): Delete.

View File

@ -520,7 +520,7 @@ update_alias_info_with_stack_vars (void)
for -O0 where we are preserving even unreferenced variables. */
gcc_assert (DECL_P (decl)
&& (!optimize
|| referenced_var_lookup (DECL_UID (decl))));
|| referenced_var_lookup (cfun, DECL_UID (decl))));
bitmap_set_bit (part, uid);
*((bitmap *) pointer_map_insert (decls_to_partitions,
(void *)(size_t) uid)) = part;

View File

@ -542,7 +542,7 @@ pp_points_to_solution (pretty_printer *buffer, struct pt_solution *pt)
pp_string (buffer, "{ ");
EXECUTE_IF_SET_IN_BITMAP (pt->vars, 0, i, bi)
{
tree var = referenced_var_lookup (i);
tree var = referenced_var_lookup (cfun, i);
if (var)
{
dump_generic_node (buffer, var, 0, dump_flags, false);

View File

@ -488,12 +488,12 @@ find_referenced_vars_in (gimple stmt)
variable. */
tree
referenced_var_lookup (unsigned int uid)
referenced_var_lookup (struct function *fn, unsigned int uid)
{
tree h;
struct tree_decl_minimal in;
in.uid = uid;
h = (tree) htab_find_with_hash (gimple_referenced_vars (cfun), &in, uid);
h = (tree) htab_find_with_hash (gimple_referenced_vars (fn), &in, uid);
return h;
}

View File

@ -103,7 +103,7 @@ next_htab_element (htab_iterator *hti)
static inline tree
referenced_var (unsigned int uid)
{
tree var = referenced_var_lookup (uid);
tree var = referenced_var_lookup (cfun, uid);
gcc_assert (var || uid == 0);
return var;
}

View File

@ -319,7 +319,7 @@ typedef struct
!end_referenced_vars_p (&(ITER)); \
(VAR) = next_referenced_var (&(ITER)))
extern tree referenced_var_lookup (unsigned int);
extern tree referenced_var_lookup (struct function *, unsigned int);
extern bool referenced_var_check_and_insert (tree);
#define num_referenced_vars htab_elements (gimple_referenced_vars (cfun))

View File

@ -1469,7 +1469,7 @@ dump_decl_set (FILE *file, bitmap set)
EXECUTE_IF_SET_IN_BITMAP (set, 0, i, bi)
{
tree var = referenced_var_lookup (i);
tree var = referenced_var_lookup (cfun, i);
if (var)
print_generic_expr (file, var, 0);
else

View File

@ -1930,7 +1930,7 @@ maybe_optimize_var (tree var, bitmap addresses_taken, bitmap not_reg_needs)
/* If the variable is not in the list of referenced vars then we
do not need to touch it nor can we rename it. */
if (!referenced_var_lookup (DECL_UID (var)))
if (!referenced_var_lookup (cfun, DECL_UID (var)))
return false;
if (TREE_ADDRESSABLE (var)