Mercurial > hg > CbC > CbC_gcc
comparison gcc/ipa-icf.h @ 131:84e7813d76e9
gcc-8.2
author | mir3636 |
---|---|
date | Thu, 25 Oct 2018 07:37:49 +0900 |
parents | 04ced10e8804 |
children | 1830386684a0 |
comparison
equal
deleted
inserted
replaced
111:04ced10e8804 | 131:84e7813d76e9 |
---|---|
1 /* Interprocedural semantic function equality pass | 1 /* Interprocedural semantic function equality pass |
2 Copyright (C) 2014-2017 Free Software Foundation, Inc. | 2 Copyright (C) 2014-2018 Free Software Foundation, Inc. |
3 | 3 |
4 Contributed by Jan Hubicka <hubicka@ucw.cz> and Martin Liska <mliska@suse.cz> | 4 Contributed by Jan Hubicka <hubicka@ucw.cz> and Martin Liska <mliska@suse.cz> |
5 | 5 |
6 This file is part of GCC. | 6 This file is part of GCC. |
7 | 7 |
138 sem_item *item; | 138 sem_item *item; |
139 | 139 |
140 /* Index of usage of such an item. */ | 140 /* Index of usage of such an item. */ |
141 unsigned int index; | 141 unsigned int index; |
142 }; | 142 }; |
143 | |
144 typedef std::pair<symtab_node *, symtab_node *> symtab_pair; | |
143 | 145 |
144 /* Semantic item is a base class that encapsulates all shared functionality | 146 /* Semantic item is a base class that encapsulates all shared functionality |
145 for both semantic function and variable items. */ | 147 for both semantic function and variable items. */ |
146 class sem_item | 148 class sem_item |
147 { | 149 { |
250 If ADDRESS is true, do extra checking needed for IPA_REF_ADDR. */ | 252 If ADDRESS is true, do extra checking needed for IPA_REF_ADDR. */ |
251 static bool compare_referenced_symbol_properties (symtab_node *used_by, | 253 static bool compare_referenced_symbol_properties (symtab_node *used_by, |
252 symtab_node *n1, | 254 symtab_node *n1, |
253 symtab_node *n2, | 255 symtab_node *n2, |
254 bool address); | 256 bool address); |
255 | |
256 /* Compare two attribute lists. */ | |
257 static bool compare_attributes (const_tree list1, const_tree list2); | |
258 | 257 |
259 /* Hash properties compared by compare_referenced_symbol_properties. */ | 258 /* Hash properties compared by compare_referenced_symbol_properties. */ |
260 void hash_referenced_symbol_properties (symtab_node *ref, | 259 void hash_referenced_symbol_properties (symtab_node *ref, |
261 inchash::hash &hstate, | 260 inchash::hash &hstate, |
262 bool address); | 261 bool address); |
277 | 276 |
278 private: | 277 private: |
279 /* Initialize internal data structures. Bitmap STACK is used for | 278 /* Initialize internal data structures. Bitmap STACK is used for |
280 bitmap memory allocation process. */ | 279 bitmap memory allocation process. */ |
281 void setup (bitmap_obstack *stack); | 280 void setup (bitmap_obstack *stack); |
281 | |
282 /* Because types can be arbitrarily large, avoid quadratic bottleneck. */ | |
283 static hash_map<const_tree, hashval_t> m_type_hash_cache; | |
282 }; // class sem_item | 284 }; // class sem_item |
283 | 285 |
284 class sem_function: public sem_item | 286 class sem_function: public sem_item |
285 { | 287 { |
286 public: | 288 public: |
520 void add_class (congruence_class *cls); | 522 void add_class (congruence_class *cls); |
521 | 523 |
522 /* Gets a congruence class group based on given HASH value and TYPE. */ | 524 /* Gets a congruence class group based on given HASH value and TYPE. */ |
523 congruence_class_group *get_group_by_hash (hashval_t hash, | 525 congruence_class_group *get_group_by_hash (hashval_t hash, |
524 sem_item_type type); | 526 sem_item_type type); |
525 | |
526 /* Because types can be arbitrarily large, avoid quadratic bottleneck. */ | |
527 hash_map<const_tree, hashval_t> m_type_hash_cache; | |
528 private: | 527 private: |
529 | 528 |
530 /* For each semantic item, append hash values of references. */ | 529 /* For each semantic item, append hash values of references. */ |
531 void update_hash_by_addr_refs (); | 530 void update_hash_by_addr_refs (); |
532 | 531 |
561 to be equal. PREV_CLASS_COUNT is start number of classes | 560 to be equal. PREV_CLASS_COUNT is start number of classes |
562 before reduction. True is returned if there's a merge operation | 561 before reduction. True is returned if there's a merge operation |
563 processed. */ | 562 processed. */ |
564 bool merge_classes (unsigned int prev_class_count); | 563 bool merge_classes (unsigned int prev_class_count); |
565 | 564 |
565 /* Fixup points to analysis info. */ | |
566 void fixup_points_to_sets (void); | |
567 | |
568 /* Fixup points to set PT. */ | |
569 void fixup_pt_set (struct pt_solution *pt); | |
570 | |
566 /* Adds a newly created congruence class CLS to worklist. */ | 571 /* Adds a newly created congruence class CLS to worklist. */ |
567 void worklist_push (congruence_class *cls); | 572 void worklist_push (congruence_class *cls); |
568 | 573 |
569 /* Pops a class from worklist. */ | 574 /* Pops a class from worklist. */ |
570 congruence_class *worklist_pop (); | 575 congruence_class *worklist_pop (); |
630 /* Varpool node removal hook holder. */ | 635 /* Varpool node removal hook holder. */ |
631 varpool_node_hook_list *m_varpool_node_hooks; | 636 varpool_node_hook_list *m_varpool_node_hooks; |
632 | 637 |
633 /* Bitmap stack. */ | 638 /* Bitmap stack. */ |
634 bitmap_obstack m_bmstack; | 639 bitmap_obstack m_bmstack; |
640 | |
641 /* Vector of merged variables. Needed for fixup of points-to-analysis | |
642 info. */ | |
643 vec <symtab_pair> m_merged_variables; | |
635 }; // class sem_item_optimizer | 644 }; // class sem_item_optimizer |
636 | 645 |
637 } // ipa_icf namespace | 646 } // ipa_icf namespace |