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
d9b6d096
Commit
d9b6d096
authored
Jul 22, 2008
by
Matthias Braun
Browse files
const changes and enhancements to irouts
[r20596]
parent
1a49aa9c
Changes
4
Hide whitespace changes
Inline
Side-by-side
include/libfirm/irloop.h
View file @
d9b6d096
...
...
@@ -219,6 +219,6 @@ void free_all_loop_information (void);
*
* Returns non-zero, if the node n is not changed in the loop block
* belongs to or in inner loops of this block. */
int
is_loop_invariant
(
ir_node
*
n
,
ir_node
*
block
);
int
is_loop_invariant
(
const
ir_node
*
n
,
const
ir_node
*
block
);
#endif
include/libfirm/irouts.h
View file @
d9b6d096
...
...
@@ -75,6 +75,13 @@ void irg_out_block_walk(ir_node *node,
irg_walk_func
*
pre
,
irg_walk_func
*
post
,
void
*
env
);
/**
* returns 1 if outs have been computed for a node, 0 otherwise.
*
* this is usefull to detect newly created nodes that have no outs set yet
*/
int
get_irn_outs_computed
(
const
ir_node
*
node
);
/*------------------------------------------------------------------*/
/* Building and Removing the out datastructure */
/*------------------------------------------------------------------*/
...
...
ir/ana/irouts.c
View file @
d9b6d096
...
...
@@ -59,6 +59,11 @@ static void reset_outs(ir_node *node, void *unused) {
}
#endif
int
get_irn_outs_computed
(
const
ir_node
*
node
)
{
return
node
->
out
!=
NULL
;
}
/* returns the number of successors of the node: */
int
get_irn_n_outs
(
ir_node
*
node
)
{
assert
(
node
&&
node
->
kind
==
k_ir_node
);
...
...
ir/ana/irscc.c
View file @
d9b6d096
...
...
@@ -1248,8 +1248,8 @@ int is_loop_variant(ir_loop *l, ir_loop *b) {
*
* Returns non-zero, if the node n is not changed in the loop block
* belongs to or in inner loops of this blocks loop. */
int
is_loop_invariant
(
ir_node
*
n
,
ir_node
*
block
)
{
int
is_loop_invariant
(
const
ir_node
*
n
,
const
ir_node
*
block
)
{
ir_loop
*
l
=
get_irn_loop
(
block
);
ir_node
*
b
=
is_Block
(
n
)
?
n
:
get_nodes_block
(
n
);
const
ir_node
*
b
=
is_Block
(
n
)
?
n
:
get_nodes_block
(
n
);
return
!
is_loop_variant
(
l
,
get_irn_loop
(
b
));
}
Write
Preview
Markdown
is supported
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