diff options
Diffstat (limited to 'gcc/ipa-dfe.h')
-rw-r--r-- | gcc/ipa-dfe.h | 80 |
1 files changed, 40 insertions, 40 deletions
diff --git a/gcc/ipa-dfe.h b/gcc/ipa-dfe.h index b00575c5003..d7cb428f0e9 100644 --- a/gcc/ipa-dfe.h +++ b/gcc/ipa-dfe.h @@ -32,40 +32,40 @@ class SpecificTypeCollector : public TypeWalker { public: /* C is the set of types that are to be looked for. */ - SpecificTypeCollector (std::set<const_tree> &c) : _collect_these_types (c) + SpecificTypeCollector (std::set<tree> &c) : _collect_these_types (c) {}; /* Get final result of all types which point to types in C. */ - std::set<const_tree> get_set (); + std::set<tree> get_set (); private: /* _collect_these_types holds the input. */ - const std::set<const_tree> &_collect_these_types; + const std::set<tree> &_collect_these_types; /* Working set that holds final result. */ - std::set<const_tree> to_return; + std::set<tree> to_return; /* Sets which reach current subtype. */ - std::set<const_tree> path; + std::set<tree> path; /* Push or pop from path. */ - virtual void _walk_ARRAY_TYPE_pre (const_tree t); - virtual void _walk_ARRAY_TYPE_post (const_tree t); - virtual void _walk_UNION_TYPE_pre (const_tree t); - virtual void _walk_UNION_TYPE_post (const_tree t); - virtual void _walk_POINTER_TYPE_pre (const_tree t); - virtual void _walk_POINTER_TYPE_post (const_tree t); + virtual void _walk_ARRAY_TYPE_pre (tree t); + virtual void _walk_ARRAY_TYPE_post (tree t); + virtual void _walk_UNION_TYPE_pre (tree t); + virtual void _walk_UNION_TYPE_post (tree t); + virtual void _walk_POINTER_TYPE_pre (tree t); + virtual void _walk_POINTER_TYPE_post (tree t); /* If in input, place all parent types in to_return. */ - virtual void _walk_RECORD_TYPE_pre (const_tree t); - virtual void _walk_RECORD_TYPE_post (const_tree t); + virtual void _walk_RECORD_TYPE_pre (tree t); + virtual void _walk_RECORD_TYPE_post (tree t); }; /* Map old RECORD_TYPE -> new RECORD_TYPE. */ -typedef std::map<const_tree, tree> reorg_record_map_t; +typedef std::map<tree, tree> reorg_record_map_t; /* Map RECORD_TYPE -> (FIELD_DECL -> delete). */ -typedef std::map<const_tree, std::pair<tree, bool> > reorg_field_map_t; +typedef std::map<tree, std::pair<tree, bool> > reorg_field_map_t; /* Class used to create new types derived from types that have fields * that can be deleted. */ @@ -77,7 +77,7 @@ public: {}; /* Whether a type has already been modified. */ - virtual bool is_memoized (const_tree t); + virtual bool is_memoized (tree t); // Final result for record map. reorg_record_map_t get_map (); @@ -86,7 +86,7 @@ public: reorg_field_map_t get_field_map (); /* Map RECORD_TYPE -> is_modified. */ - typedef std::map<const_tree, bool> is_modified_map_t; + typedef std::map<tree, bool> is_modified_map_t; protected: const char *get_new_suffix (); @@ -95,10 +95,10 @@ protected: std::stack<tree> in_progress; // Path to current subtype - std::stack<const_tree> for_reference; + std::stack<tree> for_reference; // OLD FIELD -> new FIELD - typedef std::pair<const_tree, tree> field_tuple_t; + typedef std::pair<tree, tree> field_tuple_t; // list of fields for new type typedef std::vector<field_tuple_t> field_tuple_list_t; @@ -127,28 +127,28 @@ protected: // Keep track of which types may need to be modified // defaults to not modified. - void set_is_not_modified_yet (const_tree); + void set_is_not_modified_yet (tree); // Mark all types reaching here will need to be modified. void mark_all_pointing_here_as_modified (); // If the type has been modified. - bool get_is_modified (const_tree); + bool get_is_modified (tree); private: // Compute new FIELD_DECL list. - virtual void _walk_field_pre (const_tree); - virtual void _walk_field_post (const_tree); + virtual void _walk_field_pre (tree); + virtual void _walk_field_post (tree); // Compute new RECORD_TYPE. - virtual void _walk_RECORD_TYPE_pre (const_tree); - virtual void _walk_RECORD_TYPE_post (const_tree); + virtual void _walk_RECORD_TYPE_pre (tree); + virtual void _walk_RECORD_TYPE_post (tree); // Compute new type which points to new record type. - virtual void _walk_ARRAY_TYPE_pre (const_tree); - virtual void _walk_ARRAY_TYPE_post (const_tree); - virtual void _walk_POINTER_TYPE_pre (const_tree); - virtual void _walk_POINTER_TYPE_post (const_tree); + virtual void _walk_ARRAY_TYPE_pre (tree); + virtual void _walk_ARRAY_TYPE_post (tree); + virtual void _walk_POINTER_TYPE_pre (tree); + virtual void _walk_POINTER_TYPE_post (tree); }; /* Modify expressions to match the new types. @@ -166,7 +166,7 @@ public: /* Create an inverse map new RECORD_TYPE -> old RECORD_TYPE. */ for (reorg_record_map_t::iterator i = map.begin (), e = map.end (); i != e; ++i) { - const_tree original = i->first; + tree original = i->first; tree modified = i->second; _imap[modified] = original; } @@ -197,20 +197,20 @@ private: reorg_field_map_t _map2; // New RECORD_TYPE -> old RECORD_TYPE. - std::map<tree, const_tree> _imap; - void _walk_post (const_tree e); + std::map<tree, tree> _imap; + void _walk_post (tree e); // Substitute types and create new offset. - void _walk_MEM_REF_post (const_tree e); + void _walk_MEM_REF_post (tree e); // Substitute fields referred. - void _walk_COMPONENT_REF_post (const_tree e); + void _walk_COMPONENT_REF_post (tree e); // Relayout parameters which are rewritten. - void _walk_PARM_DECL_post (const_tree e); + void _walk_PARM_DECL_post (tree e); // Substitute return type. - void _walk_FUNCTION_DECL_post (const_tree e); + void _walk_FUNCTION_DECL_post (tree e); }; // Walk all gimple and substitute types. @@ -233,13 +233,13 @@ private: // rewrite types in these statements virtual void _walk_pre_gphi (gphi *); - virtual void _walk_pre_tree (const_tree); + virtual void _walk_pre_tree (tree); virtual void _walk_pre_greturn (greturn *s); virtual void _walk_pre_gassign (gassign *s); }; // Get a set of all types pointing to types in RECORD_FIELD_OFFSET_MAP. -std::set<const_tree> +std::set<tree> get_all_types_pointing_to (record_field_offset_map_t record_field_offset_map, tpartitions_t casting); @@ -248,7 +248,7 @@ typedef std::pair<reorg_record_map_t, reorg_field_map_t> reorg_maps_t; // Compute the replacement types. reorg_maps_t get_types_replacement (record_field_offset_map_t record_field_offset_map, - std::set<const_tree> to_modify); + std::set<tree> to_modify); // Substitute types. void @@ -256,6 +256,6 @@ substitute_types_in_program (reorg_record_map_t map, reorg_field_map_t field_map, bool _delete); tree -get_new_identifier (const_tree type, const char *suffix); +get_new_identifier (tree type, const char *suffix); #endif /* GCC_IPA_DFE */ |