diff options
author | wschmidt <wschmidt@138bc75d-0d04-0410-961f-82ee72b054a4> | 2014-08-20 20:11:53 +0000 |
---|---|---|
committer | wschmidt <wschmidt@138bc75d-0d04-0410-961f-82ee72b054a4> | 2014-08-20 20:11:53 +0000 |
commit | 370ad268cbf423737b0ffeeb0b936a52a16f4fd1 (patch) | |
tree | f16ef727424915ea7d23972c171881bf15c630a7 /gcc/df.h | |
parent | 84c77ebd83c3b423273439485e422d57d6cd0069 (diff) | |
download | gcc-370ad268cbf423737b0ffeeb0b936a52a16f4fd1.tar.gz |
2014-08-20 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
* df.h (web_entry_base): Replace existing struct web_entry with a
new class web_entry_base with only the predecessor member.
(unionfind_root): Remove declaration and move to class member.
(unionfind_union): Remove declaration and move to friend
function.
(union_defs): Remove declaration.
* web.c (web_entry_base::unionfind_root): Modify to be member
function and adjust accessors.
(unionfind_union): Modify to be friend function and adjust
accessors.
(web_entry): New subclass of web_entry_base containing the reg
member.
(union_match_dups): Modify for struct -> class changes.
(union_defs): Likewise.
(entry_register): Likewise.
(pass_web::execute): Likewise.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@214242 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/df.h')
-rw-r--r-- | gcc/df.h | 28 |
1 files changed, 15 insertions, 13 deletions
@@ -1184,20 +1184,22 @@ df_single_use (const df_insn_info *info) /* web */ -/* This entry is allocated for each reference in the insn stream. */ -struct web_entry +class web_entry_base { - /* Pointer to the parent in the union/find tree. */ - struct web_entry *pred; - /* Newly assigned register to the entry. Set only for roots. */ - rtx reg; - void* extra_info; -}; + private: + /* Reference to the parent in the union/find tree. */ + web_entry_base *pred_pvt; + + public: + /* Accessors. */ + web_entry_base *pred () { return pred_pvt; } + void set_pred (web_entry_base *p) { pred_pvt = p; } -extern struct web_entry *unionfind_root (struct web_entry *); -extern bool unionfind_union (struct web_entry *, struct web_entry *); -extern void union_defs (df_ref, struct web_entry *, - unsigned int *used, struct web_entry *, - bool (*fun) (struct web_entry *, struct web_entry *)); + /* Find representative in union-find tree. */ + web_entry_base *unionfind_root (); + + /* Union with another set, returning TRUE if they are already unioned. */ + friend bool unionfind_union (web_entry_base *first, web_entry_base *second); +}; #endif /* GCC_DF_H */ |