Commit a40d3497 by Richard Guenther Committed by Richard Biener

re PR tree-optimization/25734 (ice for legal kernel code with -Os)

2006-01-11  Richard Guenther  <rguenther@suse.de>

	PR tree-optimization/25734
	* tree-ssa-forwprop.c (forward_propagate_addr_expr_1): Do not
	stop propagation after successful propagation to the LHS.

	* gcc.dg/tree-ssa/pr25734.c: New testcase.

From-SVN: r109598
parent 68f9b844
2006-01-11 Richard Guenther <rguenther@suse.de>
PR tree-optimization/25734
* tree-ssa-forwprop.c (forward_propagate_addr_expr_1): Do not
stop propagation after successful propagation to the LHS.
2006-01-11 Kazu Hirata <kazu@codesourcery.com>
* basic-block.h (control_flow_graph): Change the type of
......
2006-01-11 Richard Guenther <rguenther@suse.de>
PR tree-optimization/25734
* gcc.dg/tree-ssa/pr25734.c: New testcase.
2006-01-10 Bernhard Fischer <rep.nop@aon.at>
PR fortran/25486
/* { dg-do compile } */
/* { dg-options "-Os" } */
struct list_head {
struct list_head *next;
};
static inline __attribute__((always_inline)) void list_del_init(struct
list_head *entry)
{
__list_del(entry->next);
(entry)->next = (entry);
};
struct dentry {
void *d_fsdata;
};
struct sysfs_dirent {
struct list_head s_sibling;
struct list_head s_children;
};
const char *sysfs_get_name(struct sysfs_dirent *);
void sysfs_hash_and_remove(struct dentry * dir, const char * name)
{
struct sysfs_dirent * sd;
struct sysfs_dirent * parent_sd = dir->d_fsdata;
for (sd = (struct sysfs_dirent *)((&parent_sd->s_children)->next);
&sd->s_sibling != (&parent_sd->s_children);
sd = (struct sysfs_dirent *)sd->s_sibling.next) {
if (!__builtin_strcmp(sysfs_get_name(sd), name))
{
list_del_init(&sd->s_sibling);
break;
}
}
}
......@@ -686,7 +686,6 @@ forward_propagate_addr_expr_1 (tree stmt, tree use_stmt)
TREE_OPERAND (lhs, 0) = unshare_expr (TREE_OPERAND (stmt, 1));
fold_stmt_inplace (use_stmt);
tidy_after_forward_propagate_addr (use_stmt);
return true;
}
/* Trivial case. The use statement could be a trivial copy. We
......@@ -696,7 +695,7 @@ forward_propagate_addr_expr_1 (tree stmt, tree use_stmt)
we can catch some cascading effects, ie the single use is
in a copy, and the copy is used later by a single INDIRECT_REF
for example. */
if (TREE_CODE (lhs) == SSA_NAME && TREE_OPERAND (use_stmt, 1) == name)
else if (TREE_CODE (lhs) == SSA_NAME && TREE_OPERAND (use_stmt, 1) == name)
{
TREE_OPERAND (use_stmt, 1) = unshare_expr (TREE_OPERAND (stmt, 1));
tidy_after_forward_propagate_addr (use_stmt);
......
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