comments
authorGötz Lindenmaier <goetz@ipd.info.uni-karlsruhe.de>
Thu, 2 Sep 2004 14:18:49 +0000 (14:18 +0000)
committerGötz Lindenmaier <goetz@ipd.info.uni-karlsruhe.de>
Thu, 2 Sep 2004 14:18:49 +0000 (14:18 +0000)
[r3818]

ir/adt/array.h
ir/adt/pset.h
ir/ident/ident.h
ir/ir/ircons.h
ir/ir/irflag.h
ir/ir/irgraph_t.h
ir/ir/irnode.h
ir/ir/irvrfy.c

index 9c4d2a6..d42322e 100644 (file)
 #define DEL_ARR_F(arr) (XMALLOC_TRACE _del_arr_f ((arr)))
 
 /**
- * Creates a dynamic array on a obstack.
+ * Creates a dynamic array on an obstack.
  *
  * @param type     The element type of the new array.
- * @param obstack  An struct obstack * were the data will be allocated
- * @param nelts    a size_t expression evaluating to the number of elements
+ * @param obstack  A struct obstack * were the data will be allocated
+ * @param nelts    A size_t expression evaluating to the number of elements
  *
  * This macro creates a dynamic array of a given type at runtime.
  * The size of the array cannot be changed later.
index 620a44d..a922b3a 100644 (file)
@@ -72,7 +72,7 @@ int pset_count (pset *pset);
  * Searches an element pointer in a pset.
  *
  * @param pset  the pset to search in
- * @param key   the element to is searched
+ * @param key   the element to search
  * @param hash  the hash value of key
  *
  * @return
@@ -92,7 +92,7 @@ void *pset_find (pset *pset, const void *key, unsigned hash);
  * @note
  *    It is not possible to insert on element more than once. If a element
  *    that should be inserted is already in the set, this functions does
- *    nothing but returning its set_entry.
+ *    nothing but returning its already existing set_entry.
 
  */
 void *pset_insert (pset *pset, const void *key, unsigned hash);
index 5e7a7c8..27c4068 100644 (file)
@@ -109,7 +109,7 @@ int id_is_prefix (ident *prefix, ident *id);
 int id_is_suffix (ident *suffix, ident *id);
 
 /**
- * Returns true if infix is contained in id.  (Can be suffix or prefix)
+ * Returns true if infix is contained in id.  (Can be suffix or prefix)
  *
  * @param infix  - the infix
  * @param id     - the ident to search in
index 120de4a..b13fd19 100644 (file)
  *    ir_node *new_Free   (ir_node *store, ir_node *ptr, ir_node *size,
  *               type *free_type);
  *    ir_node *new_Proj   (ir_node *arg, ir_mode *mode, long proj);
-=======
- *    ir_node *new_simpleSel(ir_node *store, ir_node *objptr, entity *ent);
- *    ir_node *new_Sel      (ir_node *store, ir_node *objptr, int arity,
- *                           ir_node **in, entity *ent);
- *    ir_node *new_Call     (ir_node *store, ir_node *callee, int arity,
- *                       ir_node **in, type_method *type);
- *    ir_node *new_Add      (ir_node *op1, ir_node *op2, ir_mode *mode);
- *    ir_node *new_Sub      (ir_node *op1, ir_node *op2, ir_mode *mode);
- *    ir_node *new_Minus    (ir_node *op,  ir_mode *mode);
- *    ir_node *new_Mul      (ir_node *op1, ir_node *op2, ir_mode *mode);
- *    ir_node *new_Quot     (ir_node *memop, ir_node *op1, ir_node *op2);
- *    ir_node *new_DivMod   (ir_node *memop, ir_node *op1, ir_node *op2);
- *    ir_node *new_Div      (ir_node *memop, ir_node *op1, ir_node *op2);
- *    ir_node *new_Mod      (ir_node *memop, ir_node *op1, ir_node *op2);
- *    ir_node *new_Abs      (ir_node *op,                ir_mode *mode);
- *    ir_node *new_And      (ir_node *op1, ir_node *op2, ir_mode *mode);
- *    ir_node *new_Or       (ir_node *op1, ir_node *op2, ir_mode *mode);
- *    ir_node *new_Eor      (ir_node *op1, ir_node *op2, ir_mode *mode);
- *    ir_node *new_Not      (ir_node *op,                ir_mode *mode);
- *    ir_node *new_Shl      (ir_node *op,  ir_node *k,   ir_mode *mode);
- *    ir_node *new_Shr      (ir_node *op,  ir_node *k,   ir_mode *mode);
- *    ir_node *new_Shrs     (ir_node *op,  ir_node *k,   ir_mode *mode);
- *    ir_node *new_Rot      (ir_node *op,  ir_node *k,   ir_mode *mode);
- *    ir_node *new_Cmp      (ir_node *op1, ir_node *op2);
- *    ir_node *new_Conv     (ir_node *op, ir_mode *mode);
- *    ir_node *new_Cast     (ir_node *op, type *to_tp);
- *    ir_node *new_Load     (ir_node *store, ir_node *addr);
- *    ir_node *new_Store    (ir_node *store, ir_node *addr, ir_node *val);
- *    ir_node *new_Alloc    (ir_node *store, ir_node *size, type *alloc_type,
- *                           where_alloc where);
- *    ir_node *new_Free     (ir_node *store, ir_node *ptr, ir_node *size,
- *                       type *free_type);
- *    ir_node *new_Proj     (ir_node *arg, ir_mode *mode, long proj);
  *    ir_node *new_FuncCall (ir_node *store, ir_node *callee, int arity,
  *                       ir_node **in, type_method *type);
  *
@@ -3935,6 +3902,7 @@ void add_immBlock_pred (ir_node *immblock, ir_node *jmp);
 
 /** Fix the number of predecessors of an immature block. */
 void mature_immBlock (ir_node *block);
