]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
gcc/
authorrsandifo <rsandifo@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 13 May 2014 10:39:16 +0000 (10:39 +0000)
committerrsandifo <rsandifo@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 13 May 2014 10:39:16 +0000 (10:39 +0000)
* rtl.def (SYMBOL_REF): Remove middle "0" field.
* rtl.h (block_symbol): Reduce number of fields to 2.
(rtx_def): Add u2.symbol_ref_flags.
(SYMBOL_REF_FLAGS): Use it.
(SYMBOL_REF_DATA, SET_SYMBOL_REF_DECL, SYMBOL_REF_DECL)
(SET_SYMBOL_REF_CONSTANT, SYMBOL_REF_CONSTANT): Lower index.
* gengtype.c (adjust_field_rtx_def): Remove SYMBOL_REF_FLAGS handling.
Lower index of SYMBOL_REF_DATA.
* print-rtl.c (print_rtx): Lower index for SYMBOL_REF_DATA.
Print SYMBOL_REF_FLAGS at the same time.
* genattrtab.c (attr_rtx_1): Only initialize 1 "0" SYMBOL_REF field.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@210363 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/genattrtab.c
gcc/gengtype.c
gcc/print-rtl.c
gcc/rtl.def
gcc/rtl.h

index 52daf01f522e2e7cfec6a0cf28c3485a6a3ff414..210eeb4cc12525006178d1edb1de54a5493af411 100644 (file)
@@ -1,3 +1,17 @@
+2014-05-13  Richard Sandiford  <rdsandiford@googlemail.com>
+
+       * rtl.def (SYMBOL_REF): Remove middle "0" field.
+       * rtl.h (block_symbol): Reduce number of fields to 2.
+       (rtx_def): Add u2.symbol_ref_flags.
+       (SYMBOL_REF_FLAGS): Use it.
+       (SYMBOL_REF_DATA, SET_SYMBOL_REF_DECL, SYMBOL_REF_DECL)
+       (SET_SYMBOL_REF_CONSTANT, SYMBOL_REF_CONSTANT): Lower index.
+       * gengtype.c (adjust_field_rtx_def): Remove SYMBOL_REF_FLAGS handling.
+       Lower index of SYMBOL_REF_DATA.
+       * print-rtl.c (print_rtx): Lower index for SYMBOL_REF_DATA.
+       Print SYMBOL_REF_FLAGS at the same time.
+       * genattrtab.c (attr_rtx_1): Only initialize 1 "0" SYMBOL_REF field.
+
 2014-05-13  Richard Sandiford  <rdsandiford@googlemail.com>
 
        * rtl.def (VAR_LOCATION): Remove "i" field.
index 0f14b4deda791ce94dd989915f2520b0fc9e07db..c5ce51c12f23d4ada742ed4fe325537c108bc4dc 100644 (file)
@@ -473,10 +473,7 @@ attr_rtx_1 (enum rtx_code code, va_list p)
          rt_val = rtx_alloc (code);
          XSTR (rt_val, 0) = arg0;
          if (code == SYMBOL_REF)
