@@ -135,17 +135,15 @@ static struct case_node *add_case_node (struct case_node *, tree,
rtx
label_rtx (tree label)
{
- gcc_assert (TREE_CODE (label) == LABEL_DECL);
-
- if (!DECL_RTL_SET_P (label))
+ if (!LABEL_DECL_CODE_LABEL (label))
{
rtx r = gen_label_rtx ();
- SET_DECL_RTL (label, r);
+ LABEL_DECL_CODE_LABEL (label) = r;
if (FORCED_LABEL (label) || DECL_NONLOCAL (label))
LABEL_PRESERVE_P (r) = 1;
}
- return DECL_RTL (label);
+ return LABEL_DECL_CODE_LABEL (label);
}
/* As above, but also put it on the forced-reference list of the
@@ -207,7 +205,7 @@ expand_label (tree label)
do_pending_stack_adjust ();
emit_label (label_r);
if (DECL_NAME (label))
- LABEL_NAME (DECL_RTL (label)) = IDENTIFIER_POINTER (DECL_NAME (label));
+ LABEL_NAME (label_r) = IDENTIFIER_POINTER (DECL_NAME (label));
if (DECL_NONLOCAL (label))
{
@@ -440,6 +440,7 @@ initialize_tree_contains_struct (void)
case TS_DECL_WRTL:
case TS_CONST_DECL:
+ case TS_LABEL_DECL:
MARK_TS_DECL_COMMON (code);
break;
@@ -449,7 +450,6 @@ initialize_tree_contains_struct (void)
case TS_DECL_WITH_VIS:
case TS_PARM_DECL:
- case TS_LABEL_DECL:
case TS_RESULT_DECL:
MARK_TS_DECL_WRTL (code);
break;
@@ -492,7 +492,6 @@ initialize_tree_contains_struct (void)
gcc_assert (tree_contains_struct[PARM_DECL][TS_DECL_WRTL]);
gcc_assert (tree_contains_struct[RESULT_DECL][TS_DECL_WRTL]);
gcc_assert (tree_contains_struct[FUNCTION_DECL][TS_DECL_WRTL]);
- gcc_assert (tree_contains_struct[LABEL_DECL][TS_DECL_WRTL]);
gcc_assert (tree_contains_struct[CONST_DECL][TS_DECL_MINIMAL]);
gcc_assert (tree_contains_struct[VAR_DECL][TS_DECL_MINIMAL]);
gcc_assert (tree_contains_struct[PARM_DECL][TS_DECL_MINIMAL]);
@@ -2940,6 +2940,11 @@ struct GTY(()) tree_field_decl {
#define LABEL_DECL_UID(NODE) \
(LABEL_DECL_CHECK (NODE)->label_decl.label_decl_uid)
+/* The CODE_LABEL associated with a LABEL_DECL. This macro should not
+ be used directly; use label_rtx instead. */
+#define LABEL_DECL_CODE_LABEL(NODE) \
+ (LABEL_DECL_CHECK (NODE)->label_decl.label)
+
/* In a LABEL_DECL, the EH region number for which the label is the
post_landing_pad. */
#define EH_LANDING_PAD_NR(NODE) \
@@ -2951,7 +2956,8 @@ struct GTY(()) tree_field_decl {
(LABEL_DECL_CHECK (NODE)->decl_common.decl_flag_0)
struct GTY(()) tree_label_decl {
- struct tree_decl_with_rtl common;
+ struct tree_decl_common common;
+ rtx label;
int label_decl_uid;
int eh_landing_pad_nr;
};