aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-flow-inline.h
diff options
context:
space:
mode:
authorRichard Guenther <rguenther@suse.de>2008-07-07 15:11:29 +0000
committerRichard Biener <rguenth@gcc.gnu.org>2008-07-07 15:11:29 +0000
commit115340c79fdd40c3b8c809ef81a1deebec0a2500 (patch)
treeafd0ad862ac893fe8d11c0aaafd31d7e4f0e6d42 /gcc/tree-flow-inline.h
parent511e41e54d2f5bd036740518781e126ecccbad49 (diff)
downloadgcc-115340c79fdd40c3b8c809ef81a1deebec0a2500.zip
gcc-115340c79fdd40c3b8c809ef81a1deebec0a2500.tar.gz
gcc-115340c79fdd40c3b8c809ef81a1deebec0a2500.tar.bz2
re PR target/36713 (r137252 breaks -O2 optimization on x86_64-unknown-linux-gnu)
2008-07-07 Richard Guenther <rguenther@suse.de> PR tree-optimization/36713 * tree-flow-inline.h (is_call_used): New function. * tree-nrv.c (dest_safe_for_nrv_p): Use it. * tree-tailcall.c (suitable_for_tail_opt_p): Likewise. * tree-outof-ssa.c (create_temp): Set call-used flag if required. From-SVN: r137571
Diffstat (limited to 'gcc/tree-flow-inline.h')
-rw-r--r--gcc/tree-flow-inline.h10
1 files changed, 9 insertions, 1 deletions
diff --git a/gcc/tree-flow-inline.h b/gcc/tree-flow-inline.h
index bff697d..19a3002 100644
--- a/gcc/tree-flow-inline.h
+++ b/gcc/tree-flow-inline.h
@@ -881,7 +881,15 @@ factoring_name_p (const_tree name)
return TREE_CODE (SSA_NAME_VAR (name)) == MEMORY_PARTITION_TAG;
}
-/* Return true if VAR is a clobbered by function calls. */
+/* Return true if VAR is used by function calls. */
+static inline bool
+is_call_used (const_tree var)
+{
+ return (var_ann (var)->call_clobbered
+ || bitmap_bit_p (gimple_call_used_vars (cfun), DECL_UID (var)));
+}
+
+/* Return true if VAR is clobbered by function calls. */
static inline bool
is_call_clobbered (const_tree var)
{