summaryrefslogtreecommitdiffhomepage
path: root/ir/be/bespillutil.h
diff options
context:
space:
mode:
authorMatthias Braun <matze@braunis.de>2014-07-08 16:48:37 +0200
committerMatthias Braun <matze@braunis.de>2014-07-08 17:34:58 +0200
commit589eed20a19ad792c4f3d0f301c29d5b6e4fd544 (patch)
treee7706a0c28869978b4f45757195bcaf00be96adf /ir/be/bespillutil.h
parent380a905992bfcdf617c1c63a576ead89436161e1 (diff)
bespillutil: cleanup, use C99
Diffstat (limited to 'ir/be/bespillutil.h')
-rw-r--r--ir/be/bespillutil.h18
1 files changed, 7 insertions, 11 deletions
diff --git a/ir/be/bespillutil.h b/ir/be/bespillutil.h
index ecd32a0..2cdfce5 100644
--- a/ir/be/bespillutil.h
+++ b/ir/be/bespillutil.h
@@ -13,6 +13,7 @@
#ifndef FIRM_BE_BESPILLUTIL_H
#define FIRM_BE_BESPILLUTIL_H
+#include <stdbool.h>
#include "firm_types.h"
#include "debug.h"
@@ -50,20 +51,15 @@ void be_add_spill(spill_env_t *senv, ir_node *to_spill, ir_node *after);
* @param senv The spill environment
* @param to_spill The node which is about to be spilled
* @param before The node before the reload should be added
- * @param reload_cls The register class the reloaded value will be put into
- * @param allow_remat Set to 1 if the node may be rematerialized instead of
- * reloaded
*/
-void be_add_reload(spill_env_t *senv, ir_node *to_spill, ir_node *before,
- const arch_register_class_t *reload_cls, int allow_remat);
+void be_add_reload(spill_env_t *senv, ir_node *to_spill, ir_node *before);
/**
* Analog to be_add_reload, but places the reload "on an edge" between 2 blocks
* @see be_add_reload
*/
void be_add_reload_on_edge(spill_env_t *senv, ir_node *to_spill, ir_node *bl,
- int pos, const arch_register_class_t *reload_cls,
- int allow_remat);
+ int pos);
/**
* The main function that places real spills/reloads (or rematerializes values)
@@ -112,8 +108,8 @@ double be_get_reload_costs_on_edge(spill_env_t *env, ir_node *to_spill,
typedef struct {
unsigned n_spills;
unsigned n_reloads;
- double spill_costs;
- double reload_costs;
+ double spill_costs;
+ double reload_costs;
} be_total_spill_costs_t;
/**
@@ -135,9 +131,9 @@ void be_get_total_spill_costs(ir_graph *irg, be_total_spill_costs_t *costs);
/**
* Check, if a node is rematerializable.
* @param env The spill env.
-
*/
-int be_is_rematerializable(spill_env_t *env, const ir_node *to_remat, const ir_node *before);
+bool be_is_rematerializable(spill_env_t *env, const ir_node *to_remat,
+ const ir_node *before);
/**
* Create a be_Spill node. This function is compatible to the