re PR tree-optimization/49539 (ICE building gnattools)
PR tree-optimization/49539 * tree-ssa-forwprop.c (can_propagate_from): Check for abnormal SSA names by means of stmt_references_abnormal_ssa_name. (associate_plusminus): Call can_propagate_from before propagating from definition statements. (ssa_forward_propagate_and_combine): Remove superfluous newline. From-SVN: r175650
This commit is contained in:
parent
f732fa7b6c
commit
931050d044
2 changed files with 19 additions and 13 deletions
|
@ -1,3 +1,12 @@
|
|||
2011-06-29 Eric Botcazou <ebotcazou@adacore.com>
|
||||
|
||||
PR tree-optimization/49539
|
||||
* tree-ssa-forwprop.c (can_propagate_from): Check for abnormal SSA
|
||||
names by means of stmt_references_abnormal_ssa_name.
|
||||
(associate_plusminus): Call can_propagate_from before propagating
|
||||
from definition statements.
|
||||
(ssa_forward_propagate_and_combine): Remove superfluous newline.
|
||||
|
||||
2011-06-29 Richard Guenther <rguenther@suse.de>
|
||||
|
||||
* doc/invoke.texi: Document -scev dump modifier.
|
||||
|
@ -963,7 +972,7 @@
|
|||
|
||||
2011-06-20 Changpeng Fang <changpeng.fang@amd.com>
|
||||
|
||||
PR i386/49089
|
||||
PR target/49089
|
||||
* config/i386/i386.c (avx256_split_unaligned_load): New definition.
|
||||
(avx256_split_unaligned_store): New definition.
|
||||
(ix86_option_override_internal): Enable avx256 unaligned load/store
|
||||
|
|
|
@ -260,9 +260,6 @@ get_prop_source_stmt (tree name, bool single_use_only, bool *single_use_p)
|
|||
static bool
|
||||
can_propagate_from (gimple def_stmt)
|
||||
{
|
||||
use_operand_p use_p;
|
||||
ssa_op_iter iter;
|
||||
|
||||
gcc_assert (is_gimple_assign (def_stmt));
|
||||
|
||||
/* If the rhs has side-effects we cannot propagate from it. */
|
||||
|
@ -280,9 +277,8 @@ can_propagate_from (gimple def_stmt)
|
|||
return true;
|
||||
|
||||
/* We cannot propagate ssa names that occur in abnormal phi nodes. */
|
||||
FOR_EACH_SSA_USE_OPERAND (use_p, def_stmt, iter, SSA_OP_USE)
|
||||
if (SSA_NAME_OCCURS_IN_ABNORMAL_PHI (USE_FROM_PTR (use_p)))
|
||||
return false;
|
||||
if (stmt_references_abnormal_ssa_name (def_stmt))
|
||||
return false;
|
||||
|
||||
/* If the definition is a conversion of a pointer to a function type,
|
||||
then we can not apply optimizations as some targets require
|
||||
|
@ -1803,7 +1799,8 @@ associate_plusminus (gimple stmt)
|
|||
{
|
||||
gimple def_stmt = SSA_NAME_DEF_STMT (rhs2);
|
||||
if (is_gimple_assign (def_stmt)
|
||||
&& gimple_assign_rhs_code (def_stmt) == NEGATE_EXPR)
|
||||
&& gimple_assign_rhs_code (def_stmt) == NEGATE_EXPR
|
||||
&& can_propagate_from (def_stmt))
|
||||
{
|
||||
code = (code == MINUS_EXPR) ? PLUS_EXPR : MINUS_EXPR;
|
||||
gimple_assign_set_rhs_code (stmt, code);
|
||||
|
@ -1820,7 +1817,8 @@ associate_plusminus (gimple stmt)
|
|||
{
|
||||
gimple def_stmt = SSA_NAME_DEF_STMT (rhs1);
|
||||
if (is_gimple_assign (def_stmt)
|
||||
&& gimple_assign_rhs_code (def_stmt) == NEGATE_EXPR)
|
||||
&& gimple_assign_rhs_code (def_stmt) == NEGATE_EXPR
|
||||
&& can_propagate_from (def_stmt))
|
||||
{
|
||||
code = MINUS_EXPR;
|
||||
gimple_assign_set_rhs_code (stmt, code);
|
||||
|
@ -1863,7 +1861,7 @@ associate_plusminus (gimple stmt)
|
|||
if (TREE_CODE (rhs1) == SSA_NAME)
|
||||
{
|
||||
gimple def_stmt = SSA_NAME_DEF_STMT (rhs1);
|
||||
if (is_gimple_assign (def_stmt))
|
||||
if (is_gimple_assign (def_stmt) && can_propagate_from (def_stmt))
|
||||
{
|
||||
enum tree_code def_code = gimple_assign_rhs_code (def_stmt);
|
||||
if (def_code == PLUS_EXPR
|
||||
|
@ -1963,7 +1961,7 @@ associate_plusminus (gimple stmt)
|
|||
if (rhs2 && TREE_CODE (rhs2) == SSA_NAME)
|
||||
{
|
||||
gimple def_stmt = SSA_NAME_DEF_STMT (rhs2);
|
||||
if (is_gimple_assign (def_stmt))
|
||||
if (is_gimple_assign (def_stmt) && can_propagate_from (def_stmt))
|
||||
{
|
||||
enum tree_code def_code = gimple_assign_rhs_code (def_stmt);
|
||||
if (def_code == PLUS_EXPR
|
||||
|
@ -2285,8 +2283,7 @@ ssa_forward_propagate_and_combine (void)
|
|||
else
|
||||
gsi_next (&gsi);
|
||||
}
|
||||
else if (code == POINTER_PLUS_EXPR
|
||||
&& can_propagate_from (stmt))
|
||||
else if (code == POINTER_PLUS_EXPR && can_propagate_from (stmt))
|
||||
{
|
||||
if (TREE_CODE (gimple_assign_rhs2 (stmt)) == INTEGER_CST
|
||||
/* ??? Better adjust the interface to that function
|
||||
|
|
Loading…
Add table
Reference in a new issue