summaryrefslogtreecommitdiffhomepage
path: root/ir/be/beloopana.c
diff options
context:
space:
mode:
authorChristoph Mallon <christoph.mallon@gmx.de>2012-12-21 13:26:46 +0100
committerChristoph Mallon <christoph.mallon@gmx.de>2012-12-21 18:56:01 +0100
commit288e850c704a9fbb2cc39a88a9eb680a472d4ec1 (patch)
treeeaba1225ffd23f7ff7afa83af8cf4eda306a8383 /ir/be/beloopana.c
parentf1fcf5fbb98b8277705663a78bbdd638e36061b3 (diff)
beloopana: Replace be_new_loop_pressure() by be_new_loop_pressure_cls(), but use the name of the former.
The register class given by the only caller is never null, so be_new_loop_pressure() behaves like be_new_loop_pressure_cls().
Diffstat (limited to 'ir/be/beloopana.c')
-rw-r--r--ir/be/beloopana.c42
1 files changed, 1 insertions, 41 deletions
diff --git a/ir/be/beloopana.c b/ir/be/beloopana.c
index aae7fae..23b9910 100644
--- a/ir/be/beloopana.c
+++ b/ir/be/beloopana.c
@@ -133,14 +133,7 @@ static unsigned be_compute_loop_pressure(be_loopana_t *loop_ana, ir_loop *loop,
return pressure;
}
-/**
- * Compute the register pressure for a class of all loops in a graph
- * @param irg The graph
- * @param cls The register class to compute the pressure for
- * @return The loop analysis object.
- */
-be_loopana_t *be_new_loop_pressure_cls(ir_graph *irg,
- const arch_register_class_t *cls)
+be_loopana_t *be_new_loop_pressure(ir_graph *const irg, arch_register_class_t const *const cls)
{
be_loopana_t *loop_ana = XMALLOC(be_loopana_t);
@@ -159,39 +152,6 @@ be_loopana_t *be_new_loop_pressure_cls(ir_graph *irg,
}
/**
- * Compute the register pressure for all classes of all loops in the irg.
- * @param irg The graph
- * @return The loop analysis object.
- */
-be_loopana_t *be_new_loop_pressure(ir_graph *irg,
- const arch_register_class_t *cls)
-{
- be_loopana_t *loop_ana = XMALLOC(be_loopana_t);
- ir_loop *irg_loop = get_irg_loop(irg);
- const arch_env_t *arch_env = be_get_irg_arch_env(irg);
- int i;
-
- loop_ana->data = new_set(cmp_loop_info, 16);
- loop_ana->irg = irg;
-
- assure_loopinfo(irg);
-
- if (cls != NULL) {
- be_compute_loop_pressure(loop_ana, irg_loop, cls);
- } else {
- for (i = arch_env->n_register_classes - 1; i >= 0; --i) {
- const arch_register_class_t *cls = &arch_env->register_classes[i];
- DBG((dbg, LEVEL_1, "\n=====================================================\n", cls->name));
- DBG((dbg, LEVEL_1, " Computing register pressure for class %s:\n", cls->name));
- DBG((dbg, LEVEL_1, "=====================================================\n", cls->name));
- be_compute_loop_pressure(loop_ana, irg_loop, cls);
- }
- }
-
- return loop_ana;
-}
-
-/**
* Returns the computed register pressure for the given class and loop.
* @return The pressure or INT_MAX if not found
*/