This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH 11/11] Make opt_pass and gcc::pipeline be GC-managed
- From: "Bernhard Reutner-Fischer" <rep dot dot dot nop at gmail dot com>
- To: David Malcolm <dmalcolm at redhat dot com>, <gcc-patches at gcc dot gnu dot org>
- Date: Sat, 27 Jul 2013 18:07:21 +0200
- Subject: Re: [PATCH 11/11] Make opt_pass and gcc::pipeline be GC-managed
- References: <1374851081-32153-1-git-send-email-dmalcolm at redhat dot com> <1374851081-32153-12-git-send-email-dmalcolm at redhat dot com>
On 26 July 2013 17:04:41 David Malcolm <dmalcolm@redhat.com> wrote:
diff --git a/gcc/passes.c b/gcc/passes.c
index ce5cdeb..dd1b0ba 100644
--- a/gcc/passes.c
+++ b/gcc/passes.c
+
+void gt_pch_nx_pipeline (void *this_obj, void *p,
+ gt_pointer_operator op, void *cookie)
+{
+ pipeline *passes = (pipeline *)p;
+ if (p == this_obj)
+ passes->gt_pch_nx_with_op (op, cookie);
+}
+
/* Call from anywhere to find out what pass this is. Useful for
printing out debugging information deep inside an service
s/an service/a service/;# separate patch
diff --git a/gcc/tree-pass.h b/gcc/tree-pass.h
index 41d5d92..c3e89d4 100644
--- a/gcc/tree-pass.h
+++ b/gcc/tree-pass.h
@@ -76,11 +76,22 @@ namespace gcc
/* An instance of a pass. This is also "pass_data" to minimize the
changes in existing code. */
-class opt_pass : public pass_data
+class GTY((user)) opt_pass : public pass_data
{
public:
+ /* Ensure that instances are allocated in the GC-managed heap. */
+ void *operator new (size_t sz);
+
virtual ~opt_pass () { }
+ /* GTY((user)) methods, to be called once per traversal.
+ opt_pass subclasses with additional GC-managed data should overide
s/ overide/ override/
Not a review but sounds goodish.
Sent with AquaMail for Android
http://www.aqua-mail.com