+#define mature_cur_block() mature_immBlock(get_cur_block());
 
 
 /** Get the current value of a local variable.
index fa81a3c..f0d004e 100644 (file)
@@ -66,6 +66,9 @@ void set_opt_cse (int value);
 void set_opt_global_cse (int value);
 
 /** Enables/Disables unreachable code elimination.
+ *
+ * If set, evaluate conditions of conditional branch and replace the
+ * branch with a Jmp/Bad Tuple.
  *
  * If opt_unreachable_code == 1 replace nodes (except Block,
  * Phi and Tuple) with a Bad predecessor by the Bad node.
index 3a3082a..1b98e71 100644 (file)
@@ -98,7 +98,6 @@ struct ir_graph {
   ir_graph **callees;                /**< For callgraph analyses. */
   int       *callee_isbe;            /**< For callgraph analyses: set if backedge. */
   int        callgraph_loop_depth;
-  int        callgraph_weighted_loop_depth;
   int        callgraph_recursion_depth;
   ir_loop   *l;
 
index 8621923..252b225 100644 (file)
@@ -230,7 +230,6 @@ void      set_nodes_block (ir_node *node, ir_node *block);
  * @function get_irn_block
  * @see get_nodes_block()
  */
-
 /**
  * Projection numbers for result of Start node: use for Proj nodes!
  */
@@ -893,7 +892,7 @@ void    dump_irn(ir_node *n);
 /** Output information about an entity and its owner */
 #define DDMEO(X) printf("%s(l.%i) %s (own: %s): %ld (%p)\n", __MYFUNC__, __LINE__, get_entity_name(X), get_type_name(get_entity_owner(X)), get_entity_nr(X), (void *)(X))
 /** Output information about a graph */
-#define DDMG(X)  printf("%s(l.%i) %s: %ld (%p)\n",           __MYFUNC__, __LINE__, get_entity_name(get_irg_entity(X)), get_irg_graph_nr(X), (void *)(X))
+#define DDMG(X)  printf("%s(l.%i) graph %s: %ld (%p) in %s %s.\n", __MYFUNC__, __LINE__, get_entity_name(get_irg_entity(X)), get_irg_graph_nr(X), (void *)(X), get_type_tpop_name(get_entity_owner(get_irg_entity(X))), get_type_name(get_entity_owner(get_irg_entity(X))))
 /** Output information about an ident */
 #define DDMI(X)  printf("%s(l.%i) %s: %p\n",                 __MYFUNC__, __LINE__, get_id_str(X), (void *)(X))
 /** Output information about a mode */
index 1c4776c..f8b2bed 100644 (file)
@@ -18,6 +18,7 @@
 # include "irgraph_t.h"
 # include "irvrfy.h"
 # include "irgwalk.h"
+# include "irdump.h"
 
 #ifdef NDEBUG
 /*
@@ -34,8 +35,9 @@
 #else
 #define ASSERT_AND_RET(expr, string, ret) \
 do { \
-  if (opt_do_node_verification == NODE_VERIFICATION_ON) \
-    assert((expr) && string); \
+  if (opt_do_node_verification == NODE_VERIFICATION_ON) {\
+    if (!(expr)) dump_ir_block_graph(current_ir_graph, "-assert"); \
+    assert((expr) && string); } \
   if (!(expr)) { \
     if (opt_do_node_verification == NODE_VERIFICATION_REPORT) \
       fprintf(stderr, #expr " : " string "\n"); \
@@ -667,21 +669,20 @@ int irn_vrfy_irg(ir_node *n, ir_graph *irg)
                      );
       break;
 
-  case iro_Const: {
-    ASSERT_AND_RET(
-                  /* Const: BB --> data */
-                  (mode_is_data (mymode) ||
-                   mymode == mode_b)      /* we want boolean constants for static evaluation */
-                  ,"Const node", 0        /* of Cmp. */
-                  );
-    } break;
-
+    case iro_Const: {
+      ASSERT_AND_RET(
+                    /* Const: BB --> data */
+                    (mode_is_data (mymode) ||
+                     mymode == mode_b)      /* we want boolean constants for static evaluation */
+                    ,"Const node", 0        /* of Cmp. */
+                    );
+      } break;
     case iro_SymConst:
       if (get_SymConst_kind(n) == symconst_addr_ent) {
        entity *ent = get_SymConst_entity(n);
        if (is_method_type(get_entity_type(ent)) &&
            get_irn_irg(n) != get_const_code_irg()) {
-#if 0
+#if 1
          ASSERT_AND_RET((get_entity_peculiarity(ent) != peculiarity_description),
                         "A constant must address an existing method.", 0);
 #endif