-           {
-             X0EXP (rt_val, 1) = NULL_RTX;
-             X0EXP (rt_val, 2) = NULL_RTX;
-           }
+           X0EXP (rt_val, 1) = NULL_RTX;
        }
     }
   else if (GET_RTX_LENGTH (code) == 2
index 26e0c58515827a27fa13bcda456c2d6e59c23e98..b6e171822c8623cdb967fe4eaa3c0b968dd8a8ca 100644 (file)
@@ -1250,8 +1250,6 @@ adjust_field_rtx_def (type_p t, options_p ARG_UNUSED (opt))
              else if (i == REG && aindex == 1)
                t = reg_attrs_tp, subname = "rt_reg";
              else if (i == SYMBOL_REF && aindex == 1)
-               t = scalar_tp, subname = "rt_int";
-             else if (i == SYMBOL_REF && aindex == 2)
                t = symbol_union_tp, subname = "";
              else if (i == JUMP_TABLE_DATA && aindex >= 4)
                t = scalar_tp, subname = "rt_int";
index 9d90325a53b94eab95fc3d4c5cecf96ad35ae1f3..66d98b10caf12e2ba955cc8ddff13eeb80bda304 100644 (file)
@@ -224,9 +224,6 @@ print_rtx (const_rtx in_rtx)
            int flags = SYMBOL_REF_FLAGS (in_rtx);
            if (flags)
              fprintf (outfile, " [flags %#x]", flags);
-         }
-       else if (i == 2 && GET_CODE (in_rtx) == SYMBOL_REF)
-         {
            tree decl = SYMBOL_REF_DECL (in_rtx);
            if (decl)
              print_node_brief (outfile, "", decl, dump_flags);
index 18acc6b8070fee4d66283cacb4f668e906d81036..d157b177391aab2cdf48059f6bcf5987e9e31c67 100644 (file)
@@ -429,10 +429,9 @@ DEF_RTL_EXPR(LABEL_REF, "label_ref", "u", RTX_CONST_OBJ)
 
 /* Reference to a named label:
    Operand 0: label name
-   Operand 1: flags (see SYMBOL_FLAG_* in rtl.h)
-   Operand 2: tree from which this symbol is derived, or null.
+   Operand 1: tree from which this symbol is derived, or null.
    This is either a DECL node, or some kind of constant.  */
-DEF_RTL_EXPR(SYMBOL_REF, "symbol_ref", "s00", RTX_CONST_OBJ)
+DEF_RTL_EXPR(SYMBOL_REF, "symbol_ref", "s0", RTX_CONST_OBJ)
 
 /* The condition code register is represented, in our imagination,
    as a register holding a value that can be compared to zero.
index 6e97dcd997825e90f4c0bbec4bffa37ca202f8a6..aad1853c036fce3e50ef48597770210dc1b19eee 100644 (file)
--- a/gcc/rtl.h
+++ b/gcc/rtl.h
@@ -211,7 +211,7 @@ union rtunion
    if SYMBOL_REF_HAS_BLOCK_INFO_P is true.  */
 struct GTY(()) block_symbol {
   /* The usual SYMBOL_REF fields.  */
-  rtunion GTY ((skip)) fld[3];
+  rtunion GTY ((skip)) fld[2];
 
   /* The block that contains this object.  */
   struct object_block *block;
@@ -362,6 +362,9 @@ struct GTY((chain_next ("RTX_NEXT (&%h)"),
     /* The INSN_UID of an RTX_INSN-class code.  */
     int insn_uid;
 
+    /* The SYMBOL_REF_FLAGS of a SYMBOL_REF.  */
+    unsigned int symbol_ref_flags;
+
     /* The PAT_VAR_LOCATION_STATUS of a VAR_LOCATION.  */
     enum var_init_status var_location_status;
 
@@ -1765,24 +1768,24 @@ do {                                                                    \
 
 /* A pointer attached to the SYMBOL_REF; either SYMBOL_REF_DECL or
    SYMBOL_REF_CONSTANT.  */
-#define SYMBOL_REF_DATA(RTX) X0ANY ((RTX), 2)
+#define SYMBOL_REF_DATA(RTX) X0ANY ((RTX), 1)
 
 /* Set RTX's SYMBOL_REF_DECL to DECL.  RTX must not be a constant
    pool symbol.  */
 #define SET_SYMBOL_REF_DECL(RTX, DECL) \
-  (gcc_assert (!CONSTANT_POOL_ADDRESS_P (RTX)), X0TREE ((RTX), 2) = (DECL))
+  (gcc_assert (!CONSTANT_POOL_ADDRESS_P (RTX)), X0TREE ((RTX), 1) = (DECL))
 
 /* The tree (decl or constant) associated with the symbol, or null.  */
 #define SYMBOL_REF_DECL(RTX) \
-  (CONSTANT_POOL_ADDRESS_P (RTX) ? NULL : X0TREE ((RTX), 2))
+  (CONSTANT_POOL_ADDRESS_P (RTX) ? NULL : X0TREE ((RTX), 1))
 
 /* Set RTX's SYMBOL_REF_CONSTANT to C.  RTX must be a constant pool symbol.  */
 #define SET_SYMBOL_REF_CONSTANT(RTX, C) \
-  (gcc_assert (CONSTANT_POOL_ADDRESS_P (RTX)), X0CONSTANT ((RTX), 2) = (C))
+  (gcc_assert (CONSTANT_POOL_ADDRESS_P (RTX)), X0CONSTANT ((RTX), 1) = (C))
 
 /* The rtx constant pool entry for a symbol, or null.  */
 #define SYMBOL_REF_CONSTANT(RTX) \
-  (CONSTANT_POOL_ADDRESS_P (RTX) ? X0CONSTANT ((RTX), 2) : NULL)
+  (CONSTANT_POOL_ADDRESS_P (RTX) ? X0CONSTANT ((RTX), 1) : NULL)
 
 /* A set of flags on a symbol_ref that are, in some respects, redundant with
    information derivable from the tree decl associated with this symbol.
@@ -1791,7 +1794,9 @@ do {                                                                      \
    this information to avoid recomputing it.  Finally, this allows space for
    the target to store more than one bit of information, as with
    SYMBOL_REF_FLAG.  */
-#define SYMBOL_REF_FLAGS(RTX)  X0INT ((RTX), 1)
+#define SYMBOL_REF_FLAGS(RTX) \
+  (RTL_FLAG_CHECK1 ("SYMBOL_REF_FLAGS", (RTX), SYMBOL_REF) \
+   ->u2.symbol_ref_flags)
 
 /* These flags are common enough to be defined for all targets.  They
    are computed by the default version of targetm.encode_section_info.  */