From 6986cbe48f25b4d79c856b8732ec740a1de942a8 Mon Sep 17 00:00:00 2001 From: =?utf8?q?G=C3=B6tz=20Lindenmaier?= Date: Thu, 16 Jun 2005 14:46:09 +0000 Subject: [PATCH] my colleagues didn't like the existence of a function that is once static, and once public... which kind of is all right... [r6030] --- ir/ana/field_temperature.c | 4 ++-- ir/ana/field_temperature.h | 7 ++++++- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/ir/ana/field_temperature.c b/ir/ana/field_temperature.c index c4f122acb..626612e39 100644 --- a/ir/ana/field_temperature.c +++ b/ir/ana/field_temperature.c @@ -51,7 +51,7 @@ int get_irn_loop_call_depth(ir_node *n) { return get_irg_loop_depth(irg); } -int get_irn_loop_depth(ir_node *n) { +int get_irn_cfloop_depth(ir_node *n) { ir_loop *l = get_irn_loop(get_nodes_block(n)); if (l) return get_loop_depth(l); @@ -68,7 +68,7 @@ int get_irn_recursion_depth(ir_node *n) { /** @@@ the second version of the heuristic. */ int get_weighted_loop_depth(ir_node *n) { int loop_call_depth = get_irn_loop_call_depth(n); - int loop_depth = get_irn_loop_depth(n); + int loop_depth = get_irn_cfloop_depth(n); int recursion_depth = get_irn_recursion_depth(n); return loop_call_depth + loop_depth + recursion_depth; diff --git a/ir/ana/field_temperature.h b/ir/ana/field_temperature.h index 6e0a7ea31..cd6d7c726 100644 --- a/ir/ana/field_temperature.h +++ b/ir/ana/field_temperature.h @@ -42,7 +42,12 @@ entity *get_Sel_accessed_entity (ir_node *sel, int pos); */ int get_irn_loop_call_depth(ir_node *n); -int get_irn_loop_depth(ir_node *n); +/** Return loop depth of node. + * + * Returns the loop depth of n in the control flow. I.e., we + * go from the node to the block to the loop the block is in, + * and return its depth. */ +int get_irn_cfloop_depth(ir_node *n); int get_irn_recursion_depth(ir_node *n); /** Get the weighted interprocedural loop depth of the node. -- 2.20.1