X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=ir%2Fir%2Fircgcons.c;h=fda541d1fbdc32d22c6d5f4edc8fd07b75bb6ac1;hb=eda9d668d0e8c8246015b4c5e743316a6a835a23;hp=dc5dc87b2b23ad25703c63f77d4fe06a5b183aad;hpb=75bba3420ce91776ab8690b6cd3fc9ad1c5be965;p=libfirm diff --git a/ir/ir/ircgcons.c b/ir/ir/ircgcons.c index dc5dc87b2..fda541d1f 100644 --- a/ir/ir/ircgcons.c +++ b/ir/ir/ircgcons.c @@ -1,14 +1,29 @@ /* - * Project: libFIRM - * File name: ir/ir/ircgcons.c - * Purpose: Construction and removal of interprocedural representation - * (explicit interprocedural dependencies). - * Author: Hubert Schmid - * Modified by: - * Created: 09.06.2002 - * CVS-ID: $Id$ - * Copyright: (c) 2002-2003 Universität Karlsruhe - * Licence: This file protected by GPL - GNU GENERAL PUBLIC LICENSE. + * Copyright (C) 1995-2007 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 Construction and removal of interprocedural representation + * (explicit interprocedural dependencies). + * @author Hubert Schmid + * @date 09.06.2002 + * @version $Id$ */ #ifdef HAVE_CONFIG_H # include "config.h" @@ -150,12 +165,16 @@ static void link(ir_node * head, ir_node * node) { * ... -> Proj -> NULL. */ static void collect_phicallproj(void) { int i; + for (i = get_irp_n_irgs() - 1; i >= 0; --i) { ir_graph * irg = get_irp_irg(i); ir_node * start = get_irg_start(irg); ir_node * end = get_irg_end(irg); current_ir_graph = irg; assert(irg && start); + + set_using_irn_link(irg); + /* Die speziellen Parameter der Start-Operation extra verlinken, * auch wenn sie nicht im intraprozeduralen Graphen erreichbar * sind. */ @@ -163,6 +182,8 @@ static void collect_phicallproj(void) { link(start, get_irg_globals(irg)); /* walk */ irg_walk_graph(irg, firm_clear_link, (irg_walk_func *) collect_phicallproj_walker, &end); + + clear_using_irn_link(irg); } }