diff options
author | Jan Hubicka <hubicka@ucw.cz> | 2015-03-02 01:54:46 +0100 |
---|---|---|
committer | Jan Hubicka <hubicka@gcc.gnu.org> | 2015-03-02 00:54:46 +0000 |
commit | 4630573709177f43b6b755326c90d6b777fbb2ab (patch) | |
tree | 1bf0d2f405c6066ed16c44e927b47c0df6db8629 /gcc/ipa-icf.h | |
parent | 3c37b96b8761e80bd99fc1e19879f94e647d6869 (diff) | |
download | gcc-4630573709177f43b6b755326c90d6b777fbb2ab.zip gcc-4630573709177f43b6b755326c90d6b777fbb2ab.tar.gz gcc-4630573709177f43b6b755326c90d6b777fbb2ab.tar.bz2 |
ipa-icf.c: Include stor-layout.h
* ipa-icf.c: Include stor-layout.h
(sem_function::compare_cgraph_references): Rename to ...
(sem_item::compare_cgraph_references): ... this one.
(sem_variable::equals_wpa): New function
(sem_variable::equals): Do not check stuff already verified by
equals_wpa.
(sem_variable::equals): Reorg based on varasm.c:compare_constant.
* ipa-icf.h (sem_item): Add compare_cgraph_references.
(sem_function): Remove compare_cgraph_references.
(sem_variable): Turns equals_wpa into non-inline.
From-SVN: r221096
Diffstat (limited to 'gcc/ipa-icf.h')
-rw-r--r-- | gcc/ipa-icf.h | 25 |
1 files changed, 11 insertions, 14 deletions
diff --git a/gcc/ipa-icf.h b/gcc/ipa-icf.h index 3e5d458..b4862b7 100644 --- a/gcc/ipa-icf.h +++ b/gcc/ipa-icf.h @@ -241,9 +241,18 @@ public: protected: /* Cached, once calculated hash for the item. */ hashval_t hash; + /* Accumulate to HSTATE a hash of constructor expression EXP. */ static void add_expr (const_tree exp, inchash::hash &hstate); + /* For a given symbol table nodes N1 and N2, we check that FUNCTION_DECLs + point to a same function. Comparison can be skipped if IGNORED_NODES + contains these nodes. ADDRESS indicate if address is taken. */ + bool compare_cgraph_references (hash_map <symtab_node *, sem_item *> + &ignored_nodes, + symtab_node *n1, symtab_node *n2, + bool address); + private: /* Initialize internal data structures. Bitmap STACK is used for bitmap memory allocation process. */ @@ -353,14 +362,6 @@ private: ICF flags are the same. */ bool compare_edge_flags (cgraph_edge *e1, cgraph_edge *e2); - /* For a given symbol table nodes N1 and N2, we check that FUNCTION_DECLs - point to a same function. Comparison can be skipped if IGNORED_NODES - contains these nodes. ADDRESS indicate if address is taken. */ - bool compare_cgraph_references (hash_map <symtab_node *, sem_item *> - &ignored_nodes, - symtab_node *n1, symtab_node *n2, - bool address); - /* Processes function equality comparison. */ bool equals_private (sem_item *item, hash_map <symtab_node *, sem_item *> &ignored_nodes); @@ -402,12 +403,8 @@ public: hash_map <symtab_node *, sem_item *> &ignored_nodes); /* Fast equality variable based on knowledge known in WPA. */ - inline virtual bool equals_wpa (sem_item *item, - hash_map <symtab_node *, sem_item *> & ARG_UNUSED(ignored_nodes)) - { - gcc_assert (item->type == VAR); - return true; - } + virtual bool equals_wpa (sem_item *item, + hash_map <symtab_node *, sem_item *> &ignored_nodes); /* Returns varpool_node. */ inline varpool_node *get_node (void) |