projects
/
libfirm
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Do not mark the transformed as visited. It makes no sense at all.
[libfirm]
/
ir
/
be
/
becopyilp2.c
diff --git
a/ir/be/becopyilp2.c
b/ir/be/becopyilp2.c
index
ad41740
..
42fb15c
100644
(file)
--- a/
ir/be/becopyilp2.c
+++ b/
ir/be/becopyilp2.c
@@
-1,5
+1,5
@@
/*
/*
- * Copyright (C) 1995-200
7
University of Karlsruhe. All right reserved.
+ * Copyright (C) 1995-200
8
University of Karlsruhe. All right reserved.
*
* This file is part of libFirm.
*
*
* This file is part of libFirm.
*
@@
-291,19
+291,24
@@
static void build_clique_star_cstr(ilp_env_t *ienv) {
co_gs_foreach_aff_node(ienv->co, aff) {
struct obstack ob;
neighb_t *nbr;
co_gs_foreach_aff_node(ienv->co, aff) {
struct obstack ob;
neighb_t *nbr;
- ir_node *center = aff->irn;
+
const
ir_node *center = aff->irn;
ir_node **nodes;
set *edges;
int i, o, n_nodes, n_edges;
ir_node **nodes;
set *edges;
int i, o, n_nodes, n_edges;
+ if (arch_irn_is(ienv->co->aenv, aff->irn, ignore))
+ continue;
+
obstack_init(&ob);
edges = new_set(compare_edge_t, 8);
/* get all affinity neighbours */
n_nodes = 0;
co_gs_foreach_neighb(aff, nbr) {
obstack_init(&ob);
edges = new_set(compare_edge_t, 8);
/* get all affinity neighbours */
n_nodes = 0;
co_gs_foreach_neighb(aff, nbr) {
- obstack_ptr_grow(&ob, nbr->irn);
- ++n_nodes;
+ if (!arch_irn_is(ienv->co->aenv, nbr->irn, ignore)) {
+ obstack_ptr_grow(&ob, nbr->irn);
+ ++n_nodes;
+ }
}
nodes = obstack_finish(&ob);
}
nodes = obstack_finish(&ob);
@@
-393,7
+398,7
@@
static void build_clique_star_cstr(ilp_env_t *ienv) {
}
}
-static void extend_path(ilp_env_t *ienv, pdeq *path, ir_node *irn) {
+static void extend_path(ilp_env_t *ienv, pdeq *path,
const
ir_node *irn) {
be_ifg_t *ifg = ienv->co->cenv->ifg;
int i, len;
ir_node **curr_path;
be_ifg_t *ifg = ienv->co->cenv->ifg;
int i, len;
ir_node **curr_path;
@@
-404,6
+409,9
@@
static void extend_path(ilp_env_t *ienv, pdeq *path, ir_node *irn) {
if (pdeq_contains(path, irn))
return;
if (pdeq_contains(path, irn))
return;
+ if (arch_irn_is(ienv->co->aenv, irn, ignore))
+ return;
+
/* insert the new irn */
pdeq_putr(path, irn);
/* insert the new irn */
pdeq_putr(path, irn);
@@
-492,16
+500,14
@@
static void ilp2_build(ilp_env_t *ienv) {
static void ilp2_apply(ilp_env_t *ienv) {
local_env_t *lenv = ienv->env;
static void ilp2_apply(ilp_env_t *ienv) {
local_env_t *lenv = ienv->env;
- double *sol;
- lpp_sol_state_t state;
- int i, count;
+ int i;
/* first check if there was sth. to optimize */
if (lenv->first_x_var >= 0) {
/* first check if there was sth. to optimize */
if (lenv->first_x_var >= 0) {
+ int count = lenv->last_x_var - lenv->first_x_var + 1;
+ double *sol = XMALLOCN(double, count);
+ lpp_sol_state_t state = lpp_get_solution(ienv->lp, sol, lenv->first_x_var, lenv->last_x_var);
- count = lenv->last_x_var - lenv->first_x_var + 1;
- sol = xmalloc(count * sizeof(sol[0]));
- state = lpp_get_solution(ienv->lp, sol, lenv->first_x_var, lenv->last_x_var);
if (state != lpp_optimal) {
printf("WARNING %s: Solution state is not 'optimal': %d\n", ienv->co->name, state);
assert(state >= lpp_feasible && "The solution should at least be feasible!");
if (state != lpp_optimal) {
printf("WARNING %s: Solution state is not 'optimal': %d\n", ienv->co->name, state);
assert(state >= lpp_feasible && "The solution should at least be feasible!");
@@
-523,6
+529,8
@@
static void ilp2_apply(ilp_env_t *ienv) {
assert(0 && "This should be a x-var");
}
}
assert(0 && "This should be a x-var");
}
}
+
+ xfree(sol);
}
#ifdef COPYOPT_STAT
}
#ifdef COPYOPT_STAT