projects
/
libfirm
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Remove dumping the -am graph. It is exactly the same as the -opt graph.
[libfirm]
/
ir
/
be
/
bespill.c
diff --git
a/ir/be/bespill.c
b/ir/be/bespill.c
index
503db08
..
04c8860
100644
(file)
--- a/
ir/be/bespill.c
+++ b/
ir/be/bespill.c
@@
-24,9
+24,7
@@
* @date 29.09.2005
* @version $Id$
*/
* @date 29.09.2005
* @version $Id$
*/
-#ifdef HAVE_CONFIG_H
#include "config.h"
#include "config.h"
-#endif
#include <stdlib.h>
#include <stdbool.h>
#include <stdlib.h>
#include <stdbool.h>
@@
-199,7
+197,7
@@
void be_add_spill(spill_env_t *env, ir_node *to_spill, ir_node *after)
spill_t *s;
spill_t *last;
spill_t *s;
spill_t *last;
- assert(!
arch_irn_is(env->arch_env,
to_spill, dont_spill));
+ assert(!
arch_irn_is(
to_spill, dont_spill));
DB((dbg, LEVEL_1, "Add spill of %+F after %+F\n", to_spill, after));
/* Just for safety make sure that we do not insert the spill in front of a phi */
DB((dbg, LEVEL_1, "Add spill of %+F after %+F\n", to_spill, after));
/* Just for safety make sure that we do not insert the spill in front of a phi */
@@
-265,7
+263,7
@@
void be_add_reload2(spill_env_t *env, ir_node *to_spill, ir_node *before,
spill_info_t *info;
reloader_t *rel;
spill_info_t *info;
reloader_t *rel;
- assert(!
arch_irn_is(env->arch_env,
to_spill, dont_spill));
+ assert(!
arch_irn_is(
to_spill, dont_spill));
info = get_spillinfo(env, to_spill);
info = get_spillinfo(env, to_spill);
@@
-446,7
+444,7
@@
static void spill_irn(spill_env_t *env, spill_info_t *spillinfo)
after = skip_keeps_phis(after);
after = skip_keeps_phis(after);
- spill->spill
= be_spill(env->arch_env,
block, to_spill);
+ spill->spill
= be_spill(
block, to_spill);
sched_add_after(after, spill->spill);
DB((dbg, LEVEL_1, "\t%+F after %+F\n", spill->spill, after));
#ifdef FIRM_STATISTICS
sched_add_after(after, spill->spill);
DB((dbg, LEVEL_1, "\t%+F after %+F\n", spill->spill, after));
#ifdef FIRM_STATISTICS
@@
-572,7
+570,7
@@
static int is_value_available(spill_env_t *env, const ir_node *arg,
/*
* Ignore registers are always available
*/
/*
* Ignore registers are always available
*/
- if
(arch_irn_is(env->arch_env,
arg, ignore)) {
+ if
(arch_irn_is(
arg, ignore)) {
return 1;
}
return 1;
}
@@
-604,13
+602,11
@@
static int is_value_available(spill_env_t *env, const ir_node *arg,
/**
* Checks whether the node can principally be rematerialized
*/
/**
* Checks whether the node can principally be rematerialized
*/
-static int is_remat_node(
spill_env_t *env,
const ir_node *node)
+static int is_remat_node(const ir_node *node)
{
{
- const arch_env_t *arch_env = env->arch_env;
-
assert(!be_is_Spill(node));
assert(!be_is_Spill(node));
- if
(arch_irn_is(arch_env,
node, rematerializable))
+ if
(arch_irn_is(
node, rematerializable))
return 1;
return 0;
return 1;
return 0;
@@
-633,7
+629,7
@@
static int check_remat_conditions_costs(spill_env_t *env,
int argremats;
int costs = 0;
int argremats;
int costs = 0;
- if
(!is_remat_node(env,
spilled))
+ if
(!is_remat_node(
spilled))
return REMAT_COST_INFINITE;
if(be_is_Reload(spilled)) {
return REMAT_COST_INFINITE;
if(be_is_Reload(spilled)) {
@@
-644,7
+640,7
@@
static int check_remat_conditions_costs(spill_env_t *env,
if(parentcosts + costs >= env->reload_cost + env->spill_cost) {
return REMAT_COST_INFINITE;
}
if(parentcosts + costs >= env->reload_cost + env->spill_cost) {
return REMAT_COST_INFINITE;
}
- if
(arch_irn_is(env->arch_env,
spilled, modify_flags)) {
+ if
(arch_irn_is(
spilled, modify_flags)) {
return REMAT_COST_INFINITE;
}
return REMAT_COST_INFINITE;
}
@@
-803,7
+799,7
@@
static void determine_spill_costs(spill_env_t *env, spill_info_t *spillinfo)
if(spillinfo->spill_costs >= 0)
return;
if(spillinfo->spill_costs >= 0)
return;
- assert(!
arch_irn_is(env->arch_env,
to_spill, dont_spill));
+ assert(!
arch_irn_is(
to_spill, dont_spill));
assert(!be_is_Reload(to_spill));
/* some backends have virtual noreg/unknown nodes that are not scheduled
assert(!be_is_Reload(to_spill));
/* some backends have virtual noreg/unknown nodes that are not scheduled
@@
-839,7
+835,7
@@
static void determine_spill_costs(spill_env_t *env, spill_info_t *spillinfo)
spill_t *s;
double spills_execfreq;
spill_t *s;
double spills_execfreq;
- /* calculate sum of execut
a
ion frequencies of individual spills */
+ /* calculate sum of execution frequencies of individual spills */
spills_execfreq = 0;
s = spillinfo->spills;
for( ; s != NULL; s = s->next) {
spills_execfreq = 0;
s = spillinfo->spills;
for( ; s != NULL; s = s->next) {
@@
-908,7
+904,6
@@
void make_spill_locations_dominate_irn(spill_env_t *env, ir_node *irn)
void be_insert_spills_reloads(spill_env_t *env)
{
void be_insert_spills_reloads(spill_env_t *env)
{
- const arch_env_t *arch_env = env->arch_env;
const ir_exec_freq *exec_freq = env->exec_freq;
spill_info_t *si;
ir_nodeset_iterator_t iter;
const ir_exec_freq *exec_freq = env->exec_freq;
spill_info_t *si;
ir_nodeset_iterator_t iter;
@@
-1011,7
+1006,7
@@
void be_insert_spills_reloads(spill_env_t *env)
/* create a reload, use the first spill for now SSA
* reconstruction for memory comes below */
assert(si->spills != NULL);
/* create a reload, use the first spill for now SSA
* reconstruction for memory comes below */
assert(si->spills != NULL);
- copy = be_reload(
arch_env,
si->reload_cls, rld->reloader, mode,
+ copy = be_reload(si->reload_cls, rld->reloader, mode,
si->spills->spill);
#ifdef FIRM_STATISTICS
env->reload_count++;
si->spills->spill);
#ifdef FIRM_STATISTICS
env->reload_count++;