- get_Block_cfgpred_arr() IS supported, but should not be in the official
[libfirm] / ir / ir / irphase_t.h
index 2df6f34..4028da4 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 1995-2007 University of Karlsruhe.  All right reserved.
+ * Copyright (C) 1995-2008 University of Karlsruhe.  All right reserved.
  *
  * This file is part of libFirm.
  *
@@ -70,7 +70,7 @@ struct _ir_phase {
  */
 typedef struct {
        unsigned node_slots;       /**< The number of allocated node slots. */
-       unsigned node_slots_used;  /**< The number of used node slots, ie. nodes that have node data. */
+       unsigned node_slots_used;  /**< The number of used node slots, i.e. nodes that have node data. */
        unsigned node_map_bytes;   /**< Number of used bytes for the node map. */
        unsigned overall_bytes;    /**< Overall number of used bytes for the phase. */
 } phase_stat_t;
@@ -273,7 +273,7 @@ ir_node *phase_get_next_node(const ir_phase *phase, ir_node *start);
 /**
  * This is private and only here for performance reasons.
  */
-static INLINE void _phase_reinit_single_irn_data(ir_phase *phase, ir_node *irn)
+static inline void _phase_reinit_single_irn_data(ir_phase *phase, ir_node *irn)
 {
        int idx;
 
@@ -289,7 +289,7 @@ static INLINE void _phase_reinit_single_irn_data(ir_phase *phase, ir_node *irn)
 /**
  * This is private and just here for performance reasons.
  */
-static INLINE void _private_phase_enlarge(ir_phase *phase, unsigned max_idx)
+static inline void _private_phase_enlarge(ir_phase *phase, unsigned max_idx)
 {
        unsigned last_irg_idx = get_irg_last_idx(phase->irg);
        size_t old_cap        = phase->n_data_ptr;
@@ -299,7 +299,7 @@ static INLINE void _private_phase_enlarge(ir_phase *phase, unsigned max_idx)
        max_idx = MAX(max_idx, last_irg_idx);
        new_cap = (size_t) (max_idx * phase->growth_factor / 256);
 
-       phase->data_ptr = (void **)xrealloc(phase->data_ptr, new_cap * sizeof(phase->data_ptr[0]));
+       phase->data_ptr = XREALLOC(phase->data_ptr, void*, new_cap);
 
        /* initialize the newly allocated memory. */
        memset(phase->data_ptr + old_cap, 0, (new_cap - old_cap) * sizeof(phase->data_ptr[0]));
@@ -311,13 +311,13 @@ static INLINE void _private_phase_enlarge(ir_phase *phase, unsigned max_idx)
  */
 #define _private_phase_assure_capacity(ph, max_idx) ((max_idx) >= (ph)->n_data_ptr ? (_private_phase_enlarge((ph), (max_idx)), 1) : 1)
 
-static INLINE void *_phase_get_irn_data(const ir_phase *ph, const ir_node *irn)
+static inline void *_phase_get_irn_data(const ir_phase *ph, const ir_node *irn)
 {
        unsigned idx = get_irn_idx(irn);
        return idx < ph->n_data_ptr ? ph->data_ptr[idx] : NULL;
 }
 
-static INLINE void *_phase_set_irn_data(ir_phase *ph, const ir_node *irn, void *data)
+static inline void *_phase_set_irn_data(ir_phase *ph, const ir_node *irn, void *data)
 {
        unsigned idx = get_irn_idx(irn);
        void *res;
@@ -332,7 +332,7 @@ static INLINE void *_phase_set_irn_data(ir_phase *ph, const ir_node *irn, void *
 }
 
 
-static INLINE void *_phase_get_or_set_irn_data(ir_phase *ph, const ir_node *irn)
+static inline void *_phase_get_or_set_irn_data(ir_phase *ph, const ir_node *irn)
 {
        unsigned idx = get_irn_idx(irn);
        void *res;
@@ -353,12 +353,12 @@ static INLINE void *_phase_get_or_set_irn_data(ir_phase *ph, const ir_node *irn)
        return res;
 }
 
-static INLINE ir_phase *_get_irg_phase(const ir_graph *irg, ir_phase_id id)
+static inline ir_phase *_get_irg_phase(const ir_graph *irg, ir_phase_id id)
 {
        return irg->phases[id];
 }
 
-static INLINE void *_get_irn_phase_info(const ir_node *irn, ir_phase_id id)
+static inline void *_get_irn_phase_info(const ir_node *irn, ir_phase_id id)
 {
        const ir_graph *irg = get_irn_irg(irn);
        const ir_phase *ph  = get_irg_phase(irg, id);
@@ -366,7 +366,7 @@ static INLINE void *_get_irn_phase_info(const ir_node *irn, ir_phase_id id)
        return _phase_get_irn_data(ph, irn);
 }
 
-static INLINE void *_get_or_set_irn_phase_info(const ir_node *irn, ir_phase_id id)
+static inline void *_get_or_set_irn_phase_info(const ir_node *irn, ir_phase_id id)
 {
        const ir_graph *irg = get_irn_irg(irn);
        ir_phase *ph  = get_irg_phase(irg, id);
@@ -374,7 +374,7 @@ static INLINE void *_get_or_set_irn_phase_info(const ir_node *irn, ir_phase_id i
        return _phase_get_or_set_irn_data(ph, irn);
 }
 
-static INLINE void *_set_irn_phase_info(const ir_node *irn, ir_phase_id id, void *data)
+static inline void *_set_irn_phase_info(const ir_node *irn, ir_phase_id id, void *data)
 {
        const ir_graph *irg = get_irn_irg(irn);
        ir_phase *ph  = get_irg_phase(irg, id);