Commit 5c6f5d46 authored by Matthias Braun's avatar Matthias Braun
Browse files

cleanup comments in public headers

parent 3ba956b1
......@@ -205,6 +205,7 @@ FIRM_API void pset_break(pset *pset);
* Iterates oven an pset.
*
* @param pset the pset
* @param type type of iterator variable
* @param entry the iterator
*/
#define foreach_pset(pset, type, entry) for (entry = (type)pset_first(pset); entry; entry = (type)pset_next(pset))
......
......@@ -187,6 +187,7 @@ FIRM_API void set_break(set *set);
* Iterates over an set.
*
* @param set the set
* @param type type of iterator variable
* @param entry the iterator
*/
#define foreach_set(set, type, entry) for (entry = (type) set_first(set); entry; entry = (type) set_next(set))
......
......@@ -37,21 +37,6 @@
#include "firm_types.h"
#include "begin.h"
/* Methoden sind "frei", wenn ihr Funktionszeiger (potentiell)
* "explizit" bekannt ist, d.h.:
*
* - die Methode ist von aussen sichtbar (external_visible).
*
* - ihr Funktionszeiger ist "frei", d.h. der Funktionszeiger wurde
* nicht ausschliesslich an den entsprechenden Eingang eines
* Call-Knotens weitergegeben, sondern z.B. in den Speicher
* geschrieben, als Parameter uebergeben, ...
*
* Die main-Methode ist immer in der Menge enthalten.
*
* Die Links an den "ir_node"s werden geloescht.
*/
/** Analyses a rough estimation of the possible call graph.
*
* Determines for each Call node the set of possibly called methods.
......@@ -72,23 +57,26 @@
* and Craig Chambers.
*
* Performs some optimizations possible by the analysed information:
* - Replace SymConst-name nodes by SymConst-entity nodes if possible.
* - Replace (Sel-method(Alloc)) by SymConst-entity.
* - Replaces Sel-method by SymConst-entity if the method is never overwritten.
* - Replace SymConst-name nodes by SymConst-entity nodes if possible.
* - Replace (Sel-method(Alloc)) by SymConst-entity.
* - Replaces Sel-method by SymConst-entity if the method is never overwritten.
*/
FIRM_API size_t cgana(ir_entity ***free_methods);
/** Free callee information.
/**
* Free callee information.
*
* Sets callee_info_state of the graph passed to none. Sets callee field
* in all call nodes to NULL. Else it happens that the field contains
* pointers to other than firm arrays.
* Sets callee_info_state of the graph passed to none. Sets callee field
* in all call nodes to NULL. Else it happens that the field contains
* pointers to other than firm arrays.
*/
FIRM_API void free_callee_info(ir_graph *irg);
FIRM_API void free_irp_callee_info(void);
/* Optimize the address expressions passed to call nodes.
* Performs only the optimizations done by cgana. */
/**
* Optimize the address expressions passed to call nodes.
* Performs only the optimizations done by cgana.
*/
FIRM_API void opt_call_addrs(void);
#include "end.h"
......
......@@ -37,7 +37,7 @@
#include "firm_types.h"
#include "begin.h"
/* A proj from a Cond that goes to an exception handler. */
/** A proj from a Cond that goes to an exception handler. */
FIRM_API int is_fragile_Proj(ir_node *n);
/** Returns the number of times the block/region is executed according to
......@@ -74,21 +74,27 @@ FIRM_API void free_execution_frequency(void);
* The exec_freq_state in irp is consistent, if the state of all graphs is consistent.
* It is none, if the state of all graphs is none. Else it is inconsistent. */
typedef enum {
exec_freq_none, /**< Execution frequencies are not computed, no memory is
allocated, access fails. */
exec_freq_consistent, /**< Execution frequency information is computed and correct. */
exec_freq_inconsistent /**< Execution frequency is computed but the graph has been
changed since. */
exec_freq_none, /**< Execution frequencies are not computed, no
memory is allocaaccess fails. */
exec_freq_consistent, /**< Execution frequency information is computed and
correct. */
exec_freq_inconsistent /**< Execution frequency is computed but the graph
has been changed since. */
} exec_freq_state;
FIRM_API exec_freq_state get_irg_exec_freq_state(ir_graph *irg);
FIRM_API void set_irg_exec_freq_state(ir_graph *irg,
exec_freq_state s);
/* Sets irg and irp exec freq state to inconsistent if it is set to consistent. */
/**
* Sets irg and irp exec freq state to inconsistent if it is set to consistent.
*/
FIRM_API void set_irg_exec_freq_state_inconsistent(ir_graph *irg);
FIRM_API exec_freq_state get_irp_exec_freq_state(void);
/* Sets irp and all irg exec freq states to inconsistent if it is set to consistent. */
/**
* Sets irp and all irg exec freq states to inconsistent if it is set to
* consistent.
*/
FIRM_API void set_irp_exec_freq_state_inconsistent(void);
#include "end.h"
......
......@@ -39,7 +39,7 @@
#include "begin.h"
/* The number of array elements we assume if not both bounds are given. */
/** The number of array elements we assume if not both bounds are given. */
#define DEFAULT_N_ARRAY_ELEMENTS 1
FIRM_API int get_irn_loop_call_depth(ir_node *n);
......@@ -51,9 +51,11 @@ FIRM_API int get_irn_loop_call_depth(ir_node *n);
FIRM_API int get_irn_cfloop_depth(ir_node *n);
FIRM_API int get_irn_recursion_depth(ir_node *n);
/** Get the weighted interprocedural loop depth of the node.
The depth is estimated by a heuristic. The heuristic considers
loop and recursion depth. */
/**
* Get the weighted interprocedural loop depth of the node.
* The depth is estimated by a heuristic. The heuristic considers
* loop and recursion depth.
*/
FIRM_API int get_weighted_loop_depth(ir_node *n);
/** Heuristic merging recursion and loop depth. */
......@@ -78,11 +80,13 @@ FIRM_API double get_type_estimated_n_casts(ir_type *clss);
FIRM_API double get_class_estimated_n_upcasts(ir_type *clss);
FIRM_API double get_class_estimated_n_downcasts(ir_type *clss);
/** Returns the number of accesses to the dispatch table.
/**
* Returns the number of accesses to the dispatch table.
*
* This includes the initialization of the pointer field, and accesses
* to virtual fields (as instance marker in Java). Certainly this
* includes virtual method calls. */
* This includes the initialization of the pointer field, and accesses
* to virtual fields (as instance marker in Java). Certainly this
* includes virtual method calls.
*/
FIRM_API double get_class_estimated_n_dyncalls(ir_type *clss);
/** Returns the number of writes to the dispatch pointer.
* This is the same as the number of allocations. */
......@@ -93,13 +97,12 @@ FIRM_API double get_class_estimated_dispatch_reads (ir_type *clss);
FIRM_API double get_entity_estimated_n_loads(ir_entity *ent);
FIRM_API double get_entity_estimated_n_stores(ir_entity *ent);
FIRM_API double get_entity_estimated_n_calls(ir_entity *ent);
/** The number of accesses to dynamically called methods and
* to other static fields that overwrite/are overwritten. */
FIRM_API double get_entity_estimated_n_dyncalls(ir_entity *ent);
/* ------------------------------------------------------------------------- */
/* Accumulate information in the type hierarchy. */
/* ------------------------------------------------------------------------- */
/**
* The number of accesses to dynamically called methods and
* to other static fields that overwrite/are overwritten.
*/
FIRM_API double get_entity_estimated_n_dyncalls(ir_entity *ent);
typedef enum {
temperature_none,
......
......@@ -47,28 +47,31 @@ FIRM_API int get_region_n_ins(void *region);
FIRM_API void *get_region_in(void *region, int pos);
FIRM_API void add_region_in(void *region, void *in);
/** The number of out edges of a region.
/**
* The number of out edges of a region.
*
* This number is useful for evaluation of execution frequencies.
* This number is useful for evaluation of execution frequencies.
*/
FIRM_API int get_region_n_outs(void *region);
/** The number of exception out edges of a region.
/**
* The number of exception out edges of a region.
*
* This number is useful for evaluation of execution frequencies.
* This number is useful for evaluation of execution frequencies.
*/
FIRM_API int get_region_n_exc_outs(void *region);
/** The control flow operation corresponding to the loop-region in at
* position pos.
/**
* The control flow operation corresponding to the loop-region in at
* position pos.
*/
FIRM_API void *get_loop_cfop(void *region, int pos);
/** The algorithm to construct the interval graph.
/**
* The algorithm to construct the interval graph.
*
* Constructs the cf loop tree and leaves a valid version of it.
* Constructs the cf loop tree and leaves a valid version of it.
*/
FIRM_API void construct_intervals(ir_graph *irg);
......
......@@ -105,7 +105,6 @@ FIRM_API int get_edge_src_pos(const ir_edge_t *edge);
/**
* Get the edge object of an outgoing edge at a node.
* @param irg The graph, the node is in.
* @param irn The node at which the edge originates.
* @param pos The position of the edge.
* @param kind The kind of the edge.
......
......@@ -207,10 +207,12 @@ typedef enum firm_verification_t {
FIRM_VERIFICATION_ERROR_ONLY = 3 /**< do node verification, but NEVER do assert nor report */
} firm_verification_t;
/** Select verification of IR nodes and types.
/**
* Select verification of IR nodes and types.
*
* Per default the verification is in mode NODE_VERIFICATION_ASSERT.
* Turn the verification off during development to check partial implementations.
* Per default the verification is in mode NODE_VERIFICATION_ASSERT.
* Turn the verification off during development to check partial
* implementations.
*/
FIRM_API void do_node_verification(firm_verification_t mode);
......
......@@ -168,8 +168,6 @@ FIRM_API ir_graph *new_ir_graph(ir_entity *ent, int n_loc);
*/
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.
*
......@@ -259,14 +257,6 @@ FIRM_API size_t get_irg_idx(const ir_graph *irg);
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.
......@@ -388,7 +378,6 @@ FIRM_API void set_irg_block_visited(ir_graph *irg, ir_visited_t i);
* 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. */
......
......@@ -37,17 +37,6 @@
#include "firm_common.h"
#include "begin.h"
/* ------------------------------------------------------------------- */
/*
* Backedge information.
*
* Predecessors of Block and Phi nodes can have backedges.
* If loop information is computed, this information is computed, too.
* The backedge information can only be used if the graph is not in
* phase phase_building.
*/
/* ------------------------------------------------------------------- */
/** Returns non-zero if the predecessor pos is a backedge. */
FIRM_API int is_backedge(const ir_node *n, int pos);
/** Marks edge pos as a backedge. */
......@@ -72,7 +61,7 @@ FIRM_API int is_ir_loop(const void *thing);
/** Set the outermost loop in ir graph as basic access to loop tree. */
FIRM_API void set_irg_loop(ir_graph *irg, ir_loop *l);
/* Returns the root loop info (if exists) for an irg. */
/** Returns the root loop info (if exists) for an irg. */
FIRM_API ir_loop *get_irg_loop(const ir_graph *irg);
/** Returns the loop n is contained in. NULL if node is in no loop. */
......@@ -83,7 +72,6 @@ FIRM_API ir_loop *get_loop_outer_loop(const ir_loop *loop);
/** Returns nesting depth of this loop */
FIRM_API unsigned get_loop_depth(const ir_loop *loop);
/* Sons are the inner loops contained in this loop. */
/** Returns the number of inner loops */
FIRM_API size_t get_loop_n_sons(const ir_loop *loop);
......@@ -120,10 +108,6 @@ FIRM_API long get_loop_loop_nr(const ir_loop *loop);
FIRM_API void set_loop_link(ir_loop *loop, void *link);
FIRM_API void *get_loop_link(const ir_loop *loop);
/* ------------------------------------------------------------------- */
/* Constructing and destructing the loop/backedge information. */
/* ------------------------------------------------------------------- */
/** Constructs backedge information and loop tree for a graph.
*
* The algorithm views the program representation as a pure graph.
......@@ -178,11 +162,6 @@ FIRM_API void assure_loopinfo(ir_graph *irg);
FIRM_API void free_loop_information(ir_graph *irg);
FIRM_API void free_all_loop_information (void);
/* ------------------------------------------------------------------- */
/* Simple analyses based on the loop information */
/* ------------------------------------------------------------------- */
/** Test whether a value is loop invariant.
*
* @param n The node to be tested.
......
......@@ -38,8 +38,6 @@
#include "firm_types.h"
#include "begin.h"
/* ********** Predefined modes ********** */
/** Helper values for ir_mode_sort. */
enum ir_mode_sort_helper {
irmsh_is_num = 0x10, /**< mode represents a number */
......@@ -54,7 +52,6 @@ enum ir_mode_sort_helper {
* the mode_is
*/
typedef enum ir_mode_sort {
/* Predefined sorts of modes */
irms_auxiliary = 0, /**< Only for Firm use. Not extensible. (irm_T) */
irms_control_flow = 1, /**< Marks all control flow modes. Not extensible. (irm_BB, irm_X) */
irms_memory = 2 | irmsh_is_dataM, /**< Marks the memory mode. Not extensible. (irm_M) */
......@@ -63,7 +60,6 @@ typedef enum ir_mode_sort {
Storing to memory impossible, convert first. (irm_b) */
irms_internal_boolean = 3 | irmsh_is_datab,
/* user-extensible sorts of modes */
/** A mode to represent entities.
Restricted int computations can be performed */
irms_reference = 4 | irmsh_is_data | irmsh_is_datab | irmsh_is_dataM,
......@@ -75,31 +71,37 @@ typedef enum ir_mode_sort {
irms_float_number = 6 | irmsh_is_data | irmsh_is_datab | irmsh_is_dataM | irmsh_is_num,
} ir_mode_sort;
/** These values represent the different arithmetic operations possible with a mode.
Further arithmetics can be defined, e.g., for @@@ modes.
/**
* These values represent the different arithmetic operations possible with a
* mode.
*/
typedef enum ir_mode_arithmetic {
irma_uninitialized = 0,
irma_none = 1, /**< For modes for which no representation is specified.
These are modes of sort auxiliary, internal_boolean and character. */
irma_twos_complement = 2, /**< Values of the mode are represented as two's complement.
Only legal for modes of sort int_number and reference. */
irma_ones_complement, /**< Values of the mode are represented as one's complement.
Only legal for modes of sort int_number and reference. */
irma_int_BCD, /**< Values of the mode are represented as binary coded decimals.
Only legal for modes of sort int_number and reference. */
irma_ieee754 = 256, /**< Values of the mode are represented according to ieee754
floating point standard. Only legal for modes of sort float_number. */
irma_float_BCD, /**< Values of the mode are represented as binary coded decimals
according to @@@ which standards??? Only legal for modes of
sort float_number. */
irma_none = 1, /**< For modes for which no representation is
specified. These are modes of sort auxiliary,
internal_boolean and character. */
irma_twos_complement = 2, /**< Values of the mode are represented as two's
complement. Only legal for modes of sort
int_number and reference. */
irma_ones_complement, /**< Values of the mode are represented as one's
complement. Only legal for modes of sort
int_number and reference. */
irma_int_BCD, /**< Values of the mode are represented as binary
coded decimals. Only legal for modes of sort
int_number and reference. */
irma_ieee754 = 256, /**< Values of the mode are represented according
to ieee754 floating point standard. Only
legal for modes of sort float_number. */
irma_float_BCD, /**< Values of the mode are represented as binary
coded decimals according to @@@ which
standards??? Only legal for modes of sort
float_number. */
irma_max
} ir_mode_arithmetic;
/** Returns the name of the arithmetic type. */
FIRM_API const char *get_mode_arithmetic_name(ir_mode_arithmetic ari);
/* ********** Constructor for user defined modes **************** */
/**
* Creates a new mode.
*
......@@ -122,7 +124,8 @@ FIRM_API const char *get_mode_arithmetic_name(ir_mode_arithmetic ari);
*
* @note
* It is allowed to construct the default modes. So, a call
* new_ir_mode("Is", irms_int_number, 32, 1, irma_twos_complement, 32) will return mode_Is.
* new_ir_mode("Is", irms_int_number, 32, 1, irma_twos_complement, 32) will
* return mode_Is.
*/
FIRM_API ir_mode *new_ir_mode(const char *name, ir_mode_sort sort, int bit_size,
int sign, ir_mode_arithmetic arithmetic,
......@@ -163,8 +166,6 @@ FIRM_API ir_mode *new_ir_vector_mode(const char *name, ir_mode_sort sort,
*/
FIRM_API int is_mode(const void *thing);
/* ********** Access methods to read mode information *********** */
/** Returns the ident* of the mode */
FIRM_API ident *get_mode_ident(const ir_mode *mode);
......@@ -279,7 +280,6 @@ FIRM_API ir_tarval *get_mode_NAN(ir_mode *mode);
FIRM_API ir_mode *mode_M; /**< memory */
/* -- A set of predefined, numerical modes */
FIRM_API ir_mode *mode_F; /**< float (32) */
FIRM_API ir_mode *mode_D; /**< double (64) */
FIRM_API ir_mode *mode_E; /**< long double (80/128/...) */
......@@ -302,7 +302,6 @@ FIRM_API ir_mode *mode_P_data; /**< A pointer mode that is set by the client of
represents the pointer size of the target machine data addresses. Is initialized
to mode_P. */
/* -- Auxiliary modes necessary for the Firm representation -- */
FIRM_API ir_mode *mode_b; /**< internal boolean */
FIRM_API ir_mode *mode_X; /**< execution */
......@@ -312,7 +311,6 @@ FIRM_API ir_mode *mode_T; /**< tuple (none) */
FIRM_API ir_mode *mode_ANY;/**< undefined mode */
FIRM_API ir_mode *mode_BAD;/**< bad mode */
/*@{*/
FIRM_API ir_mode *get_modeF(void);
FIRM_API ir_mode *get_modeD(void);
FIRM_API ir_mode *get_modeE(void);
......@@ -353,8 +351,7 @@ FIRM_API void set_modeP_code(ir_mode *p);
*/
FIRM_API void set_modeP_data(ir_mode *p);
/*@{*/
/**
/*@{
Functions to check, whether a mode is signed, float, int, character,
reference, num, data, datab or dataM.
......@@ -384,7 +381,7 @@ FIRM_API void set_modeP_data(ir_mode *p);
Vector "int" and "float" are defined by the arithmetic and vector_elem > 1.
*/
/* Test for a certain class of modes. */
FIRM_API int mode_is_signed (const ir_mode *mode);
FIRM_API int mode_is_float (const ir_mode *mode);
FIRM_API int mode_is_int (const ir_mode *mode);
......
......@@ -59,34 +59,22 @@
*/
/**
* Checks whether a pointer points to a ir node.
* Checks whether a pointer points to a ir node. This is guessed by looking
* at the few bytes of the thing. Most things used in firm have a firm_kind
* attribute there. This function might falsely return true though for things
* without a firm_kind at the beginning.
*
* @param thing an arbitrary pointer
* @return non-zero if the thing is a ir mode, else zero
* @param thing an arbitrary pointer
* @return non-zero if the thing is a ir mode, else zero
*/
FIRM_API int is_ir_node (const void *thing);
FIRM_API int is_ir_node(const void *thing);
/**
* Returns the number of predecessors without the block predecessor.
*
* @param node the IR-node
*/
FIRM_API int get_irn_arity (const ir_node *node);
/** Replaces the old in array by a new one that will contain the ins given in
the parameters. Conserves the block predecessor. It copies the array passed.
This function is necessary to adjust in arrays of blocks, calls and phis.
Assumes that current_ir_graph is set to the graph containing "node".
"in" must contain all predecessors except the block that are required for
the nodes opcode. */
FIRM_API void set_irn_in(ir_node *node, int arity, ir_node *in[]);
/* to iterate through the predecessors without touching the array. No
order of predecessors guaranteed.
To iterate over the operands iterate from 0 to i < get_irn_arity(),
to iterate including the Block predecessor iterate from i = -1 to
i < get_irn_arity. */
/* Access predecessor n */
FIRM_API int get_irn_arity(const ir_node *node);
/**
* Get the n-th predecessor of a node.
......@@ -94,6 +82,15 @@ FIRM_API void set_irn_in(ir_node *node, int arity, ir_node *in[]);
*/
FIRM_API ir_node *get_irn_n(const ir_node *node, int n);
/**
* Replaces the old in array by a new one that will contain the ins given in
* the parameters. Conserves the block predecessor. It copies the array passed.
* This function is necessary to adjust in arrays of blocks, calls and phis.
* Assumes that current_ir_graph is set to the graph containing "node".
* "in" must contain all predecessors except the block that are required for
* the nodes opcode. */
FIRM_API void set_irn_in(ir_node *node, int arity, ir_node *in[]);
/**
* Add a artificial dependency to the node.
* The dependency is only inserted if it is not there already.
......@@ -146,9 +143,9 @@ FIRM_API void set_irn_n(ir_node *node, int n, ir_node *in);
* @returns the number of the new input
*/
FIRM_API int add_irn_n(ir_node *node, ir_node *in);
/* Remove predecessor i from Sync n */
/** Remove predecessor i from Sync n */
FIRM_API void del_Sync_n(ir_node *n, int i);
/* Sets the mode struct of node. */
/** Sets the mode struct of node. */
FIRM_API void set_irn_mode(ir_node *node, ir_mode *mode);
/** Gets the mode struct of a node. */
FIRM_API ir_mode *get_irn_mode(const ir_node *node);
......@@ -242,10 +239,10 @@ FIRM_API ir_node *new_ir_node(dbg_info *db, ir_graph *irg, ir_node *block,
* To express the difference to access routines that work for all
* nodes we use infix "nodes" and do not name this function
* get_irn_block(). */
FIRM_API ir_node *get_nodes_block (const ir_node *node);
FIRM_API ir_node *get_nodes_block(const ir_node *node);
/** Sets the Block of a node. */
FIRM_API void set_nodes_block (ir_node *node, ir_node *block);
FIRM_API void set_nodes_block(ir_node *node, ir_node *block);
/** Test whether arbitrary node is frame pointer.
*
......@@ -296,10 +293,12 @@ FIRM_API void set_Block_matured(ir_node *block, int matured);
/** A visited flag only for block nodes.
* @see also: get_irn_visited() inc_irg_visited() inc_irg_block_visited()*/
FIRM_API ir_visited_t get_Block_block_visited(const ir_node *block);
/** set block visited flag */
FIRM_API void set_Block_block_visited(ir_node *block, ir_visited_t visit);
/* For this current_ir_graph must be set. */
/** mark a block as visited by setting its visited counter */
FIRM_API void mark_Block_block_visited(ir_node *node);
/** returns 1 if a block is marked as visited */
FIRM_API int Block_block_visited(const ir_node *node);
/** Returns the extended basic block a block belongs to. */
......@@ -346,7 +345,7 @@ FIRM_API void set_End_keepalives(ir_node *end, int n, ir_node *in[]);
/** Remove irn from the keep-alive set. */
FIRM_API void remove_End_keepalive(ir_node *end, ir_node *irn);
/* Remove Bads, NoMem and doublets from the keep-alive set. */
/** Remove Bads, NoMem and doublets from the keep-alive set. */
FIRM_API void remove_End_Bads_and_doublets(ir_node *end);
/** Some parts of the End node are allocated separately -- their memory
......@@ -400,9 +399,6 @@ FIRM_API void set_SymConst_entity(ir_node *node, ir_entity *ent);
FIRM_API ir_enum_const *get_SymConst_enum(const ir_node *node);
FIRM_API void set_SymConst_enum(ir_node *node, ir_enum_const *ec);
/** Sets both: type and ptrinfo. Needed to treat the node independent of
its semantics. Does a memcpy for the memory sym points to. */
/* write 'union': firmjni then does not create a method... */
FIRM_API union symconst_symbol get_SymConst_symbol(const ir_node *node);
FIRM_API void set_SymConst_symbol(ir_node *node,
union symconst_symbol sym);
......@@ -457,12 +453,6 @@ FIRM_API void set_Builtin_param(ir_node *node, int pos, ir_node *para
/** Returns a human readable string for the ir_builtin_kind. */
FIRM_API const char *get_builtin_kind_name(ir_builtin_kind kind);
/* For unary and binary arithmetic operations the access to the
operands can be factored out. Left is the first, right the
second arithmetic value as listed in tech report 1999-44.
unops are: Minus, Abs, Not, Conv, Cast
binops are: Add, Sub, Mul, Div, Mod, And, Or, Eor, Shl,
Shr, Shrs, Rotl, Cmp */
FIRM_API int is_unop(const ir_node *node);
FIRM_API ir_node *get_unop_op(const ir_node *node);
FIRM_API void set_unop_op(ir_node *node, ir_node *op);
......@@ -572,20 +562,13 @@ FIRM_API int get_ASM_n_output_constraints(const ir_node *node);
/** Return the number of clobbered registers for an ASM node. */
FIRM_API int get_ASM_n_clobbers(const ir_node *node);
/*
*
* NAME Auxiliary routines
*
*/
/** Returns operand of node if node is a Proj. */
FIRM_API ir_node *skip_Proj(ir_node *node);
/** Returns operand of node if node is a Proj. */
FIRM_API const ir_node *skip_Proj_const(const ir_node *node);
/** Returns operand of node if node is a Id. */
FIRM_API ir_node *skip_Id(ir_node *node); /* Old name is skip_nop(). */
/** Returns corresponding operand of Tuple if node is a Proj from
a Tuple. */
FIRM_API ir_node *skip_Id(ir_node *node);
/** Returns corresponding operand of Tuple if node is a Proj from a Tuple. */
FIRM_API ir_node *skip_Tuple(ir_node *node);
/** Returns operand of node if node is a Cast. */
FIRM_API ir_node *skip_Cast(ir_node *node);
......@@ -596,16 +579,17 @@ FIRM_API ir_node *skip_Pin(ir_node *node);
FIRM_API ir_node *skip_Confirm(ir_node *node);
/** Skip all high-level Operations (including Cast, Confirm). */
FIRM_API ir_node *skip_HighLevel_ops(ir_node *node);
/** Returns true if the operation manipulates control flow:
Start, End, Jmp, Cond, Return, Raise, Bad */
/** Returns true if the operation manipulates control flow */
FIRM_API int is_cfop(const ir_node *node);
/** returns true if the operation jumps to an unknown destination.
* See irop_flag_unknown_jump for a detailed explanation */
FIRM_API int is_unknown_jump(const ir_node *node);
/** Returns true if the operation can change the control flow because
of an exception: Call, Div, Mod, Load, Store, Alloc,
Bad. Raise is not fragile, but a unconditional jump. */