+2011-04-08 Alexander Monakov <amonakov@ispras.ru>
+
+ PR target/48273
+ * cfgloop.h (loop_has_exit_edges): New helper.
+ * sel-sched-ir.c (init_global_and_expr_for_insn): Make CALLs
+ non-clonable.
+ * sel-sched.c (sel_setup_region_sched_flags): Don't pipeline loops
+ that have no exit edges.
+
2011-04-08 Alexander Monakov <amonakov@ispras.ru>
PR rtl-optimization/48442
return VEC_index (loop_p, loop->superloops, n - 1);
}
+/* Returns true if LOOP has at least one exit edge. */
+
+static inline bool
+loop_has_exit_edges (const struct loop *loop)
+{
+ return loop->exits->next->e != NULL;
+}
+
/* Returns the list of loops in current_loops. */
static inline VEC (loop_p, gc) *
if (CANT_MOVE (insn)
|| INSN_ASM_P (insn)
|| SCHED_GROUP_P (insn)
+ || CALL_P (insn)
/* Exception handling insns are always unique. */
|| (cfun->can_throw_non_call_exceptions && can_throw_internal (insn))
/* TRAP_IF though have an INSN code is control_flow_insn_p (). */
bookkeeping_p = 1;
pipelining_p = (bookkeeping_p
&& (flag_sel_sched_pipelining != 0)
- && current_loop_nest != NULL);
+ && current_loop_nest != NULL
+ && loop_has_exit_edges (current_loop_nest));
max_insns_to_rename = PARAM_VALUE (PARAM_SELSCHED_INSNS_TO_RENAME);
max_ws = MAX_WS;
}
+2011-04-08 Alexander Monakov <amonakov@ispras.ru>
+
+ PR target/48273
+ * g++.dg/opt/pr48273.C: New.
+
2011-04-08 Alexander Monakov <amonakov@ispras.ru>
PR rtl-optimization/48442
--- /dev/null
+// { dg-do compile { target x86_64-*-* } }
+// { dg-options "-fschedule-insns2 -fsel-sched-pipelining -fselective-scheduling2 -funroll-all-loops -march=core2" }
+
+void bar ();
+
+void foo ()
+{
+ for (;;)
+ bar ();
+}