X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=ir%2Fbe%2Fbera.h;h=a5798d6720bf1931066259107190a20429857fa6;hb=cf8cb33a340cf13eabad65f2fa5b27cfb4c1db67;hp=cb64fa664c2d9173c0c7a40517cdc172e6c41ffd;hpb=5663da1d73944b6aae2bf6d38ef58e188ad76e1c;p=libfirm diff --git a/ir/be/bera.h b/ir/be/bera.h index cb64fa664..a5798d672 100644 --- a/ir/be/bera.h +++ b/ir/be/bera.h @@ -1,20 +1,45 @@ -/** - * Register allocation functions. - * @author Sebastian Hack - * @date 13.1.2005 +/* + * 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 _BERA_H -#define _BERA_H +/** + * @file + * @brief Base routines for register allocation. + * @author Sebastian Hack + * @date 13.01.2005 + */ +#ifndef FIRM_BE_BERA_H +#define FIRM_BE_BERA_H #include "irnode.h" +#include "belive.h" +#include "beirg.h" + +typedef struct be_ra_t { + void (*allocate)(ir_graph *irg); /**< allocate registers on a graph */ +} be_ra_t; + +void be_register_allocator(const char *name, be_ra_t *allocator); + /** - * Check, if two values interfere. - * @param a The first value. - * @param b The second value. - * @return 1, if @p a and @p b interfere, 0 if not. + * Do register allocation with currently selected register allocator */ -int values_interfere(const ir_node *a, const ir_node *b); +void be_allocate_registers(ir_graph *irg); -#endif /* _BERA_H */ +#endif