projects
/
libfirm
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
add docu and prototype for find_value()
[libfirm]
/
ir
/
ana
/
irscc.c
diff --git
a/ir/ana/irscc.c
b/ir/ana/irscc.c
index
e4a7595
..
bd640cd
100644
(file)
--- a/
ir/ana/irscc.c
+++ b/
ir/ana/irscc.c
@@
-9,7
+9,7
@@
* Modified by:
* Created: 7.2002
* CVS-ID: $Id$
* Modified by:
* Created: 7.2002
* CVS-ID: $Id$
- * Copyright: (c) 2002-200
3
Universität Karlsruhe
+ * Copyright: (c) 2002-200
6
Universität Karlsruhe
* Licence: This file protected by GPL - GNU GENERAL PUBLIC LICENSE.
*/
* Licence: This file protected by GPL - GNU GENERAL PUBLIC LICENSE.
*/
@@
-137,9
+137,8
@@
set_irn_loop (ir_node *n, ir_loop *loop) {
}
/* Uses temporary information to get the loop */
}
/* Uses temporary information to get the loop */
-ir_loop *
-get_irn_loop (ir_node *n) {
- return n->loop;
+ir_loop *(get_irn_loop)(const ir_node *n) {
+ return _get_irn_loop(n);
}
}
@@
-351,21
+350,18
@@
static void mature_loop (ir_loop *loop) {
#endif
/* Returns outer loop, itself if outermost. */
#endif
/* Returns outer loop, itself if outermost. */
-ir_loop *get_loop_outer_loop (ir_loop *loop) {
- assert(loop && loop->kind == k_ir_loop);
- return loop->outer_loop;
+ir_loop *(get_loop_outer_loop)(const ir_loop *loop) {
+ return _get_loop_outer_loop(loop);
}
/* Returns nesting depth of this loop */
}
/* Returns nesting depth of this loop */
-int get_loop_depth (ir_loop *loop) {
- assert(loop); assert(loop->kind == k_ir_loop);
- return loop->depth;
+int (get_loop_depth)(const ir_loop *loop) {
+ return _get_loop_depth(loop);
}
/* Returns the number of inner loops */
}
/* Returns the number of inner loops */
-int get_loop_n_sons (ir_loop *loop) {
- assert(loop && loop->kind == k_ir_loop);
- return(loop -> n_sons);
+int (get_loop_n_sons)(const ir_loop *loop) {
+ return _get_loop_n_sons(loop);
}
/* Returns the pos`th loop_node-child *
}
/* Returns the pos`th loop_node-child *
@@
-440,8
+436,8
@@
add_loop_node(ir_loop *loop, ir_node *n) {
loop->n_nodes++;
}
loop->n_nodes++;
}
-/*
*
Returns the number of elements contained in loop. */
-int get_loop_n_elements (ir_loop *loop) {
+/* Returns the number of elements contained in loop. */
+int get_loop_n_elements (
const
ir_loop *loop) {
assert(loop && loop->kind == k_ir_loop);
return(ARR_LEN(loop->children));
}
assert(loop && loop->kind == k_ir_loop);
return(ARR_LEN(loop->children));
}
@@
-453,22
+449,22
@@
int get_loop_n_elements (ir_loop *loop) {
and then select the appropriate "loop_element.node" or "loop_element.son".
*/
and then select the appropriate "loop_element.node" or "loop_element.son".
*/
-loop_element get_loop_element
(
ir_loop *loop, int pos) {
+loop_element get_loop_element
(const
ir_loop *loop, int pos) {
assert(loop && loop->kind == k_ir_loop && pos < ARR_LEN(loop->children));
assert(loop && loop->kind == k_ir_loop && pos < ARR_LEN(loop->children));
-
return(loop -> children[pos]);
}
return(loop -> children[pos]);
}
-int get_loop_element_pos(ir_loop *loop, void *le) {
- int i;
+int get_loop_element_pos(
const
ir_loop *loop, void *le) {
+ int i
, n
;
assert(loop && loop->kind == k_ir_loop);
assert(loop && loop->kind == k_ir_loop);
- for (i = 0; i < get_loop_n_elements(loop); i++)
+ n = get_loop_n_elements(loop);
+ for (i = 0; i < n; i++)
if (get_loop_element(loop, i).node == le) return i;
return -1;
}
if (get_loop_element(loop, i).node == le) return i;
return -1;
}
-int get_loop_loop_nr(ir_loop *loop) {
+int get_loop_loop_nr(
const
ir_loop *loop) {
assert(loop && loop->kind == k_ir_loop);
#ifdef DEBUG_libfirm
return loop->loop_nr;
assert(loop && loop->kind == k_ir_loop);
#ifdef DEBUG_libfirm
return loop->loop_nr;