X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=ir%2Fbe%2Fbeirgmod.h;h=0777ec9426d761d55ba324f6e9a505ee5c4a15f8;hb=bba15007f36643c7c6f9281c8be00d8511bfb4f9;hp=07799d91209a801556c77a94ac24022acc72cb87;hpb=87965f5c94d561cb15233b80711123f6edc80b30;p=libfirm diff --git a/ir/be/beirgmod.h b/ir/be/beirgmod.h index 07799d912..0777ec942 100644 --- a/ir/be/beirgmod.h +++ b/ir/be/beirgmod.h @@ -1,78 +1,48 @@ +/* + * 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. + */ + /** * @file - * @brief + * @brief Backend IRG modification routines. + * @author Sebastian Hack, Daniel Grund, Matthias Braun, Christian Wuerdig + * @date 04.05.2005 + * @version $Id$ + * * This file contains the following IRG modifications for be routines: - * - SSA construction for a set of nodes * - insertion of Perm nodes * - empty block elimination * - a simple dead node elimination (set inputs of unreachable nodes to BAD) - * - * @author Sebastian Hack, Daniel Grund, Matthias Braun, Christian Wuerdig - * @date 04.05.2005 - * @version $Id$ - * Copyright: (c) Universitaet Karlsruhe - * Licence: This file protected by GPL - GNU GENERAL PUBLIC LICENSE. */ -#ifndef _FIRM_BE_IRGMOD_H_ -#define _FIRM_BE_IRGMOD_H_ +#ifndef FIRM_BE_BEIRGMOD_H +#define FIRM_BE_BEIRGMOD_H #include "firm_types.h" -#include "pset.h" -#include "irnodeset.h" - -#include "bedomfront.h" -#include "belive.h" - -/** - * Introduce several copies for one node. - * - * A copy in this context means, that you want to introduce several new - * abstract values (in Firm: nodes) for which you know, that they - * represent the same concrete value. This is the case if you - * - copy - * - spill and reload - * - re-materialize - * a value. - * - * This function reroutes all uses of the original value to the copies in the - * corresponding dominance subtrees and creates Phi functions where necessary. - * - * @note The visited flag and link fields are used. - * - * @param info Dominance frontier information. - * @param lv Liveness information to be updated. If NULL, no liveness - * updating is performed. - * @param value The value that has been duplicated. - * @param copies_len the length of the copies array - * @param copie an array holding all copies of the value - * @param phis An ARR_F where all newly created phis will be inserted, - * may be NULL - * @param ignore_uses A set of nodes probably using one of the nodes in - * @p nodes. Their usage will not adjusted. They remain - * untouched by this function. May be NULL. - */ -ir_node **be_ssa_construction(const be_dom_front_info_t *info, be_lv_t *lv, - ir_node *value, int copies_len, ir_node **copies, - const ir_nodeset_t *ignore_uses, int need_new_phis); - -/** @deprecated */ -void be_ssa_constr_set_ignore(const be_dom_front_info_t *info, be_lv_t *lv, - pset *nodes, pset *ignores); +#include "beirg.h" /** * Insert a Perm which permutes all (non-ignore) live values of a given register class * after a certain instruction. - * @param arch_env The architecture environment. * @param lv Liveness Information. - * @param cls The register class. - * @param dom_front Dominance frontier information. * @param irn The node to insert the Perm after. * @return The Perm or NULL if nothing was live before @p irn. */ -ir_node *insert_Perm_after(const arch_env_t *arch_env, - be_lv_t *lv, - const arch_register_class_t *cls, - be_dom_front_info_t *dom_front, +ir_node *insert_Perm_after(ir_graph *irg, const arch_register_class_t *cls, ir_node *irn); /** @@ -85,4 +55,10 @@ ir_node *insert_Perm_after(const arch_env_t *arch_env, */ int be_remove_empty_blocks(ir_graph *irg); -#endif /* _BEIRGMOD_H */ +/** + * Removes dead nodes from schedule + * @param irg the graph + */ +void be_remove_dead_nodes_from_schedule(ir_graph *irg); + +#endif