diff options
author | hubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4> | 2015-12-09 07:34:16 +0000 |
---|---|---|
committer | hubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4> | 2015-12-09 07:34:16 +0000 |
commit | a0041abf187421a1033268e457bb0b350210f62b (patch) | |
tree | a589b3f752ddc9ef0c99801a8a2355889655a259 /gcc/ipa-reference.h | |
parent | ad9c5157e7d3386aa0d3e5d9a87fda7c4505ac66 (diff) | |
download | gcc-a0041abf187421a1033268e457bb0b350210f62b.tar.gz |
PR ipa/61886
PR middle-end/25140
* ipa-reference.c (is_improper): Break out from ...
(is_proper_for_analysis): ... here; fix WRT aliases.
(analyze_function, generate_summary,
ipa_reference_write_optimization_summary,
ipa_reference_read_optimization_summary): Use ipa_reference_var_uid.
* ipa-refrence.h (ipa_reference_var_uid): New inline.
* tree-ssa-alias.c (ref_maybe_used_by_call_p_1,
call_may_clobber_ref_p_1): Use ipa_reference_var_uid.
* gcc.c-torture/execute/alias-3.c: New testcase.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@231442 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ipa-reference.h')
-rw-r--r-- | gcc/ipa-reference.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/gcc/ipa-reference.h b/gcc/ipa-reference.h index 137d7e8a62d..6e9d6e70017 100644 --- a/gcc/ipa-reference.h +++ b/gcc/ipa-reference.h @@ -26,5 +26,11 @@ bitmap ipa_reference_get_not_read_global (struct cgraph_node *fn); bitmap ipa_reference_get_not_written_global (struct cgraph_node *fn); void ipa_reference_c_finalize (void); +inline int +ipa_reference_var_uid (tree t) +{ + return DECL_UID (symtab_node::get (t)->ultimate_alias_target (NULL)->decl); +} + #endif /* GCC_IPA_REFERENCE_H */ |