summaryrefslogtreecommitdiff
path: root/gcc/sched-int.h
diff options
context:
space:
mode:
authormkuvyrkov <mkuvyrkov@138bc75d-0d04-0410-961f-82ee72b054a4>2006-10-06 21:45:13 +0000
committermkuvyrkov <mkuvyrkov@138bc75d-0d04-0410-961f-82ee72b054a4>2006-10-06 21:45:13 +0000
commit2521f35f9132bb59f321a72ac3096f3c4091236d (patch)
treed4aed27cfc02ff872c40550b81096f52a7e90e14 /gcc/sched-int.h
parentecfed7a2cc19c7b913a8f4752c138aac5ae4b01d (diff)
downloadgcc-2521f35f9132bb59f321a72ac3096f3c4091236d.tar.gz
2006-10-06 Maxim Kuvyrkov <mkuvyrkov@ispras.ru>
PR rtl-optimization/29128 * sched-int.h (IS_SPECULATION_BRANCHY_CHECK_P): New macro. * sched-ebb.c (advance_target_bb): Use it to fix condition to allow interblock movement of speculation checks. * gcc.c-torture/compile/pr29128.c: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@117515 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/sched-int.h')
-rw-r--r--gcc/sched-int.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/gcc/sched-int.h b/gcc/sched-int.h
index 3ce0379ce43..3865013b9df 100644
--- a/gcc/sched-int.h
+++ b/gcc/sched-int.h
@@ -359,6 +359,13 @@ extern regset *glat_start, *glat_end;
#define RECOVERY_BLOCK(INSN) (h_i_d[INSN_UID (INSN)].recovery_block)
#define ORIG_PAT(INSN) (h_i_d[INSN_UID (INSN)].orig_pat)
+/* INSN is a speculation check that will branch to RECOVERY_BLOCK if the
+ speculation fail. Insns in that block will reexecute the speculatively
+ scheduled code and then will return immediatelly after INSN thus preserving
+ semantics of the program. */
+#define IS_SPECULATION_BRANCHY_CHECK_P(INSN) \
+ (RECOVERY_BLOCK (INSN) != NULL && RECOVERY_BLOCK (INSN) != EXIT_BLOCK_PTR)
+
/* DEP_STATUS of the link encapsulates information, that is needed for
speculative scheduling. Namely, it is 4 integers in the range
[0, MAX_DEP_WEAK] and 3 bits.