diff options
author | Richard Sandiford <richard.sandiford@linaro.org> | 2017-08-29 07:47:05 +0000 |
---|---|---|
committer | Richard Sandiford <rsandifo@gcc.gnu.org> | 2017-08-29 07:47:05 +0000 |
commit | a844293de1d30da8ddba7384fc22ae59e857709f (patch) | |
tree | 29ae014a56a196ff0764a9dd8c569efb193cb413 /gcc/tree-call-cdce.c | |
parent | 130fcab02f1fbb097fc52fc9a8892472e3fa0c6c (diff) | |
download | gcc-a844293de1d30da8ddba7384fc22ae59e857709f.zip gcc-a844293de1d30da8ddba7384fc22ae59e857709f.tar.gz gcc-a844293de1d30da8ddba7384fc22ae59e857709f.tar.bz2 |
Set the call nothrow flag more often
This patch sets the nothrow flag for various calls to internal functions
that are not inherently NOTHROW (and so can't be declared that way in
internal-fn.def) but that are used in contexts that can guarantee
NOTHROWness.
2017-08-29 Richard Sandiford <richard.sandiford@linaro.org>
gcc/
* gimplify.c (gimplify_call_expr): Copy the nothrow flag to
calls to internal functions.
(gimplify_modify_expr): Likewise.
* tree-call-cdce.c (use_internal_fn): Likewise.
* tree-ssa-math-opts.c (pass_cse_reciprocals::execute): Likewise.
(convert_to_divmod): Set the nothrow flag.
* tree-if-conv.c (predicate_mem_writes): Likewise.
* tree-vect-stmts.c (vectorizable_mask_load_store): Likewise.
(vectorizable_call): Likewise.
(vectorizable_store): Likewise.
(vectorizable_load): Likewise.
* tree-vect-patterns.c (vect_recog_pow_pattern): Likewise.
(vect_recog_mask_conversion_pattern): Likewise.
From-SVN: r251401
Diffstat (limited to 'gcc/tree-call-cdce.c')
-rw-r--r-- | gcc/tree-call-cdce.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/gcc/tree-call-cdce.c b/gcc/tree-call-cdce.c index 862d1a6..1578350 100644 --- a/gcc/tree-call-cdce.c +++ b/gcc/tree-call-cdce.c @@ -1019,6 +1019,7 @@ use_internal_fn (gcall *call) args.safe_push (gimple_call_arg (call, i)); gcall *new_call = gimple_build_call_internal_vec (ifn, args); gimple_set_location (new_call, gimple_location (call)); + gimple_call_set_nothrow (new_call, gimple_call_nothrow_p (call)); /* Transfer the LHS to the new call. */ tree lhs = gimple_call_lhs (call); |