From 4630573709177f43b6b755326c90d6b777fbb2ab Mon Sep 17 00:00:00 2001 From: Jan Hubicka Date: Mon, 2 Mar 2015 01:54:46 +0100 Subject: 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 --- gcc/ipa-icf.h | 25 +++++++++++-------------- 1 file changed, 11 insertions(+), 14 deletions(-) (limited to 'gcc/ipa-icf.h') 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 + &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 - &ignored_nodes, - symtab_node *n1, symtab_node *n2, - bool address); - /* Processes function equality comparison. */ bool equals_private (sem_item *item, hash_map &ignored_nodes); @@ -402,12 +403,8 @@ public: hash_map &ignored_nodes); /* Fast equality variable based on knowledge known in WPA. */ - inline virtual bool equals_wpa (sem_item *item, - hash_map & ARG_UNUSED(ignored_nodes)) - { - gcc_assert (item->type == VAR); - return true; - } + virtual bool equals_wpa (sem_item *item, + hash_map &ignored_nodes); /* Returns varpool_node. */ inline varpool_node *get_node (void) -- cgit v1.1