projects
/
libfirm
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
made code C89 compliant
[libfirm]
/
ir
/
be
/
beraextern.c
diff --git
a/ir/be/beraextern.c
b/ir/be/beraextern.c
index
cbd55d7
..
9acc040
100644
(file)
--- a/
ir/be/beraextern.c
+++ b/
ir/be/beraextern.c
@@
-58,10
+58,11
@@
alloc ::= node-nr reg-nr .
#include "config.h"
#endif
#include "config.h"
#endif
-#ifdef WIN32
-#include <malloc.h>
-#else
-#include <alloca.h>
+#ifdef HAVE_MALLOC_H
+ #include <malloc.h>
+#endif
+#ifdef HAVE_ALLOCA_H
+ #include <alloca.h>
#endif
#include <stdio.h>
#endif
#include <stdio.h>
@@
-345,7
+346,7
@@
static void ssa_destr_simple_walker(ir_node *blk, void *env) {
if (!is_Phi(phi))
break;
if (!is_Phi(phi))
break;
- if (arch_irn_is
_ignore(raenv->aenv, phi
))
+ if (arch_irn_is
(raenv->aenv, phi, ignore
))
continue;
raenv->cls = arch_get_irn_reg_class(raenv->aenv, phi, -1);
continue;
raenv->cls = arch_get_irn_reg_class(raenv->aenv, phi, -1);
@@
-497,7
+498,7
@@
static void extract_vars_of_cls(be_raext_env_t *raenv) {
int count = 0;
var_info_t *vi;
int count = 0;
var_info_t *vi;
- raenv->cls_vars = malloc(set_count(raenv->vars) * sizeof(*raenv->cls_vars));
+ raenv->cls_vars =
x
malloc(set_count(raenv->vars) * sizeof(*raenv->cls_vars));
assert(raenv->cls_vars);
set_foreach(raenv->vars, vi)
assert(raenv->cls_vars);
set_foreach(raenv->vars, vi)
@@
-536,7
+537,7
@@
static INLINE int get_spill_costs(be_raext_env_t *raenv, var_info_t *vi) {
int c_spills=0, c_reloads=0;
pset_foreach(vi->values, irn) {
int c_spills=0, c_reloads=0;
pset_foreach(vi->values, irn) {
- if (arch_irn_is
_ignore(raenv->aenv, irn
) || be_is_Reload(irn)) {
+ if (arch_irn_is
(raenv->aenv, irn, ignore
) || be_is_Reload(irn)) {
pset_break(vi->values);
return UNSPILLABLE;
}
pset_break(vi->values);
return UNSPILLABLE;
}
@@
-619,7
+620,7
@@
static void dump_affinities_walker(ir_node *irn, void *env) {
int pos, max;
var_info_t *vi1, *vi2;
int pos, max;
var_info_t *vi1, *vi2;
- if (arch_get_irn_reg_class(raenv->aenv, irn, -1) != raenv->cls || arch_irn_is
_ignore(raenv->aenv, irn
))
+ if (arch_get_irn_reg_class(raenv->aenv, irn, -1) != raenv->cls || arch_irn_is
(raenv->aenv, irn, ignore
))
return;
vi1 = get_var_info(irn);
return;
vi1 = get_var_info(irn);
@@
-628,7
+629,7
@@
static void dump_affinities_walker(ir_node *irn, void *env) {
if (arch_irn_classify(raenv->aenv, irn) == arch_irn_class_copy) {
ir_node *other = get_irn_n(irn, be_pos_Copy_orig);
if (arch_irn_classify(raenv->aenv, irn) == arch_irn_class_copy) {
ir_node *other = get_irn_n(irn, be_pos_Copy_orig);
- if (! arch_irn_is
_ignore(raenv->aenv, other
)) {
+ if (! arch_irn_is
(raenv->aenv, other, ignore
)) {
vi2 = get_var_info(other);
fprintf(raenv->f, "(%d, %d, %d)\n", vi1->var_nr, vi2->var_nr, get_affinity_weight(irn));
vi2 = get_var_info(other);
fprintf(raenv->f, "(%d, %d, %d)\n", vi1->var_nr, vi2->var_nr, get_affinity_weight(irn));
@@
-640,7
+641,7
@@
static void dump_affinities_walker(ir_node *irn, void *env) {
for (pos = 0, max = get_irn_arity(irn); pos<max; ++pos) {
arch_get_register_req(raenv->aenv, &req, irn, pos);
for (pos = 0, max = get_irn_arity(irn); pos<max; ++pos) {
arch_get_register_req(raenv->aenv, &req, irn, pos);
- if (arch_register_req_is(&req, should_be_same) && arch_irn_is
_ignore(raenv->aenv, req.other_sam
e)) {
+ if (arch_register_req_is(&req, should_be_same) && arch_irn_is
(raenv->aenv, req.other_same, ignor
e)) {
vi2 = get_var_info(req.other_same);
fprintf(raenv->f, "(%d, %d, %d)\n", vi1->var_nr, vi2->var_nr, get_affinity_weight(irn));
vi2 = get_var_info(req.other_same);
fprintf(raenv->f, "(%d, %d, %d)\n", vi1->var_nr, vi2->var_nr, get_affinity_weight(irn));
@@
-938,7
+939,7
@@
static void be_ra_extern_main(const be_irg_t *bi) {
raenv.aenv = env->arch_env;
raenv.dom_info = be_compute_dominance_frontiers(irg);
raenv.vars = new_set(compare_var_infos, 64);
raenv.aenv = env->arch_env;
raenv.dom_info = be_compute_dominance_frontiers(irg);
raenv.vars = new_set(compare_var_infos, 64);
-
raenv.dbg = firm_dbg_register(
"ir.be.raextern");
+
FIRM_DBG_REGISTER(raenv.dbg,
"ir.be.raextern");
firm_dbg_set_mask(raenv.dbg, DBG_LEVEL);
/* Insert copies for constraints */
firm_dbg_set_mask(raenv.dbg, DBG_LEVEL);
/* Insert copies for constraints */