Commit ff3add8d by Daniel Berlin Committed by Daniel Berlin

tree-ssa-structalias.c (set_used_smts): Re-fix pr29156.

2006-12-05  Daniel Berlin  <dberlin@dberlin.org>

	* tree-ssa-structalias.c (set_used_smts): Re-fix pr29156.
	Optimize to avoid marking more SMT's as used when they aren't.

From-SVN: r119562
parent 143c27b0
2006-12-05 Daniel Berlin <dberlin@dberlin.org>
* tree-ssa-structalias.c (set_used_smts): Re-fix pr29156.
Optimize to avoid marking more SMT's as used when they aren't.
2006-12-05 Eric Christopher <echristo@apple.com> 2006-12-05 Eric Christopher <echristo@apple.com>
* config/i386/i386.c (x86_output_aligned_bss): Move out * config/i386/i386.c (x86_output_aligned_bss): Move out
......
...@@ -3894,15 +3894,21 @@ set_used_smts (void) ...@@ -3894,15 +3894,21 @@ set_used_smts (void)
unsigned int j; unsigned int j;
var_ann_t va; var_ann_t va;
struct ptr_info_def *pi = NULL; struct ptr_info_def *pi = NULL;
if (TREE_CODE (vi->decl) == SSA_NAME) /* For parm decls, the pointer info may be under the default
def. */
if (TREE_CODE (vi->decl) == PARM_DECL
&& gimple_default_def (cfun, var))
pi = SSA_NAME_PTR_INFO (gimple_default_def (cfun, var));
else if (TREE_CODE (var) == SSA_NAME)
pi = SSA_NAME_PTR_INFO (var); pi = SSA_NAME_PTR_INFO (var);
/* Skip the special variables and those without their own /* Skip the special variables and those without their own
solution set. */ solution set. */
if (vi->is_special_var || vi->node != vi->id || !SSA_VAR_P (var) if (vi->is_special_var || vi->node != vi->id || !SSA_VAR_P (var)
|| (pi && !pi->is_dereferenced) || (pi && !pi->is_dereferenced)
|| (DECL_P (var) && !may_be_aliased (var))) || (TREE_CODE (var) == VAR_DECL && !may_be_aliased (var))
|| !POINTER_TYPE_P (TREE_TYPE (var)))
continue; continue;
if (TREE_CODE (var) == SSA_NAME) if (TREE_CODE (var) == SSA_NAME)
...@@ -3913,17 +3919,8 @@ set_used_smts (void) ...@@ -3913,17 +3919,8 @@ set_used_smts (void)
continue; continue;
smt = va->symbol_mem_tag; smt = va->symbol_mem_tag;
if (smt) if (smt && bitmap_bit_p (vi->solution, anything_id))
{ bitmap_set_bit (used_smts, DECL_UID (smt));
EXECUTE_IF_SET_IN_BITMAP (vi->solution, 0, j, bi)
{
if (get_varinfo (j)->is_artificial_var)
{
bitmap_set_bit (used_smts, DECL_UID (smt));
break;
}
}
}
} }
} }
......
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