From d47a8b8331c719df4f7c44af84eec7a63092a440 Mon Sep 17 00:00:00 2001 From: Eric Botcazou Date: Thu, 19 Apr 2007 13:19:16 +0200 Subject: re PR rtl-optimization/29841 (ICE with scheduling and __builtin_trap) PR rtl-optimization/29841 * cfgbuild.c (control_flow_insn_p): Return TRUE for unconditional trap instructions. * sched-deps.c (sched_analyze_insn): Prevent all non-jump instructions that may cause control flow transfer from being moved. From-SVN: r123970 --- gcc/sched-deps.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'gcc/sched-deps.c') diff --git a/gcc/sched-deps.c b/gcc/sched-deps.c index c3dc579..5a6a30a 100644 --- a/gcc/sched-deps.c +++ b/gcc/sched-deps.c @@ -1598,8 +1598,12 @@ sched_analyze_insn (struct deps *deps, rtx x, rtx insn) /* If this instruction can throw an exception, then moving it changes where block boundaries fall. This is mighty confusing elsewhere. - Therefore, prevent such an instruction from being moved. */ - if (can_throw_internal (insn)) + Therefore, prevent such an instruction from being moved. Same for + non-jump instructions that define block boundaries. + ??? Unclear whether this is still necessary in EBB mode. If not, + add_branch_dependences should be adjusted for RGN mode instead. */ + if (((CALL_P (insn) || JUMP_P (insn)) && can_throw_internal (insn)) + || (NONJUMP_INSN_P (insn) && control_flow_insn_p (insn))) reg_pending_barrier = MOVE_BARRIER; /* Add dependencies if a scheduling barrier was found. */ -- cgit v1.1