remove symconst_type_tag
authorMatthias Braun <matze@braunis.de>
Thu, 17 Nov 2011 17:06:53 +0000 (18:06 +0100)
committerMatthias Braun <matze@braunis.de>
Thu, 17 Nov 2011 17:06:53 +0000 (18:06 +0100)
include/libfirm/firm_types.h
include/libfirm/ircons.h
include/libfirm/irnode.h
ir/ir/ircons.c
ir/ir/irdump.c
ir/ir/irdumptxt.c
ir/lower/lower_hl.c
scripts/ir_spec.py
win32/firmEvaluator/firm.c

index efd5ea8..3a356af 100644 (file)
@@ -220,8 +220,6 @@ ENUM_BITSET(mtp_additional_properties)
  * SymConst.  The content of the attribute symconst_symbol depends on this tag.
  * Use the proper access routine after testing this flag. */
 typedef enum symconst_kind {
-       symconst_type_tag,    /**< The SymConst is a type tag for the given type.
-                                  symconst_symbol is type *. */
        symconst_type_size,   /**< The SymConst is the size of the given type.
                                   symconst_symbol is type *. */
        symconst_type_align,  /**< The SymConst is the alignment of the given type.
index d4139aa..935d2a5 100644 (file)
  *    -----------------------------------------------------------------------------------------
  *
  *    There are several symbolic constants:
- *     symconst_type_tag   The symbolic constant represents a type tag.
  *     symconst_type_size  The symbolic constant represents the size of a type.
  *     symconst_type_align The symbolic constant represents the alignment of a type.
  *     symconst_addr_ent   The symbolic constant represents the address of an entity.
  *
  *    Attributes:
  *      attr.i.num       The symconst_addr_ent, i.e. one of
- *                        -symconst_type_tag
  *                        -symconst_type_size
  *                        -symconst_type_align
  *                        -symconst_addr_ent
  *
- *    If the attr.i.num is symconst_type_tag, symconst_type_size or symconst_type_align,
+ *    If the attr.i.num is symconst_type_size or symconst_type_align,
  *    the node contains an attribute:
  *
  *      attr.i.*type,    a pointer to a type_class.
@@ -1112,8 +1110,6 @@ FIRM_API ir_node *new_rd_Const_long(dbg_info *db, ir_graph *irg,
  *
  *  This is the constructor for a symbolic constant.
  *    There are several kinds of symbolic constants:
- *    - symconst_type_tag   The symbolic constant represents a type tag.  The
- *                          type the tag stands for is given explicitly.
  *    - symconst_type_size  The symbolic constant represents the size of a type.
  *                          The type of which the constant represents the size
  *                          is given explicitly.
@@ -1164,15 +1160,6 @@ FIRM_API ir_node *new_rd_SymConst_addr_ent(dbg_info *db, ir_graph *irg,
 FIRM_API ir_node *new_rd_SymConst_ofs_ent(dbg_info *db, ir_graph *irg,
                                           ir_mode *mode, ir_entity *symbol);
 
-/** Constructor for a SymConst type_tag node.
- *
- * Same as new_rd_SymConst, except that the constructor is tailored for
- * symconst_type_tag.
- * Adds the SymConst to the start block of irg.
- */
-FIRM_API ir_node *new_rd_SymConst_type_tag(dbg_info *db, ir_graph *irg,
-                                           ir_mode *mode, ir_type *symbol);
-
 /** Constructor for a SymConst size node.
  *
  * Same as new_rd_SymConst, except that the constructor is tailored for
@@ -1282,8 +1269,6 @@ FIRM_API ir_node *new_r_Const_long(ir_graph *irg, ir_mode *mode, long value);
  *
  *  This is the constructor for a symbolic constant.
  *    There are several kinds of symbolic constants:
- *    - symconst_type_tag   The symbolic constant represents a type tag.  The
- *                          type the tag stands for is given explicitly.
  *    - symconst_type_size  The symbolic constant represents the size of a type.
  *                          The type of which the constant represents the size
  *                          is given explicitly.
@@ -1408,8 +1393,6 @@ FIRM_API ir_node *new_d_Const_long(dbg_info *db, ir_mode *mode, long value);
  *
  *  This is the constructor for a symbolic constant.
  *    There are several kinds of symbolic constants:
- *    - symconst_type_tag   The symbolic constant represents a type tag.  The
- *                          type the tag stands for is given explicitly.
  *    - symconst_type_size  The symbolic constant represents the size of a type.
  *                          The type of which the constant represents the size
  *                          is given explicitly.
@@ -1531,8 +1514,6 @@ FIRM_API ir_node *new_Const_long(ir_mode *mode, long value);
  *
  *  This is the constructor for a symbolic constant.
  *    There are several kinds of symbolic constants:
- *    - symconst_type_tag   The symbolic constant represents a type tag.  The
- *                          type the tag stands for is given explicitly.
  *    - symconst_type_size  The symbolic constant represents the size of a type.
  *                          The type of which the constant represents the size
  *                          is given explicitly.
index 7ac923c..807b553 100644 (file)
@@ -380,7 +380,7 @@ FIRM_API symconst_kind get_SymConst_kind(const ir_node *node);
 /** Set the kind of the SymConst. */
 FIRM_API void          set_SymConst_kind(ir_node *node, symconst_kind num);
 
-/** Only to access SymConst of kind type_tag or size.  Else assertion: */
+/** Only to access SymConst of kind type_size.  Else assertion: */
 FIRM_API ir_type  *get_SymConst_type(const ir_node *node);
 FIRM_API void     set_SymConst_type(ir_node *node, ir_type *tp);
 
index fb4e677..902fda8 100644 (file)
@@ -124,13 +124,6 @@ ir_node *new_rd_SymConst_ofs_ent(dbg_info *db, ir_graph *irg, ir_mode *mode, ir_
        return new_rd_SymConst(db, irg, mode, sym, symconst_ofs_ent);
 }
 
-ir_node *new_rd_SymConst_type_tag(dbg_info *db, ir_graph *irg, ir_mode *mode, ir_type *symbol)
-{
-       symconst_symbol sym;
-       sym.type_p = symbol;
-       return new_rd_SymConst(db, irg, mode, sym, symconst_type_tag);
-}
-
 ir_node *new_rd_SymConst_size(dbg_info *db, ir_graph *irg, ir_mode *mode, ir_type *symbol)
 {
        symconst_symbol sym;
index 0396708..d602b45 100644 (file)
@@ -675,9 +675,6 @@ void dump_node_opcode(FILE *F, ir_node *n)
                case symconst_ofs_ent:
                        fprintf(F, "SymC %s offset", get_entity_name(get_SymConst_entity(n)));
                        break;
-               case symconst_type_tag:
-                       ir_fprintf(F, "SymC %+F tag", get_SymConst_type(n));
-                       break;
                case symconst_type_size:
                        ir_fprintf(F, "SymC %+F size", get_SymConst_type(n));
                        break;
index 90236a9..710d86f 100644 (file)
@@ -247,11 +247,6 @@ void dump_irnode_to_file(FILE *F, ir_node *n)
                        fprintf(F, "  entity: ");
                        dump_entity_to_file(F, get_SymConst_entity(n));
                        break;
-               case symconst_type_tag:
-                       fprintf(F, "  kind: type_tag\n");
-                       fprintf(F, "  type: ");
-                       dump_type_to_file(F, get_SymConst_type(n));
-                       break;
                case symconst_type_size:
                        fprintf(F, "  kind: size\n");
                        fprintf(F, "  type: ");
index e54e777..292921c 100644 (file)
@@ -212,9 +212,6 @@ static void lower_symconst(ir_node *symc)
        ir_graph      *irg;
 
        switch (get_SymConst_kind(symc)) {
-       case symconst_type_tag:
-               assert(!"SymConst kind symconst_type_tag not implemented");
-               break;
        case symconst_type_size:
                /* rewrite the SymConst node by a Const node */
                irg  = get_irn_irg(symc);
index facddd8..ec8b6a7 100755 (executable)
@@ -879,8 +879,6 @@ class Sub(Binop):
 class SymConst(Op):
        """A symbolic constant.
 
-        - *symconst_type_tag*  The symbolic constant represents a type tag.  The
-                               type the tag stands for is given explicitly.
         - *symconst_type_size* The symbolic constant represents the size of a type.
                                The type of which the constant represents the size
                                is given explicitly.
index 6494a54..d39782b 100644 (file)
@@ -519,12 +519,6 @@ static HRESULT format_node(DEBUGHELPER *pHelper, int nBase, const void *addr, ch
   case iro_SymConst:
     _tcsncat(pResult, "<", max);
     switch (n.attr.symc.kind) {
-    case symconst_type_tag:
-      _tcsncat(pResult, "TAG:", max);
-      if (format_type(pHelper, nBase, n.attr.symc.sym.type_p, name, sizeof(name), 0) != S_OK)
-        return E_FAIL;
-      _tcsncat(pResult, name, max);
-      break;
     case symconst_type_size:
       _tcsncat(pResult, "SIZE:", max);
       if (format_type(pHelper, nBase, n.attr.symc.sym.type_p, name, sizeof(name), 0) != S_OK)