+/**
+ * An association between a node and a point in time.
+ */
+typedef struct loc_t {
+ ir_node *node;
+ unsigned time; /**< A use time (see beuses.h). */
+ bool spilled; /**< the value was already spilled on this path */
+} loc_t;
+
+typedef struct _workset_t {
+ int len; /**< current length */
+ loc_t vals[0]; /**< inlined array of the values/distances in this working set */
+} workset_t;
+
+static struct obstack obst;
+static const arch_register_class_t *cls;
+static const be_lv_t *lv;
+static be_loopana_t *loop_ana;
+static int n_regs;
+static workset_t *ws; /**< the main workset used while
+ processing a block. */
+static be_uses_t *uses; /**< env for the next-use magic */
+static ir_node *instr; /**< current instruction */
+static unsigned instr_nr; /**< current instruction number
+ (relative to block start) */
+static spill_env_t *senv; /**< see bespill.h */
+static ir_node **blocklist;
+
+static int move_spills = true;
+static int respectloopdepth = true;
+static int improve_known_preds = true;
+/* factor to weight the different costs of reloading/rematerializing a node
+ (see bespill.h be_get_reload_costs_no_weight) */
+static int remat_bonus = 10;
+
+static const lc_opt_table_entry_t options[] = {
+ LC_OPT_ENT_BOOL ("movespills", "try to move spills out of loops", &move_spills),
+ LC_OPT_ENT_BOOL ("respectloopdepth", "exprimental (outermost loop cutting)", &respectloopdepth),
+ LC_OPT_ENT_BOOL ("improveknownpreds", "experimental (known preds cutting)", &improve_known_preds),
+ LC_OPT_ENT_INT ("rematbonus", "give bonus to rematerialisable nodes", &remat_bonus),
+ LC_OPT_LAST