X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=ir%2Fir%2Fircgcons.h;h=2aa37d3891083c829fb83ad7ddd15ac578128be8;hb=7328b3d689604033392f5cada29e6418e8cc4827;hp=aa31da473086ca7586f992528666fa181f25d0b9;hpb=30e6310dd6d1ee1debb48660acd5fe4b0e266216;p=libfirm diff --git a/ir/ir/ircgcons.h b/ir/ir/ircgcons.h index aa31da473..2aa37d389 100644 --- a/ir/ir/ircgcons.h +++ b/ir/ir/ircgcons.h @@ -10,23 +10,43 @@ * Copyright: (c) 2002-2003 Universität Karlsruhe * Licence: This file protected by GPL - GNU GENERAL PUBLIC LICENSE. */ +#ifndef _FIRM_IR_ICGCONS_H_ +#define _FIRM_IR_ICGCONS_H_ +#include "firm_types.h" -#ifndef _CONSTRUCT_H_ -#define _CONSTRUCT_H_ - - -#include "entity.h" - - -/* Aufbau der interprozeduralen Darstellung. In den Call-Operationen - * muessen alle potentiellen callees gespeichert sein. */ +/** 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); + +/** 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, 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 /* _FIRM_IR_ICGCONS_H_ */