aboutsummaryrefslogtreecommitdiff
path: root/gcc/df.h
diff options
context:
space:
mode:
authorBill Schmidt <wschmidt@linux.vnet.ibm.com>2014-08-20 20:11:53 +0000
committerWilliam Schmidt <wschmidt@gcc.gnu.org>2014-08-20 20:11:53 +0000
commit22e6bd6f6c83773aad53732b5880eb07d9100499 (patch)
treef16ef727424915ea7d23972c171881bf15c630a7 /gcc/df.h
parentcffe22c52a61b5ff19242712661dd014fcaeb74c (diff)
downloadgcc-22e6bd6f6c83773aad53732b5880eb07d9100499.zip
gcc-22e6bd6f6c83773aad53732b5880eb07d9100499.tar.gz
gcc-22e6bd6f6c83773aad53732b5880eb07d9100499.tar.bz2
df.h (web_entry_base): Replace existing struct web_entry with a new class web_entry_base with only the...
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. From-SVN: r214242
Diffstat (limited to 'gcc/df.h')
-rw-r--r--gcc/df.h28
1 files changed, 15 insertions, 13 deletions
diff --git a/gcc/df.h b/gcc/df.h
index 9f54023..c20f8a0 100644
--- a/gcc/df.h
+++ b/gcc/df.h
@@ -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 */