tree-ssa-operands.h (virtual_operand_p): Declare.

2012-08-08  Richard Guenther  <rguenther@suse.de>

	* tree-ssa-operands.h (virtual_operand_p): Declare.
	* tree-ssa-operands.c (virtual_operand_p): New predicate.
	* gimple.c (is_gimple_reg): Use virtual_operand_p.
	* tree-into-ssa.c (prepare_block_for_update): Likewise.
	* tree-vect-loop-manip.c (adjust_debug_stmts): Likewise.

From-SVN: r190231
This commit is contained in:
Richard Guenther 2012-08-08 14:51:26 +00:00 committed by Richard Biener
parent aa5d8db019
commit a471762f68
6 changed files with 37 additions and 18 deletions

View File

@ -1,3 +1,11 @@
2012-08-08 Richard Guenther <rguenther@suse.de>
* tree-ssa-operands.h (virtual_operand_p): Declare.
* tree-ssa-operands.c (virtual_operand_p): New predicate.
* gimple.c (is_gimple_reg): Use virtual_operand_p.
* tree-into-ssa.c (prepare_block_for_update): Likewise.
* tree-vect-loop-manip.c (adjust_debug_stmts): Likewise.
2012-08-08 Richard Guenther <rguenther@suse.de>
* tree-call-cdce.c (check_pow): Simplify.

View File

@ -2782,19 +2782,12 @@ is_gimple_id (tree t)
bool
is_gimple_reg (tree t)
{
if (TREE_CODE (t) == SSA_NAME)
{
t = SSA_NAME_VAR (t);
if (TREE_CODE (t) == VAR_DECL
&& VAR_DECL_IS_VIRTUAL_OPERAND (t))
return false;
return true;
}
if (TREE_CODE (t) == VAR_DECL
&& VAR_DECL_IS_VIRTUAL_OPERAND (t))
if (virtual_operand_p (t))
return false;
if (TREE_CODE (t) == SSA_NAME)
return true;
if (!is_gimple_variable (t))
return false;

View File

@ -2548,14 +2548,12 @@ prepare_block_for_update (basic_block bb, bool insert_phi_p)
gimple phi = gsi_stmt (si);
tree lhs_sym, lhs = gimple_phi_result (phi);
lhs_sym = DECL_P (lhs) ? lhs : SSA_NAME_VAR (lhs);
if (TREE_CODE (lhs) == SSA_NAME
&& (TREE_CODE (lhs_sym) != VAR_DECL
|| !VAR_DECL_IS_VIRTUAL_OPERAND (lhs_sym)
|| !cfun->gimple_df->rename_vops))
&& (! virtual_operand_p (lhs)
|| ! cfun->gimple_df->rename_vops))
continue;
lhs_sym = DECL_P (lhs) ? lhs : SSA_NAME_VAR (lhs);
mark_for_renaming (lhs_sym);
mark_def_interesting (lhs_sym, phi, bb, insert_phi_p);

View File

@ -1421,6 +1421,24 @@ debug_immediate_uses_for (tree var)
}
/* Return true if OP, an SSA name or a DECL is a virtual operand. */
bool
virtual_operand_p (tree op)
{
if (TREE_CODE (op) == SSA_NAME)
{
op = SSA_NAME_VAR (op);
if (!op)
return false;
}
if (TREE_CODE (op) == VAR_DECL)
return VAR_DECL_IS_VIRTUAL_OPERAND (op);
return false;
}
/* Unlink STMTs virtual definition from the IL by propagating its use. */
void

View File

@ -116,6 +116,7 @@ extern void debug_decl_set (bitmap);
extern bool ssa_operands_active (void);
extern bool virtual_operand_p (tree);
extern void unlink_stmt_vdef (gimple);
enum ssa_op_iter_type {

View File

@ -205,8 +205,9 @@ adjust_debug_stmts (tree from, tree to, basic_block bb)
{
adjust_info ai;
if (MAY_HAVE_DEBUG_STMTS && TREE_CODE (from) == SSA_NAME
&& SSA_NAME_VAR (from) != gimple_vop (cfun))
if (MAY_HAVE_DEBUG_STMTS
&& TREE_CODE (from) == SSA_NAME
&& ! virtual_operand_p (from))
{
ai.from = from;
ai.to = to;