/*
- * Copyright (C) 1995-2007 University of Karlsruhe. All right reserved.
+ * Copyright (C) 1995-2008 University of Karlsruhe. All right reserved.
*
* This file is part of libFirm.
*
* PURPOSE.
*/
-/*
- * Author: Matthias Braun
- * Date: 12.10.2006
- * Copyright: (c) Universitaet Karlsruhe
- * Licence: This file protected by GPL - GNU GENERAL PUBLIC LICENSE.
+/**
+ * @file
+ * @brief Option handling for spiller.
+ * @author Matthias Braun
+ * @date 12.10.2006
+ * @version $Id$
*/
-#ifndef BESPILL_OPTIONS_H_
-#define BESPILL_OPTIONS_H_
+#ifndef FIRM_BE_BESPILL_OPTIONS_H
+#define FIRM_BE_BESPILL_OPTIONS_H
-#include "bechordal.h"
+#include "bearch.h"
+#include "beirg.h"
extern int be_coalesce_spill_slots;
extern int be_do_remats;
+/**
+ * An entry in the list of spill-algorithms.
+ */
typedef struct be_spiller_t {
- void (*spill) (be_irg_t *birg, const arch_register_class_t* cls);
+ /**
+ * The spill function.
+ *
+ * @param birg the graph to spill on
+ * @param cls the register class to spill
+ */
+ void (*spill)(be_irg_t *birg, const arch_register_class_t *cls);
} be_spiller_t;
+
+/**
+ * Register a new spill algorithm.
+ *
+ * @param name the name of the spill algorithm,
+ * used to select it
+ * @param spiller a spill entry
+ */
void be_register_spiller(const char *name, be_spiller_t *spiller);
-void be_do_spill(be_irg_t *birg, const arch_register_class_t* cls);
+/**
+ * Execute the selected spill algorithm
+ *
+ * @param birg the graph to spill on
+ * @param cls the register class to spill
+ */
+void be_do_spill(be_irg_t *birg, const arch_register_class_t *cls);
#endif