On 03/17/2017 06:38 AM, Trevor Saunders wrote:
On Thu, Mar 16, 2017 at 01:17:13PM -0600, Jeff Law wrote:
+thread_outgoing_edges (basic_block bb, gcond *dummy_cond,
+                      class const_and_copies *const_and_copies,
+                      class avail_exprs_stack *avail_exprs_stack,

nit picking, but what's the point in the class keyword here?
Habit :-) There's probably a ton of this kind of thing in my code. I'd like to defer cleaning that up until gcc-8.



+                      tree (*simplify) (gimple *, gimple *,
+                                        class avail_exprs_stack *,
+                                        basic_block))

this could just be pfn_simplify right?
Yes.  I fixed one of these, I wouldn't be surprised if there's more.


+  const_and_copies *equiv_stack = new const_and_copies ();

+  hash_table<expr_elt_hasher> *avail_exprs
+    = new hash_table<expr_elt_hasher> (1024);
+  avail_exprs_stack *avail_exprs_stack
+    = new class avail_exprs_stack (avail_exprs);

None of these ever live passed the end of the function right? so why not
put the objects on the stack?
Oversight. The equivalency stack was original live at the end of the function, but that's one of the things I changed. This should be fixed for gcc-7. I'll take care of it later today.


   delete equiv_stack;
+  delete avail_exprs_stack;

this misses cleaning up the hash table right?  Though of course its all
unneeded if these objects are on the stack.
Right.  I'll address this stuff in a follow-up later today.


Hoep that's useful.
Of course.  Feedback is always appreciated.

jeff

Reply via email to