On 05/24/2016 06:03 PM, Trevor Saunders wrote:
On Tue, May 24, 2016 at 10:58:18AM -0600, Jeff Law wrote:
--- a/gcc/tree-ssa-threadbackward.c
+++ b/gcc/tree-ssa-threadbackward.c
@@ -356,6 +356,44 @@ profitable_jump_thread_path (vec<basic_block, va_gc>
*&path,
return taken_edge;
}
+/* PATH is vector of blocks forming a jump threading path in reverse
+ order. TAKEN_EDGE is the edge taken from path[0].
+
+ Convert that path into the form used by register_jump_thread and
+ register the path. */
+
+static void
+convert_and_register_jump_thread_path (vec<basic_block, va_gc> *&path,
is there a reason that isn't vec<basic_block, va_gc> * instead of
vec<basic_block> *&? It seems like that's just useless indirection, and
allowing this function to be able to change more than it needs.
I didn't try to clean up anything of that nature. It's a good follow-up
item though. Thanks for pointing it out.
+ edge taken_edge)
+{
+ vec<jump_thread_edge *> *jump_thread_path = new vec<jump_thread_edge *> ();
Its not new, but I'm always a little sad to see something that's only
sizeof(void *) big be malloced on its own.
I wouldn't be terribly surprised if the backwards/FSM threader drops the
jump_thread_edge representation after I pull it out of the main threader
into its own pass.
jeff