Commit 10f8d2d5 authored by Sebastian Hack's avatar Sebastian Hack
Browse files

Changed __ to _

parent 984fa970
......@@ -38,13 +38,13 @@ extern size_t live_irn_data_offset;
#define get_block_live_info(irn) (&(get_irn_live_info(irn)->v.block))
#define get_node_live_info(irn) (&(get_irn_live_info(irn)->v.node))
static INLINE int __is_phi_operand(const ir_node *irn)
static INLINE int _is_phi_operand(const ir_node *irn)
{
assert(!is_Block(irn) && "No block node allowed here");
return get_node_live_info(irn)->is_phi_op;
}
static INLINE int __is_live_in(const ir_node *block, const ir_node *irn)
static INLINE int _is_live_in(const ir_node *block, const ir_node *irn)
{
block_live_info_t *info = get_block_live_info(block);
......@@ -52,7 +52,7 @@ static INLINE int __is_live_in(const ir_node *block, const ir_node *irn)
return pset_find_ptr(info->in, irn) != NULL;
}
static INLINE int __is_live_out(const ir_node *block, const ir_node *irn)
static INLINE int _is_live_out(const ir_node *block, const ir_node *irn)
{
block_live_info_t *info = get_block_live_info(block);
......@@ -60,7 +60,7 @@ static INLINE int __is_live_out(const ir_node *block, const ir_node *irn)
return pset_find_ptr(info->out, irn) != NULL;
}
static INLINE int __is_live_end(const ir_node *block, const ir_node *irn)
static INLINE int _is_live_end(const ir_node *block, const ir_node *irn)
{
block_live_info_t *info = get_block_live_info(block);
......@@ -68,31 +68,31 @@ static INLINE int __is_live_end(const ir_node *block, const ir_node *irn)
return pset_find_ptr(info->end, irn) != NULL;
}
static INLINE pset *__get_live_in(const ir_node *block)
static INLINE pset *_get_live_in(const ir_node *block)
{
assert(is_Block(block) && "Need a block here");
return get_block_live_info(block)->in;
}
static INLINE pset *__get_live_out(const ir_node *block)
static INLINE pset *_get_live_out(const ir_node *block)
{
assert(is_Block(block) && "Need a block here");
return get_block_live_info(block)->out;
}
static INLINE pset *__get_live_end(const ir_node *block)
static INLINE pset *_get_live_end(const ir_node *block)
{
assert(is_Block(block) && "Need a block here");
return get_block_live_info(block)->end;
}
#define is_phi_operand(irn) __is_phi_operand(irn)
#define is_live_in(bl,irn) __is_live_in(bl, irn)
#define is_live_out(bl,irn) __is_live_out(bl, irn)
#define is_live_end(bl,irn) __is_live_end(bl, irn)
#define get_live_in(bl) __get_live_in(bl)
#define get_live_out(bl) __get_live_out(bl)
#define get_live_end(bl) __get_live_end(bl)
#define is_phi_operand(irn) _is_phi_operand(irn)
#define is_live_in(bl,irn) _is_live_in(bl, irn)
#define is_live_out(bl,irn) _is_live_out(bl, irn)
#define is_live_end(bl,irn) _is_live_end(bl, irn)
#define get_live_in(bl) _get_live_in(bl)
#define get_live_out(bl) _get_live_out(bl)
#define get_live_end(bl) _get_live_end(bl)
/**
* Initialize the liveness module.
......
......@@ -4,8 +4,8 @@
* @date 8.11.2004
*/
#ifndef __BENUMB_T_H
#define __BENUMB_T_H
#ifndef _BENUMB_T_H
#define _BENUMB_T_H
#include "firm_config.h"
......@@ -34,53 +34,53 @@ extern int numbering_irg_data_offset;
#define get_irn_numbering(irn) _get_irn_numbering(numbering_t, irn)
#define get_irg_numbering(irg) _get_irg_numbering(irg_numbering_t, irg)
static INLINE int __get_irn_graph_nr(const ir_node *irn)
static INLINE int _get_irn_graph_nr(const ir_node *irn)
{
assert(!is_Block(irn) && "No block expected here");
return get_irn_numbering_const(irn)->global_nr;
}
static INLINE int __get_irn_block_nr(const ir_node *irn)
static INLINE int _get_irn_block_nr(const ir_node *irn)
{
assert(!is_Block(irn) && "No block expected here");
return get_irn_numbering_const(irn)->local_nr;
}
static INLINE int __get_block_graph_nr(const ir_node *irn)
static INLINE int _get_block_graph_nr(const ir_node *irn)
{
assert(is_Block(irn) && "Block expected here");
return get_irn_numbering_const(irn)->global_nr;
}
static INLINE int __get_block_node_count(const ir_node *irn)
static INLINE int _get_block_node_count(const ir_node *irn)
{
assert(is_Block(irn) && "Block expected here");
return get_irn_numbering_const(irn)->local_nr;
}
static INLINE int __get_graph_block_count(const ir_graph *irg)
static INLINE int _get_graph_block_count(const ir_graph *irg)
{
return get_irg_numbering_const(irg)->local_nr;
}
static INLINE int __get_graph_node_count(const ir_graph *irg)
static INLINE int _get_graph_node_count(const ir_graph *irg)
{
return get_irg_numbering_const(irg)->global_nr;
}
static INLINE ir_node *__get_irn_for_graph_nr(const ir_graph *irg, int nr)
static INLINE ir_node *_get_irn_for_graph_nr(const ir_graph *irg, int nr)
{
ir_node **map = get_irg_numbering_const(irg)->reverse_map;
assert(nr >= 0 && nr <= __get_graph_node_count(irg) && map[nr] != NULL);
assert(nr >= 0 && nr <= _get_graph_node_count(irg) && map[nr] != NULL);
return map[nr];
}
#define get_irn_graph_nr(irn) __get_irn_graph_nr(irn)
#define get_irn_block_nr(irn) __get_irn_block_nr(irn)
#define get_block_graph_nr(irn) __get_block_graph_nr(irn)
#define get_block_node_count(irn) __get_block_node_count(irn)
#define get_graph_block_count(irg) __get_graph_block_count(irg)
#define get_graph_node_count(irg) __get_graph_node_count(irg)
#define get_irn_for_graph_nr(irg,nr) __get_irn_for_graph_nr(irg,nr)
#define get_irn_graph_nr(irn) _get_irn_graph_nr(irn)
#define get_irn_block_nr(irn) _get_irn_block_nr(irn)
#define get_block_graph_nr(irn) _get_block_graph_nr(irn)
#define get_block_node_count(irn) _get_block_node_count(irn)
#define get_graph_block_count(irg) _get_graph_block_count(irg)
#define get_graph_node_count(irg) _get_graph_node_count(irg)
#define get_irn_for_graph_nr(irg,nr) _get_irn_for_graph_nr(irg,nr)
#endif
......@@ -9,6 +9,7 @@
#include "firm_config.h"
#include "bitset.h"
#include "list.h"
#include "bera.h"
......@@ -20,7 +21,8 @@ typedef struct _ra_node_info_t {
} ra_node_info_t;
typedef struct _ra_block_info_t {
bitset_t *used_colors; /**< A bitmask containing all colors used in the block. */
bitset_t *used_colors; /**< A bitmask containing all colors used in the block. */
struct list_head border_head; /**< A list head to enqueue the borders. */
} ra_block_info_t;
/**
......@@ -64,27 +66,27 @@ void be_ra_init(void);
*/
#define is_color(col) ((col) != NO_COLOR)
static INLINE int __get_irn_color(const ir_node *irn)
static INLINE int _get_irn_color(const ir_node *irn)
{
assert(!is_Block(irn) && "No block allowed here");
return get_ra_node_info(irn)->color;
}
static INLINE void __set_irn_color(const ir_node *irn, int color)
static INLINE void _set_irn_color(const ir_node *irn, int color)
{
assert(!is_Block(irn) && "No block allowed here");
get_ra_node_info(irn)->color = color;
}
static INLINE int __is_allocatable_irn(const ir_node *irn)
static INLINE int _is_allocatable_irn(const ir_node *irn)
{
assert(!is_Block(irn) && "No block allowed here");
return mode_is_datab(get_irn_mode(irn));
}
#define get_irn_color(irn) __get_irn_color(irn)
#define set_irn_color(irn,col) __set_irn_color(irn, col)
#define is_allocatable_irn(irn) __is_allocatable_irn(irn)
#define get_irn_color(irn) _get_irn_color(irn)
#define set_irn_color(irn,col) _set_irn_color(irn, col)
#define is_allocatable_irn(irn) _is_allocatable_irn(irn)
/**
* Check, if two phi operands interfere.
......
......@@ -11,10 +11,10 @@
FIRM_IMPL1(sched_get_time_step, int, const ir_node *)
FIRM_IMPL1(sched_has_succ, int, const ir_node *)
FIRM_IMPL1(sched_has_prev, int, const ir_node *)
FIRM_IMPL1(sched_succ, const ir_node *, const ir_node *)
FIRM_IMPL1(sched_prev, const ir_node *, const ir_node *)
FIRM_IMPL1(sched_first, const ir_node *, const ir_node *)
FIRM_IMPL1(sched_last, const ir_node *, const ir_node *)
FIRM_IMPL1(sched_succ, ir_node *, const ir_node *)
FIRM_IMPL1(sched_prev, ir_node *, const ir_node *)
FIRM_IMPL1(sched_first, ir_node *, const ir_node *)
FIRM_IMPL1(sched_last, ir_node *, const ir_node *)
size_t sched_irn_data_offset = 0;
......
......@@ -9,11 +9,11 @@ void be_sched_dump(FILE *f, const ir_graph *irg);
int (sched_get_time_step)(const ir_node *irn);
int (sched_has_succ)(const ir_node *irn);
int (sched_has_prev)(const ir_node *irn);
const ir_node *(sched_succ)(const ir_node *irn);
const ir_node *(sched_prev)(const ir_node *irn);
const ir_node *(sched_first)(const ir_node *block);
const ir_node *(sched_last)(const ir_node *block);
const ir_node *(sched_add)(ir_node *block, const ir_node *irn);
ir_node *(sched_succ)(const ir_node *irn);
ir_node *(sched_prev)(const ir_node *irn);
ir_node *(sched_first)(const ir_node *block);
ir_node *(sched_last)(const ir_node *block);
ir_node *(sched_add)(ir_node *block, const ir_node *irn);
/**
* A shorthand macro for iterating over a schedule.
......
......@@ -31,7 +31,7 @@ void be_sched_init(void);
* @param irn The node.
* @return The time step in the schedule.
*/
static INLINE int __sched_get_time_step(const ir_node *irn)
static INLINE int _sched_get_time_step(const ir_node *irn)
{
return get_irn_sched_info(irn)->time_step;
}
......@@ -41,7 +41,7 @@ static INLINE int __sched_get_time_step(const ir_node *irn)
* @param irn The ir node.
* @return 1, if the node has a scheduling successor, 0 if not.
*/
static INLINE int __sched_has_succ(const ir_node *irn)
static INLINE int _sched_has_succ(const ir_node *irn)
{
const sched_info_t *info = get_irn_sched_info(irn);
const sched_info_t *block_info = get_irn_sched_info(get_nodes_block(irn));
......@@ -53,7 +53,7 @@ static INLINE int __sched_has_succ(const ir_node *irn)
* @param irn The ir node.
* @return 1, if the node has a scheduling predecessor, 0 if not.
*/
static INLINE int __sched_has_prev(const ir_node *irn)
static INLINE int _sched_has_prev(const ir_node *irn)
{
const sched_info_t *info = get_irn_sched_info(irn);
const sched_info_t *block_info = get_irn_sched_info(get_nodes_block(irn));
......@@ -66,10 +66,10 @@ static INLINE int __sched_has_prev(const ir_node *irn)
* @return The next ir node in the schedule or NULL, if this node has no
* successor.
*/
static INLINE const ir_node *__sched_succ(const ir_node *irn)
static INLINE ir_node *_sched_succ(const ir_node *irn)
{
const sched_info_t *info = get_irn_sched_info(irn);
return __sched_has_succ(irn) ? get_sched_info_irn(_sched_entry(info->list.next)) : NULL;
return _sched_has_succ(irn) ? get_sched_info_irn(_sched_entry(info->list.next)) : NULL;
}
/**
......@@ -78,10 +78,10 @@ static INLINE const ir_node *__sched_succ(const ir_node *irn)
* @return The next ir node in the schedule or NULL, if this node has no
* predecessor.
*/
static INLINE const ir_node *__sched_prev(const ir_node *irn)
static INLINE ir_node *_sched_prev(const ir_node *irn)
{
const sched_info_t *info = get_irn_sched_info(irn);
return __sched_has_prev(irn) ? get_sched_info_irn(_sched_entry(info->list.prev)) : NULL;
return _sched_has_prev(irn) ? get_sched_info_irn(_sched_entry(info->list.prev)) : NULL;
}
/**
......@@ -89,7 +89,7 @@ static INLINE const ir_node *__sched_prev(const ir_node *irn)
* @param block The block of which to get the schedule.
* @return The first node in the schedule or NULL if there is none.
*/
static INLINE const ir_node *__sched_first(const ir_node *block)
static INLINE ir_node *_sched_first(const ir_node *block)
{
const sched_info_t *info = get_irn_sched_info(block);
assert(is_Block(block) && "Need a block here");
......@@ -102,7 +102,7 @@ static INLINE const ir_node *__sched_first(const ir_node *block)
* @return The last ir node in a schedule, or NULL if no schedule exists
* or it is empty.
*/
static INLINE const ir_node *__sched_last(const ir_node *block)
static INLINE ir_node *_sched_last(const ir_node *block)
{
const sched_info_t *info = get_irn_sched_info(block);
assert(is_Block(block) && "Need a block here");
......@@ -115,21 +115,21 @@ static INLINE const ir_node *__sched_last(const ir_node *block)
* @param irn The node to add.
* @return The given node.
*/
static INLINE const ir_node *__sched_add(ir_node *block, const ir_node *irn)
static INLINE ir_node *_sched_add(ir_node *block, ir_node *irn)
{
assert(is_Block(block) && "Need a block here");
list_add_tail(&get_irn_sched_info(irn)->list, &get_irn_sched_info(block)->list);
return irn;
}
#define sched_get_time_step(irn) __sched_get_time_step(irn)
#define sched_has_succ(irn) __sched_has_succ(irn)
#define sched_has_prev(irn) __sched_has_prev(irn)
#define sched_succ(irn) __sched_succ(irn)
#define sched_prev(irn) __sched_prev(irn)
#define sched_first(irn) __sched_first(irn)
#define sched_last(irn) __sched_last(irn)
#define sched_add(block,irn) __sched_add(block,irn)
#define sched_get_time_step(irn) _sched_get_time_step(irn)
#define sched_has_succ(irn) _sched_has_succ(irn)
#define sched_has_prev(irn) _sched_has_prev(irn)
#define sched_succ(irn) _sched_succ(irn)
#define sched_prev(irn) _sched_prev(irn)
#define sched_first(irn) _sched_first(irn)
#define sched_last(irn) _sched_last(irn)
#define sched_add(block,irn) _sched_add(block,irn)
#endif
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment