diff options
author | aoliva <aoliva@138bc75d-0d04-0410-961f-82ee72b054a4> | 2011-02-02 06:18:01 +0000 |
---|---|---|
committer | aoliva <aoliva@138bc75d-0d04-0410-961f-82ee72b054a4> | 2011-02-02 06:18:01 +0000 |
commit | f665f7bba2f1d6ff7ffd8cacdc5e4d85ba167004 (patch) | |
tree | ccc3a4712d7c10046df4c3604d1167d5dafaa720 /gcc/tree-flow-inline.h | |
parent | e81986abbb09686debad9198b240245ff75fc0f2 (diff) | |
download | gcc-f665f7bba2f1d6ff7ffd8cacdc5e4d85ba167004.tar.gz |
PR debug/47106
PR debug/47402
* tree-flow-inline.h (clear_is_used, is_used_p): New.
* cfgexpand.c (account_used_vars_for_block): Use them.
* tree-nrv.c (tree_nrv): Likewise.
* tree-ssa-live.c (remove_unused_scope_block_p): Likewise.
(dump_scope_block): Likewise.
(remove_unused_locals): Likewise.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@169515 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/tree-flow-inline.h')
-rw-r--r-- | gcc/tree-flow-inline.h | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/gcc/tree-flow-inline.h b/gcc/tree-flow-inline.h index 1a62cdd1f44..23eb3d826de 100644 --- a/gcc/tree-flow-inline.h +++ b/gcc/tree-flow-inline.h @@ -569,9 +569,26 @@ static inline void set_is_used (tree var) { var_ann_t ann = get_var_ann (var); - ann->used = 1; + ann->used = true; } +/* Clear VAR's used flag. */ + +static inline void +clear_is_used (tree var) +{ + var_ann_t ann = var_ann (var); + ann->used = false; +} + +/* Return true if VAR is marked as used. */ + +static inline bool +is_used_p (tree var) +{ + var_ann_t ann = var_ann (var); + return ann->used; +} /* Return true if T (assumed to be a DECL) is a global variable. A variable is considered global if its storage is not automatic. */ |