+2014-09-08 Richard Biener <rguenther@suse.de>
+
+ PR ipa/63196
+ * tree-inline.c (copy_loops): The source loop header should
+ always be non-NULL.
+ (tree_function_versioning): If loops need fixup after removing
+ unreachable blocks fix them.
+ * omp-low.c (simd_clone_adjust): Do not add incr block to
+ loop under construction.
+
2014-09-08 Alan Lawrence <alan.lawrence@arm.com>
* config/aarch64/aarch64-builtins.c
iteration increment and the condition/branch. */
basic_block orig_exit = EDGE_PRED (EXIT_BLOCK_PTR_FOR_FN (cfun), 0)->src;
basic_block incr_bb = create_empty_bb (orig_exit);
+ add_bb_to_loop (incr_bb, body_bb->loop_father);
/* The succ of orig_exit was EXIT_BLOCK_PTR_FOR_FN (cfun), with an empty
flag. Set it now to be a FALLTHRU_EDGE. */
gcc_assert (EDGE_COUNT (orig_exit->succs) == 1);
loop->safelen = node->simdclone->simdlen;
loop->force_vectorize = true;
loop->header = body_bb;
- add_bb_to_loop (incr_bb, loop);
/* Branch around the body if the mask applies. */
if (node->simdclone->inbranch)
gsi_insert_after (&gsi, g, GSI_CONTINUE_LINKING);
e = split_block (incr_bb, gsi_stmt (gsi));
basic_block latch_bb = e->dest;
- basic_block new_exit_bb = e->dest;
+ basic_block new_exit_bb;
new_exit_bb = split_block (latch_bb, NULL)->dest;
loop->latch = latch_bb;
/* Assign the new loop its header and latch and associate
those with the new loop. */
- if (src_loop->header != NULL)
- {
- dest_loop->header = (basic_block)src_loop->header->aux;
- dest_loop->header->loop_father = dest_loop;
- }
+ dest_loop->header = (basic_block)src_loop->header->aux;
+ dest_loop->header->loop_father = dest_loop;
if (src_loop->latch != NULL)
{
dest_loop->latch = (basic_block)src_loop->latch->aux;
delete_unreachable_blocks_update_callgraph (&id);
if (id.dst_node->definition)
cgraph_edge::rebuild_references ();
+ if (loops_state_satisfies_p (LOOPS_NEED_FIXUP))
+ {
+ calculate_dominance_info (CDI_DOMINATORS);
+ fix_loop_structure (NULL);
+ }
update_ssa (TODO_update_ssa);
/* After partial cloning we need to rescale frequencies, so they are