aboutsummaryrefslogtreecommitdiff
path: root/gcc/gimplify.c
diff options
context:
space:
mode:
authorMarek Polacek <polacek@redhat.com>2016-05-24 13:34:37 +0000
committerMarek Polacek <mpolacek@gcc.gnu.org>2016-05-24 13:34:37 +0000
commitabd3a68c1343af515a1f9b5e60f2b6ed94ee1d7a (patch)
tree5012ef61f6549f21b9eb5ed7fd9978b9a7d872f0 /gcc/gimplify.c
parent30fd2977745d53f282d1560212e3bea07943a937 (diff)
downloadgcc-abd3a68c1343af515a1f9b5e60f2b6ed94ee1d7a.zip
gcc-abd3a68c1343af515a1f9b5e60f2b6ed94ee1d7a.tar.gz
gcc-abd3a68c1343af515a1f9b5e60f2b6ed94ee1d7a.tar.bz2
tree-cfg.h (should_remove_lhs_p): New predicate.
* tree-cfg.h (should_remove_lhs_p): New predicate. * cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Use it. * gimplify.c (gimplify_modify_expr): Likewise. * tree-cfg.c (verify_gimple_call): Likewise. * tree-cfgcleanup.c (fixup_noreturn_call): Likewise. * gimple-fold.c: Include "tree-cfg.h". (gimple_fold_call): Use should_remove_lhs_p. From-SVN: r236637
Diffstat (limited to 'gcc/gimplify.c')
-rw-r--r--gcc/gimplify.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/gcc/gimplify.c b/gcc/gimplify.c
index 6473544..e702bc4 100644
--- a/gcc/gimplify.c
+++ b/gcc/gimplify.c
@@ -4873,9 +4873,7 @@ gimplify_modify_expr (tree *expr_p, gimple_seq *pre_p, gimple_seq *post_p,
}
}
notice_special_calls (call_stmt);
- if (!gimple_call_noreturn_p (call_stmt)
- || TREE_ADDRESSABLE (TREE_TYPE (*to_p))
- || TREE_CODE (TYPE_SIZE_UNIT (TREE_TYPE (*to_p))) != INTEGER_CST)
+ if (!gimple_call_noreturn_p (call_stmt) || !should_remove_lhs_p (*to_p))
gimple_call_set_lhs (call_stmt, *to_p);
else if (TREE_CODE (*to_p) == SSA_NAME)
/* The above is somewhat premature, avoid ICEing later for a