Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Zwinkau
libfirm
Commits
10f8d2d5
Commit
10f8d2d5
authored
Jan 26, 2005
by
Sebastian Hack
Browse files
Changed __ to _
parent
984fa970
Changes
6
Hide whitespace changes
Inline
Side-by-side
ir/be/belive_t.h
View file @
10f8d2d5
...
...
@@ -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.
...
...
ir/be/benumb_t.h
View file @
10f8d2d5
...
...
@@ -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
ir/be/bera_t.h
View file @
10f8d2d5
...
...
@@ -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.
...
...
ir/be/besched.c
View file @
10f8d2d5
...
...
@@ -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
;
...
...
ir/be/besched.h
View file @
10f8d2d5
...
...
@@ -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.
...
...
ir/be/besched_t.h
View file @
10f8d2d5
...
...
@@ -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
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment