From 75775da3a3ac92679c0e4bf56b0e475928fa4b17 Mon Sep 17 00:00:00 2001 From: David Malcolm Date: Fri, 1 Aug 2014 15:34:29 -0400 Subject: [PATCH 217/236] Add JUMP_LABEL_AS_INSN JUMP_LABEL(X) is not always an insn, but often is. Add a variant that adds a checked cast. gcc/ * rtl.h (JUMP_LABEL_AS_INSN): New. --- gcc/rtl.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/gcc/rtl.h b/gcc/rtl.h index 1f1caaf..7a8e592 100644 --- a/gcc/rtl.h +++ b/gcc/rtl.h @@ -1681,6 +1681,11 @@ enum label_kind be set to simple_return_rtx, a SIMPLE_RETURN. */ #define JUMP_LABEL(INSN) XCEXP (INSN, 7, JUMP_INSN) +inline rtx_insn *JUMP_LABEL_AS_INSN (rtx_insn *insn) +{ + return as_a_nullable (JUMP_LABEL (insn)); +} + /* Once basic blocks are found, each CODE_LABEL starts a chain that goes through all the LABEL_REFs that jump to that label. The chain eventually winds up at the CODE_LABEL: it is circular. */ -- 1.8.5.3