beschednormal: Remove strange scheduled test from tree cost calculation.
[libfirm] / ir / ana / irbackedge.c
index 13fee32..d0aca0e 100644 (file)
@@ -22,7 +22,6 @@
  * @brief     Access function for backedges.
  * @author    Goetz Lindenmaier
  * @date      7.2002
- * @version   $Id$
  */
 #include "config.h"
 
@@ -44,7 +43,7 @@
  * Does not assert whether the backarray is correct -- use
  * very careful!
  */
-static bitset_t *mere_get_backarray(ir_node *n)
+static bitset_t *mere_get_backarray(const ir_node *n)
 {
        switch (get_irn_opcode(n)) {
        case iro_Block:
@@ -65,7 +64,7 @@ static bitset_t *mere_get_backarray(ir_node *n)
  * Returns backarray if the node can have backedges, else returns
  * NULL.
  */
-static bitset_t *get_backarray(ir_node *n)
+static bitset_t *get_backarray(const ir_node *n)
 {
        bitset_t *ba = mere_get_backarray(n);
 
@@ -85,7 +84,7 @@ static bitset_t *get_backarray(ir_node *n)
  * Returns non-zero if node has no backarray, or
  *                  if size of backarray == size of in array.
  */
-static int legal_backarray(ir_node *n)
+static int legal_backarray(const ir_node *n)
 {
        bitset_t *ba = mere_get_backarray(n);
        if (ba && (bitset_size(ba) != (unsigned) get_irn_arity(n)))
@@ -118,8 +117,7 @@ void fix_backedges(struct obstack *obst, ir_node *n)
        assert(legal_backarray(n));
 }
 
-/* Returns non-zero if the predecessor pos is a backedge. */
-int is_backedge(ir_node *n, int pos)
+int is_backedge(const ir_node *n, int pos)
 {
        bitset_t *ba = get_backarray(n);
        if (ba)
@@ -127,7 +125,6 @@ int is_backedge(ir_node *n, int pos)
        return 0;
 }
 
-/* Remarks that edge pos is a backedge. */
 void set_backedge(ir_node *n, int pos)
 {
        bitset_t *ba = get_backarray(n);
@@ -135,7 +132,6 @@ void set_backedge(ir_node *n, int pos)
        bitset_set(ba, pos);
 }
 
-/* Remarks that edge pos is a backedge. */
 void set_not_backedge(ir_node *n, int pos)
 {
        bitset_t *ba = get_backarray(n);
@@ -143,8 +139,7 @@ void set_not_backedge(ir_node *n, int pos)
        bitset_clear(ba, pos);
 }
 
-/* Returns non-zero if n has backedges. */
-int has_backedges(ir_node *n)
+int has_backedges(const ir_node *n)
 {
        bitset_t *ba = get_backarray(n);
        if (ba != NULL) {
@@ -153,7 +148,6 @@ int has_backedges(ir_node *n)
        return 0;
 }
 
-/** Sets all backedge information to zero. */
 void clear_backedges(ir_node *n)
 {
        bitset_t *ba = get_backarray(n);
@@ -162,7 +156,6 @@ void clear_backedges(ir_node *n)
        }
 }
 
-/* Allocate a new backedge array on the obstack for given size. */
 bitset_t *new_backedge_arr(struct obstack *obst, size_t size)
 {
        return bitset_obstack_alloc(obst, size);