X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=ir%2Fir%2Fircgcons.h;h=2f627b1ec058ca1fd8ac031a9e9ff8535f4b6b88;hb=eda9d668d0e8c8246015b4c5e743316a6a835a23;hp=67b36be2a1896b935d4ded8477fc98849f26815f;hpb=d226f632d414aaae0b04d5a88557210b07e8fb50;p=libfirm diff --git a/ir/ir/ircgcons.h b/ir/ir/ircgcons.h index 67b36be2a..2f627b1ec 100644 --- a/ir/ir/ircgcons.h +++ b/ir/ir/ircgcons.h @@ -1,28 +1,67 @@ -/* ------------------------------------------------------------------- - * $Id$ - * ------------------------------------------------------------------- - * Auf- und Abbau der interprozeduralen Darstellung (Explizite - * interprozedurale Abhaengigkeiten). +/* + * Copyright (C) 1995-2007 University of Karlsruhe. All right reserved. * - * Erstellt: Hubert Schmid, 09.06.2002 - * ---------------------------------------------------------------- */ - + * 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 _CONSTRUCT_H_ -#define _CONSTRUCT_H_ +/** + * @file + * @brief Construction and removal of interprocedural representation + * (explicit interprocedural dependencies). + * @author Hubert Schmid + * @date 09.06.2002 + * @version $Id$ + */ +#ifndef FIRM_IR_IRCGCONS_H +#define FIRM_IR_IRCGCONS_H +#include "firm_types.h" -#include "entity.h" +/** The state of the interprocedural view. + * + * This value indicates the state of the interprocedural view. + */ +typedef enum { + ip_view_no, /**< The interprocedural view is not constructed. There are no + view specific nodes (EndReg, Filter, Break ...) in any graph. */ + ip_view_valid, /**< The interprocedural view is valid. */ + ip_view_invalid /**< The interprocedural view is invalid. Specific nodes are + all still in the representation, but the graph is no more complete. */ +} ip_view_state; +/** Return the current state of the interprocedural view. */ +ip_view_state get_irp_ip_view_state(void); +/** Set the state of the interprocedural view to invalid. */ +void set_irp_ip_view_invalid(void); -/* Aufbau der interprozeduralen Darstellung. In den Call-Operationen - * mussen alle potentialen callees gespeichert sein. */ -void cg_construct(int arr_len, entity *free_methods_arr[]); +/** Construction of the interprocedural view. + * + * Construction of the interprocedural view. A prior analysis must have set + * all possible callees in the corresponding fields of Call nodes. Sets + * ip_view_valid in irp. + * + * @arg free_methods_arr: An array of all free methods, i.e., methods that + * are external visible. These methods get an 'Unknown' + * caller. + * @arg arr_len The number of free methods. */ +void cg_construct(int arr_len, ir_entity *free_methods_arr[]); -/* Abbau der interprozeduralen (Sichten-) Darstellung, in eine - * gewoehnliche intraprozedurale Darstellung */ +/** Deconstruction of the interprocedural view. Reduces memory consumption of + the ir. Sets ip_view_no in irp. */ void cg_destruct(void); - -#endif /* _CONSTRUCT_H_ */ +#endif