aboutsummaryrefslogtreecommitdiff
path: root/gcc/tsan.c
diff options
context:
space:
mode:
authorRichard Biener <rguenther@suse.de>2021-04-14 13:40:58 +0200
committerRichard Biener <rguenther@suse.de>2021-04-26 10:08:46 +0200
commit52a5515ed6619739eb122f05ce26057dd8b06fb6 (patch)
treece23cf5cca7daae1d47e61007eccfdbfe862fe13 /gcc/tsan.c
parent297bfacdb448c0d29b8dfac2818350b90902bc75 (diff)
downloadgcc-52a5515ed6619739eb122f05ce26057dd8b06fb6.zip
gcc-52a5515ed6619739eb122f05ce26057dd8b06fb6.tar.gz
gcc-52a5515ed6619739eb122f05ce26057dd8b06fb6.tar.bz2
Simplify {gimplify_and_,}update_call_from_tree API
This removes update_call_from_tree in favor of gimplify_and_update_call_from_tree, removing some code duplication and simplifying the API use. Some users of update_call_from_tree have been transitioned to replace_call_with_value and the API and its dependences have been moved to gimple-fold.h. This shaves off another user of valid_gimple_rhs_p which is now only used from within gimple-fold.c and thus moved and made private. 2021-04-14 Richard Biener <rguenther@suse.de> * tree-ssa-propagate.h (valid_gimple_rhs_p): Remove. (update_gimple_call): Likewise. (update_call_from_tree): Likewise. * tree-ssa-propagate.c (valid_gimple_rhs_p): Remove. (valid_gimple_call_p): Likewise. (move_ssa_defining_stmt_for_defs): Likewise. (finish_update_gimple_call): Likewise. (update_gimple_call): Likewise. (update_call_from_tree): Likewise. (propagate_tree_value_into_stmt): Use replace_call_with_value. * gimple-fold.h (update_gimple_call): Declare. * gimple-fold.c (valid_gimple_rhs_p): Move here from tree-ssa-propagate.c. (update_gimple_call): Likewise. (valid_gimple_call_p): Likewise. (finish_update_gimple_call): Likewise, and simplify. (gimplify_and_update_call_from_tree): Implement update_call_from_tree functionality, avoid excessive push/pop_gimplify_context. (gimple_fold_builtin): Use only gimplify_and_update_call_from_tree. (gimple_fold_call): Likewise. * gimple-ssa-sprintf.c (try_substitute_return_value): Likewise. * tree-ssa-ccp.c (ccp_folder::fold_stmt): Likewise. (pass_fold_builtins::execute): Likewise. (optimize_stack_restore): Use replace_call_with_value. * tree-cfg.c (fold_loop_internal_call): Likewise. * tree-ssa-dce.c (maybe_optimize_arith_overflow): Use only gimplify_and_update_call_from_tree. * tree-ssa-strlen.c (handle_builtin_strlen): Likewise. (handle_builtin_strchr): Likewise. * tsan.c: Include gimple-fold.h instead of tree-ssa-propagate.h. * config/rs6000/rs6000-call.c (rs6000_gimple_fold_builtin): Use replace_call_with_value.
Diffstat (limited to 'gcc/tsan.c')
-rw-r--r--gcc/tsan.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/tsan.c b/gcc/tsan.c
index 7db157e..a1868b6 100644
--- a/gcc/tsan.c
+++ b/gcc/tsan.c
@@ -36,7 +36,7 @@ along with GCC; see the file COPYING3. If not see
#include "gimplify-me.h"
#include "tree-cfg.h"
#include "tree-iterator.h"
-#include "tree-ssa-propagate.h"
+#include "gimple-fold.h"
#include "tree-ssa-loop-ivopts.h"
#include "tree-eh.h"
#include "tsan.h"