diff options
author | Marek Polacek <polacek@redhat.com> | 2016-05-24 13:34:37 +0000 |
---|---|---|
committer | Marek Polacek <mpolacek@gcc.gnu.org> | 2016-05-24 13:34:37 +0000 |
commit | abd3a68c1343af515a1f9b5e60f2b6ed94ee1d7a (patch) | |
tree | 5012ef61f6549f21b9eb5ed7fd9978b9a7d872f0 /gcc/tree-cfgcleanup.c | |
parent | 30fd2977745d53f282d1560212e3bea07943a937 (diff) | |
download | gcc-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/tree-cfgcleanup.c')
-rw-r--r-- | gcc/tree-cfgcleanup.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/gcc/tree-cfgcleanup.c b/gcc/tree-cfgcleanup.c index 46d0fa3..4134c38 100644 --- a/gcc/tree-cfgcleanup.c +++ b/gcc/tree-cfgcleanup.c @@ -604,8 +604,7 @@ fixup_noreturn_call (gimple *stmt) temporaries of variable-sized types is not supported. Also don't do this with TREE_ADDRESSABLE types, as assign_temp will abort. */ tree lhs = gimple_call_lhs (stmt); - if (lhs && TREE_CODE (TYPE_SIZE_UNIT (TREE_TYPE (lhs))) == INTEGER_CST - && !TREE_ADDRESSABLE (TREE_TYPE (lhs))) + if (should_remove_lhs_p (lhs)) { gimple_call_set_lhs (stmt, NULL_TREE); |