projects
/
libfirm
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
backend: remove unused omitleaffp option
[libfirm]
/
ir
/
be
/
bespill.c
diff --git
a/ir/be/bespill.c
b/ir/be/bespill.c
index
573aaa1
..
de71ea8
100644
(file)
--- a/
ir/be/bespill.c
+++ b/
ir/be/bespill.c
@@
-29,7
+29,7
@@
#include "irtools.h"
#include "debug.h"
#include "iredges_t.h"
#include "irtools.h"
#include "debug.h"
#include "iredges_t.h"
-#include "
adt/
raw_bitset.h"
+#include "raw_bitset.h"
#include "statev.h"
#include "irgwalk.h"
#include "statev.h"
#include "irgwalk.h"
@@
-50,7
+50,7
@@
DEBUG_ONLY(static firm_dbg_module_t *dbg = NULL;)
typedef struct be_pre_spill_env_t {
DEBUG_ONLY(static firm_dbg_module_t *dbg = NULL;)
typedef struct be_pre_spill_env_t {
-
be_irg_t *b
irg;
+
ir_graph *
irg;
const arch_register_class_t *cls;
} be_pre_spill_env_t;
const arch_register_class_t *cls;
} be_pre_spill_env_t;
@@
-58,8
+58,8
@@
static void prepare_constr_insn(be_pre_spill_env_t *env, ir_node *node)
{
const arch_register_class_t *cls = env->cls;
ir_node *block = get_nodes_block(node);
{
const arch_register_class_t *cls = env->cls;
ir_node *block = get_nodes_block(node);
- const
be_irg_t *birg = env->b
irg;
- be_lv_t *lv = b
irg->lv
;
+ const
ir_graph *irg = env->
irg;
+ be_lv_t *lv = b
e_get_irg_liveness(irg)
;
unsigned *tmp = NULL;
unsigned *def_constr = NULL;
int arity = get_irn_arity(node);
unsigned *tmp = NULL;
unsigned *def_constr = NULL;
int arity = get_irn_arity(node);
@@
-136,7
+136,7
@@
static void prepare_constr_insn(be_pre_spill_env_t *env, ir_node *node)
/* if the constraint is the same, no copy is necessary
* TODO generalise unequal but overlapping constraints */
/* if the constraint is the same, no copy is necessary
* TODO generalise unequal but overlapping constraints */
- if (rbitset_equal(req->limited, req2->limited, cls->n_regs))
+ if (rbitset
s
_equal(req->limited, req2->limited, cls->n_regs))
continue;
copy = be_new_Copy(cls, block, in);
continue;
copy = be_new_Copy(cls, block, in);
@@
-239,16
+239,15
@@
static void pre_spill_prepare_constr_walker(ir_node *block, void *data)
}
}
}
}
-void be_pre_spill_prepare_constr(
be_irg_t *b
irg,
+void be_pre_spill_prepare_constr(
ir_graph *
irg,
const arch_register_class_t *cls)
{
const arch_register_class_t *cls)
{
- ir_graph *irg = birg->irg;
be_pre_spill_env_t env;
memset(&env, 0, sizeof(env));
be_pre_spill_env_t env;
memset(&env, 0, sizeof(env));
- env.
birg = b
irg;
- env.cls
= cls;
+ env.
irg =
irg;
+ env.cls = cls;
- be_assure_liveness(
b
irg);
+ be_assure_liveness(irg);
irg_block_walk_graph(irg, pre_spill_prepare_constr_walker, NULL, &env);
}
irg_block_walk_graph(irg, pre_spill_prepare_constr_walker, NULL, &env);
}
@@
-274,13
+273,14
@@
void be_register_spiller(const char *name, be_spiller_t *spiller)
be_add_module_to_list(&spillers, name, spiller);
}
be_add_module_to_list(&spillers, name, spiller);
}
-void be_do_spill(
be_irg_t *b
irg, const arch_register_class_t *cls)
+void be_do_spill(
ir_graph *
irg, const arch_register_class_t *cls)
{
assert(selected_spiller != NULL);
{
assert(selected_spiller != NULL);
- selected_spiller->spill(
b
irg, cls);
+ selected_spiller->spill(irg, cls);
}
}
+BE_REGISTER_MODULE_CONSTRUCTOR(be_init_spilloptions);
void be_init_spilloptions(void)
{
lc_opt_entry_t *be_grp = lc_opt_get_grp(firm_opt_get_root(), "be");
void be_init_spilloptions(void)
{
lc_opt_entry_t *be_grp = lc_opt_get_grp(firm_opt_get_root(), "be");
@@
-292,5
+292,3
@@
void be_init_spilloptions(void)
FIRM_DBG_REGISTER(dbg, "firm.be.spillprepare");
}
FIRM_DBG_REGISTER(dbg, "firm.be.spillprepare");
}
-
-BE_REGISTER_MODULE_CONSTRUCTOR(be_init_spilloptions);