projects
/
libfirm
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Example for optimizing non-strict programs using combo.
[libfirm]
/
ir
/
be
/
beifg.c
diff --git
a/ir/be/beifg.c
b/ir/be/beifg.c
index
0dcd3dd
..
666954f
100644
(file)
--- a/
ir/be/beifg.c
+++ b/
ir/be/beifg.c
@@
-24,9
+24,7
@@
* @date 18.11.2005
* @version $Id$
*/
* @date 18.11.2005
* @version $Id$
*/
-#ifdef HAVE_CONFIG_H
#include "config.h"
#include "config.h"
-#endif
#include <stdlib.h>
#include <stdlib.h>
@@
-59,7
+57,6
@@
typedef struct _coloring_t coloring_t;
struct _coloring_t {
ir_phase ph;
struct _coloring_t {
ir_phase ph;
- const arch_env_t *arch_env;
ir_graph *irg;
};
ir_graph *irg;
};
@@
-86,10
+83,9
@@
static void *regs_irn_data_init(ir_phase *ph, const ir_node *irn, void *data)
return (void*)arch_get_irn_register(irn);
}
return (void*)arch_get_irn_register(irn);
}
-
coloring_t *coloring_init(coloring_t *c, ir_graph *irg, const arch_env_t *aenv
)
+
static coloring_t *coloring_init(coloring_t *c, ir_graph *irg
)
{
phase_init(&c->ph, "regs_map", irg, PHASE_DEFAULT_GROWTH, regs_irn_data_init, NULL);
{
phase_init(&c->ph, "regs_map", irg, PHASE_DEFAULT_GROWTH, regs_irn_data_init, NULL);
- c->arch_env = aenv;
c->irg = irg;
return c;
}
c->irg = irg;
return c;
}
@@
-108,12
+104,12
@@
static void restore_irn_color(ir_node *irn, void *c)
arch_set_irn_register(irn, reg);
}
arch_set_irn_register(irn, reg);
}
-void coloring_save(coloring_t *c)
+
static
void coloring_save(coloring_t *c)
{
irg_walk_graph(c->irg, NULL, get_irn_color, c);
}
{
irg_walk_graph(c->irg, NULL, get_irn_color, c);
}
-void coloring_restore(coloring_t *c)
+
static
void coloring_restore(coloring_t *c)
{
irg_walk_graph(c->irg, NULL, restore_irn_color, c);
}
{
irg_walk_graph(c->irg, NULL, restore_irn_color, c);
}
@@
-400,7
+396,7
@@
void be_ifg_check_performance(be_chordal_env_t *chordal_env)
if (get_irg_estimated_node_cnt(chordal_env->irg) >= BE_CH_PERFORMANCETEST_MIN_NODES)
{
if (get_irg_estimated_node_cnt(chordal_env->irg) >= BE_CH_PERFORMANCETEST_MIN_NODES)
{
- coloring_init(&coloring, chordal_env->irg
, chordal_env->birg->main_env->arch_env
);
+ coloring_init(&coloring, chordal_env->irg);
coloring_save(&coloring);
ir_timer_reset(timer);
coloring_save(&coloring);
ir_timer_reset(timer);