* @file
* @brief Entry point to the representation of procedure code.
* @author Martin Trapp, Christian Schaefer, Goetz Lindenmaier
- * @version $Id$
*/
#ifndef FIRM_IR_IRGRAPH_H
#define FIRM_IR_IRGRAPH_H
#include "begin.h"
/**
- * @page ir_graph The struct ir_graph
+ * @defgroup ir_graph Procedure Graph
*
* This struct contains all information about a procedure.
* It's allocated directly to memory.
* - visited A int used as flag to traverse the ir_graph.
*
* - block_visited A int used as a flag to traverse block nodes in the graph.
+ *
+ * @{
*/
/** Global variable holding the current ir graph.
*/
FIRM_API void free_ir_graph(ir_graph *irg);
-/* --- access routines for all ir_graph attributes --- */
-
/**
* Checks whether a pointer points to a ir graph.
*
FIRM_API ir_node *get_idx_irn(const ir_graph *irg, unsigned idx);
-/******************************************************************************/
-/* States of an ir_graph. */
-/******************************************************************************/
-
-/*
- information associated with the graph. Optimizations invalidate these
- states. */
-
/** The states of an ir graph.
*
* state phase values: phase_building, phase_high, phase_low, phase_backend.
The enum op_pin_state is defined in irop.h. */
FIRM_API op_pin_state get_irg_pinned(const ir_graph *irg);
-/** state: outs_state
- * Outs are the back edges or def-use edges of ir nodes.
- * Values: outs_none, outs_consistent, outs_inconsistent */
-typedef enum {
- outs_none, /**< Outs are not computed, no memory is allocated. */
- outs_consistent, /**< Outs are computed and correct. */
- outs_inconsistent /**< Outs have been computed, memory is still allocated,
- but the graph has been changed since. */
-} irg_outs_state;
-
/** state: callee_information_state
* Call nodes contain a list of possible callees. This list must be
* computed by an analysis.
* if 2 parties try to use the flags.
*/
typedef enum ir_resources_t {
- /* local (irg) resources */
IR_RESOURCE_NONE = 0,
IR_RESOURCE_BLOCK_VISITED = 1 << 0, /**< Block visited flags are used. */
IR_RESOURCE_BLOCK_MARK = 1 << 1, /**< Block mark bits are used. */
IR_GRAPH_STATE_CONSISTENT_ENTITY_USAGE = 1U << 14,
/** extended basic blocks have been formed and are up to date */
IR_GRAPH_STATE_VALID_EXTENDED_BLOCKS = 1U << 15,
+ /** graph contains as many returns as possible */
+ IR_GRAPH_STATE_MANY_RETURNS = 1U << 16,
} ir_graph_state_t;
ENUM_BITSET(ir_graph_state_t)
*/
FIRM_API size_t register_additional_graph_data(size_t size);
+/** @} */
+
#include "end.h"
#endif