X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=ir%2Fbe%2Fbespilloptions.h;h=6381eb18650498f9072a06834087d6d79ffdf844;hb=20aba3a7411997af46617a102d91cf05b2ebd8cb;hp=8fac4020232161ef10b632bf9c3d04cb41e0e4c2;hpb=863d31d7a5c8210432fef88b30fc3e8353131538;p=libfirm diff --git a/ir/be/bespilloptions.h b/ir/be/bespilloptions.h index 8fac40202..6381eb186 100644 --- a/ir/be/bespilloptions.h +++ b/ir/be/bespilloptions.h @@ -1,22 +1,66 @@ /* - * Author: Matthias Braun - * Date: 12.10.2006 - * Copyright: (c) Universitaet Karlsruhe - * Licence: This file protected by GPL - GNU GENERAL PUBLIC LICENSE. + * Copyright (C) 1995-2008 University of Karlsruhe. All right reserved. + * + * This file is part of libFirm. + * + * This file may be distributed and/or modified under the terms of the + * GNU General Public License version 2 as published by the Free Software + * Foundation and appearing in the file LICENSE.GPL included in the + * packaging of this file. + * + * Licensees holding valid libFirm Professional Edition licenses may use + * this file in accordance with the libFirm Commercial License. + * Agreement provided with the Software. + * + * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE + * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE. */ -#ifndef BESPILL_OPTIONS_H_ -#define BESPILL_OPTIONS_H_ -#include "bechordal.h" +/** + * @file + * @brief Option handling for spiller. + * @author Matthias Braun + * @date 12.10.2006 + * @version $Id$ + */ +#ifndef FIRM_BE_BESPILL_OPTIONS_H +#define FIRM_BE_BESPILL_OPTIONS_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