diff options
author | rguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2008-07-07 15:11:29 +0000 |
---|---|---|
committer | rguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2008-07-07 15:11:29 +0000 |
commit | 7a827b074d455653458eb3144371741d7ffbafdb (patch) | |
tree | afd0ad862ac893fe8d11c0aaafd31d7e4f0e6d42 /gcc/tree-flow-inline.h | |
parent | 33be53f9aac81af8d43337bd00bf2d696a34b11e (diff) | |
download | gcc-7a827b074d455653458eb3144371741d7ffbafdb.tar.gz |
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.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@137571 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/tree-flow-inline.h')
-rw-r--r-- | gcc/tree-flow-inline.h | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/gcc/tree-flow-inline.h b/gcc/tree-flow-inline.h index bff697db5ae..19a3002dfda 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) { |