projects
/
libfirm
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fix warnings
[libfirm]
/
ir
/
kaps
/
heuristical_co_ld.c
diff --git
a/ir/kaps/heuristical_co_ld.c
b/ir/kaps/heuristical_co_ld.c
index
ba694f9
..
fe7db8c
100644
(file)
--- a/
ir/kaps/heuristical_co_ld.c
+++ b/
ir/kaps/heuristical_co_ld.c
@@
-14,7
+14,7
@@
#include "bucket.h"
#include "heuristical_co_ld.h"
#include "optimal.h"
#include "bucket.h"
#include "heuristical_co_ld.h"
#include "optimal.h"
-#if
KAPS_DUMP
+#if KAPS_DUMP
#include "html_dumper.h"
#endif
#include "kaps.h"
#include "html_dumper.h"
#endif
#include "kaps.h"
@@
-36,9
+36,6
@@
static void back_propagate_RI(pbqp_t *pbqp, pbqp_node_t *node)
vector_t *vec;
int is_src;
vector_t *vec;
int is_src;
- assert(pbqp);
- assert(node);
-
(void) pbqp;
edge = node->edges[0];
(void) pbqp;
edge = node->edges[0];
@@
-48,17
+45,13
@@
static void back_propagate_RI(pbqp_t *pbqp, pbqp_node_t *node)
if (is_src) {
other = edge->tgt;
if (is_src) {
other = edge->tgt;
- assert(other);
-
node->solution = pbqp_matrix_get_col_min_index(mat, other->solution, vec);
} else {
other = edge->src;
node->solution = pbqp_matrix_get_col_min_index(mat, other->solution, vec);
} else {
other = edge->src;
- assert(other);
-
node->solution = pbqp_matrix_get_row_min_index(mat, other->solution, vec);
}
node->solution = pbqp_matrix_get_row_min_index(mat, other->solution, vec);
}
-#if
KAPS_DUMP
+#if KAPS_DUMP
if (pbqp->dump_file) {
fprintf(pbqp->dump_file, "node n%d is set to %d<br>\n", node->index, node->solution);
}
if (pbqp->dump_file) {
fprintf(pbqp->dump_file, "node n%d is set to %d<br>\n", node->index, node->solution);
}
@@
-135,7
+128,7
@@
static void back_propagate_RII(pbqp_t *pbqp, pbqp_node_t *node)
node->solution = vector_get_min_index(vec);
node->solution = vector_get_min_index(vec);
-#if
KAPS_DUMP
+#if KAPS_DUMP
if (pbqp->dump_file) {
fprintf(pbqp->dump_file, "node n%d is set to %d<br>\n", node->index, node->solution);
}
if (pbqp->dump_file) {
fprintf(pbqp->dump_file, "node n%d is set to %d<br>\n", node->index, node->solution);
}
@@
-171,7
+164,7
@@
static void back_propagate_RN(pbqp_t *pbqp, pbqp_node_t *node)
assert(vector_get_min(vec) != INF_COSTS);
node->solution = vector_get_min_index(vec);
assert(vector_get_min(vec) != INF_COSTS);
node->solution = vector_get_min_index(vec);
-#if
KAPS_DUMP
+#if KAPS_DUMP
if (pbqp->dump_file) {
fprintf(pbqp->dump_file, "node n%d is set to %d<br>\n", node->index, node->solution);
}
if (pbqp->dump_file) {
fprintf(pbqp->dump_file, "node n%d is set to %d<br>\n", node->index, node->solution);
}
@@
-187,9
+180,9
@@
static void back_propagate_ld(pbqp_t *pbqp)
assert(pbqp);
assert(pbqp);
-#if
KAPS_DUMP
+#if KAPS_DUMP
if (pbqp->dump_file) {
if (pbqp->dump_file) {
- dump_section(pbqp->dump_file, 2, "Back Propagation");
+
pbqp_
dump_section(pbqp->dump_file, 2, "Back Propagation");
}
#endif
}
#endif
@@
-225,7
+218,6
@@
static void merge_into_RN_node(pbqp_t *pbqp, plist_t *rpeo)
plist_insert_front(rpeo, node);
} while(node_is_reduced(node));
plist_insert_front(rpeo, node);
} while(node_is_reduced(node));
- assert(node);
assert(pbqp_node_get_degree(node) > 2);
/* Check whether we can merge a neighbor into the current node. */
assert(pbqp_node_get_degree(node) > 2);
/* Check whether we can merge a neighbor into the current node. */
@@
-241,16
+233,15
@@
static void apply_RN_co_without_selection(pbqp_t *pbqp)
node = merged_node;
merged_node = NULL;
node = merged_node;
merged_node = NULL;
- assert(node);
if (node_is_reduced(node))
return;
if (node_is_reduced(node))
return;
-#if
KAPS_DUMP
+#if KAPS_DUMP
if (pbqp->dump_file) {
char txt[100];
sprintf(txt, "RN-Reduction of Node n%d", node->index);
if (pbqp->dump_file) {
char txt[100];
sprintf(txt, "RN-Reduction of Node n%d", node->index);
- dump_section(pbqp->dump_file, 2, txt);
+
pbqp_
dump_section(pbqp->dump_file, 2, txt);
pbqp_dump_graph(pbqp);
}
#endif
pbqp_dump_graph(pbqp);
}
#endif
@@
-262,10
+253,8
@@
static void apply_RN_co_without_selection(pbqp_t *pbqp)
/* get neighbor node */
edge = node->edges[edge_index];
/* get neighbor node */
edge = node->edges[edge_index];
- assert(edge);
neighbor = edge->src == node ? edge->tgt : edge->src;
neighbor = edge->src == node ? edge->tgt : edge->src;
- assert(neighbor);
assert(neighbor != node);
assert(neighbor != node);