Commit df83e378 authored by Sebastian Felis's avatar Sebastian Felis
Browse files

added doxygen comments

[r594]
parent de3ad6fc
......@@ -2,9 +2,9 @@
Copyright (C) 1995, 1996 Markus Armbruster */
/* Copyright (C) 1998 - 2000 by Universitaet Karlsruhe
** All rights reserved.
**
** Authors: Martin Trapp, Christian Schaefer
* All rights reserved.
*
* Authors: Martin Trapp, Christian Schaefer
*/
/* $Id$ */
......@@ -16,148 +16,97 @@
# include <assert.h>
# include "firm_common.h"
/****h* libfirm/ident
/**
*
* NAME
* ident -- identifiers in the firm library
* NOTES
* - identifiers in the firm library
* Identifiers are used in the firm library. This is the interface to it.
******
*/
/* Identifiers */
/****s* ident/ident
/**
*
* NAME
* ident - the abstract data type ident
* SOURCE
* the abstract data type ident
*/
typedef const struct set_entry ident;
/*****/
/****f* ident/id_from_str
/**
*
* NAME
* id_from_str - store a string and create an ident
* SYNOPSIS
* ident *id = id_from_str (const char *str, int len);
* FUNCTION
* store a string and create an ident
* Stores a string in the ident module and returns a handle for the string.
* Copies the string.
* INPUTS
* str - the string (or whatever) which shall be stored
* len - the length of the data in bytes
* RESULT
* id - a handle for the generated ident
* SEE ALSO
* id_to_str, id_to_strlen
***
* @param str - the string (or whatever) which shall be stored
* @param len - the length of the data in bytes
* @return id - a handle for the generated ident
* @see id_to_str, id_to_strlen
* @see
*/
INLINE ident *id_from_str (const char *str, int len);
/****f* ident/id_to_str
/**
*
* NAME
* id_to_str - return a string represented by an ident
* SYNOPSIS
* char *cp = id_to_str (ident *id);
* FUNCTION
* return a string represented by an ident
* Returns the string cp represented by id. This string cp is not
* Null terminated! The string may not be changed.
* INPUTS
* id - the ident
* RESULT
* cp - a string
* SEE ALSO
* id_from_str, id_to_strlen
***
* @param id - the ident
* @return cp - a string
* @see id_from_str, id_to_strlen
* @see
*/
INLINE const char *id_to_str (ident *id);
/****f* ident/id_to_strlen
/**
*
* NAME
* id_to_strlen - return the length of a string represented by an ident
* SYNOPSIS
* int len = id_to_strlen (ident *id);
* FUNCTION
* return the length of a string represented by an ident
* Returns the length of string represented by id.
* INPUTS
* id - the ident
* RESULT
* len - the length of the string
* SEE ALSO
* id_from_str, id_to_str
***
* @param id - the ident
* @return len - the length of the string
* @see id_from_str, id_to_str
* @see
*/
INLINE int id_to_strlen(ident *id);
/****f* ident/id_is_suffix
/**
*
* NAME
*
* SYNOPSIS
* int id_is_prefix (ident *prefix, ident *id);
* FUNCTION
* Returns true if prefix is prefix of id.
* INPUTS
* prefix - the prefix
* id - the ident
* SEE ALSO
* id_from_str, id_to_str, id_is_prefix
***
* @param prefix - the prefix
* @param id - the ident
* @see id_from_str, id_to_str, id_is_prefix
* @see
*/
/* */
int id_is_prefix (ident *prefix, ident *id);
/****f* ident/id_is_suffix
/**
*
* NAME
*
* SYNOPSIS
* int id_is_suffix (ident *suffix, ident *id);
* FUNCTION
* Returns true if suffix is suffix of id.
* INPUTS
* suffix - the suffix
* id - the ident
* SEE ALSO
* id_from_str, id_to_str, id_is_prefix
***
* @param suffix - the suffix
* @param id - the ident
* @see id_from_str, id_to_str, id_is_prefix
* @see
*/
/* */
int id_is_suffix (ident *suffix, ident *id);
/****f* ident/print_id
/**
*
* NAME
*
* SYNOPSIS
* int print_id (ident *id);
* FUNCTION
* Prints the ident to stdout.
* INPUTS
* The ident to print.
* SEE ALSO
* id_from_str, id_to_str, id_is_prefix, fprint_id
***
* @param The ident to print.
* @see id_from_str, id_to_str, id_is_prefix, fprint_id
* @see
*/
/* */
int print_id (ident *id);
/****f* ident/fprint_id
/**
*
* NAME
*
* SYNOPSIS
* int fprint_id (FILE *f, ident *id);
* FUNCTION
* Prints the ident to the file passed.
* INPUTS
* The ident to print and the file.
* SEE ALSO
* id_from_str, id_to_str, id_is_prefix, print_id
***
* @param The ident to print and the file.
* @see id_from_str, id_to_str, id_is_prefix, print_id
* @see
*/
/* */
int fprint_id (FILE *F, ident *id);
......
......@@ -2,9 +2,9 @@
Copyright (C) 1995, 1996 Markus Armbruster */
/* Copyright (C) 1998 - 2000 by Universitaet Karlsruhe
** All rights reserved.
**
** Authors: Martin Trapp, Christian Schaefer
* All rights reserved.
*
* Authors: Martin Trapp, Christian Schaefer
*/
/* $Id$ */
......
/* Copyright (C) 1998 - 2000 by Universitaet Karlsruhe
** All rights reserved.
**
** Authors: Martin Trapp, Christian Schaefer
**
** ircons.c: basic and more detailed irnode constructors
** store, block and parameter administration.
** Adapted to extended FIRM nodes (exceptions...) and commented
** by Goetz Lindenmaier
* All rights reserved.
*
* Authors: Martin Trapp, Christian Schaefer
*
* ircons.c: basic and more detailed irnode constructors
* store, block and parameter administration.
* Adapted to extended FIRM nodes (exceptions...) and commented
* by Goetz Lindenmaier
*/
/* $Id$ */
......@@ -583,7 +583,7 @@ new_rd_InstOf (dbg_info *db, ir_graph *irg, ir_node *block, ir_node *store,
res->attr.io.ent = ent;
/* res = optimize (res);
** irn_vrfy (res); */
* irn_vrfy (res); */
return (res);
}
......@@ -896,19 +896,13 @@ INLINE ir_node *new_r_Filter (ir_graph *irg, ir_node *block, ir_node *arg,
/** public interfaces */
/** construction tools */
/****f* ircons/new_Start
/**
*
* NAME
* new_Start -- create a new Start node in the current block
* - create a new Start node in the current block
*
* SYNOPSIS
* s = new_Start(void);
* ir_node* new_Start(void);
* @return s - pointer to the created Start node
*
* RESULT
* s - pointer to the created Start node
*
****
*/
ir_node *
new_d_Start (dbg_info* db)
......@@ -1151,7 +1145,7 @@ new_rd_Phi_in (ir_graph *irg, ir_node *block, ir_mode *mode,
static ir_node *
get_r_value_internal (ir_node *block, int pos, ir_mode *mode);
/** This function computes the predecessors for a real Phi node, and then
/**
allocates and returns this node. The routine called to allocate the
node might optimize it away and return a real value, or even a pointer
to a deallocated Phi node on top of the obstack!
......@@ -1312,7 +1306,7 @@ get_r_value_internal (ir_node *block, int pos, ir_mode *mode)
#else /* if 0 */
/** This is the simple algorithm. If first generates a Phi0, then
/**
it starts the recursion. This causes an Id at the entry of
every block that has no definition of the value! **/
......@@ -1455,7 +1449,7 @@ get_r_frag_value_internal (ir_node *block, ir_node *cfOp, int pos, ir_mode *mode
}
#endif
/** This function allocates a dummy Phi node to break recursions,
/**
computes the predecessors for the real phi node, and then
allocates and returns this node. The routine called to allocate the
node might optimize it away and return a real value.
......
/* Copyright (C) 1998 - 2000 by Universitaet Karlsruhe
** All rights reserved.
**
** Authors: Martin Trapp, Christian Schaefer,
** Goetz Lindenmaier
**
** ircons.h ir node construction
* All rights reserved.
*
* Authors: Martin Trapp, Christian Schaefer,
* Goetz Lindenmaier
*
* ircons.h ir node construction
*/
/* $Id$ */
/** !!!
*** Ideas for imrovement:
***
/**
* Ideas for imrovement:
*
Handle construction of exceptions more comfortable:
Add new constructors that pass the exception region (or better the
Phi for the memories, the ex. region can be found from there) as parameter,
......@@ -22,12 +22,10 @@
it is always unambiguous.
**/
/****h* libfirm/ircons
/**
*
* NAME
* file ircons.h
*
* NOTES
* This file documents all datatypes and constructors needed to
* build a FIRM representation of a pocedure. The constructors are
* also implemented in this file.
......@@ -36,7 +34,6 @@
*
* For extensive documentation of FIRM see UKA Techreport 1999-14.
*
* DATATYPES
* =========
*
* The struct ir_graph
......@@ -386,7 +383,6 @@
* - the outputs of the Firm node
* - attributes to the node
*
* BASIC BLOCKS
* ------------
*
* ir_node *new_immBlock (void)
......@@ -561,7 +557,6 @@
* else it points to the end_block.
*
*
* CONSTANTS
* ---------
*
* ir_node *new_Const (ir_mode *mode, tarval *con)
......@@ -621,7 +616,6 @@
* attr.i.*ptrinfo, an ident holding information for the linker. The mode
* of the node is mode_P.
*
* THE SELECT NODE
* ---------------
*
* ir_node *new_simpleSel (ir_node *store, ir_node *frame, entity *sel)
......@@ -837,7 +831,6 @@
*
*
*
* THE PHI NODE
* ------------
*
* In general, Phi nodes are automaitcally inserted. In some cases, if
......@@ -1067,7 +1060,6 @@
* flow from Start to End. Adds the node to the list in the end
* node.
*
*****
*/
......
/* Copyright (C) 1998 - 2000 by Universitaet Karlsruhe
** All rights reserved.
**
** Authors: Martin Trapp, Christian Schaefer
**
** irdump.h: dumping of an intermediate representation graph
* All rights reserved.
*
* Authors: Martin Trapp, Christian Schaefer
*
* irdump.h: dumping of an intermediate representation graph
*/
/* $Id$ */
......
/* Copyright (C) 1998 - 2000 by Universitaet Karlsruhe
** All rights reserved.
**
** Authors: Martin Trapp, Christian Schaefer
**
** dump an ir graph, for further use with xvcg
* All rights reserved.
*
* Authors: Martin Trapp, Christian Schaefer
*
* dump an ir graph, for further use with xvcg
*/
/* $Id$ */
......@@ -14,11 +14,9 @@
# include "irnode.h"
# include "irgraph.h"
/****h* libfirm/irdump
/**
*
* NAME
* irdump -- dump routines for the graph and all type information
* NOTES
* - dump routines for the graph and all type information
* The dump format of most functions is vcg. This is a text based graph
* representation. Some use the original format,
* but most generate an extended format that is only read by some special
......@@ -29,232 +27,157 @@
* Most routines use the name of the passed entity as the name of the
* file dumped to.
*
******
*/
/* @@@ GL: A hack */
extern char *dump_file_suffix;
/****m* irdump/dump_ir_graph
/**
*
* NAME
* dump_ir_graph -- dump a firm graph
* SYNOPSIS
* void dump_ir_graph (ir_graph *irg);
* FUNCTION
* - dump a firm graph
* Dumps all Firm nodes of a single graph for a single procedure in
* standard xvcg format.
* Dumps the graph to a file. The file name is constructed from the
* name of the entity describing the procedure (irg->entity) and the
* ending .vcg. Eventually overwrites existing files.
* INPUTS
* irg: The firm graph to be dumped.
* RESULT
* A file containing the firm graph in vcg format.
* SEE ALSO
* turn_of_edge_labels
***
* @param irg: The firm graph to be dumped.
* @return A file containing the firm graph in vcg format.
* @see turn_of_edge_labels
* @see
*/
void dump_ir_graph (ir_graph *irg);
/****m* irdump/dump_ir_block_graph
/**
*
* NAME
* dump_ir_block_graph -- dump a firm graph without explicit block nodes.
* SYNOPSIS
* void dump_ir_block_graph (ir_graph *irg);
* FUNCTION
* - dump a firm graph without explicit block nodes.
* Dumps all Firm nodes of a single graph for a single procedure in
* extended xvcg format.
* Dumps the graph to a file. The file name is constructed from the
* name of the entity describing the procedure (irg->entity) and the
* ending .vcg. Eventually overwrites existing files.
* INPUTS
* irg: The firm graph to be dumped.
* RESULT
* A file containing the firm graph in vcg format.
* SEE ALSO
* turn_of_edge_labels
***
* @param irg: The firm graph to be dumped.
* @return A file containing the firm graph in vcg format.
* @see turn_of_edge_labels
* @see
*/
void dump_ir_block_graph (ir_graph *irg);
/****m* irdump/dump_cfg
/**
*
* NAME
* dump_cfg -- Dump the control flow graph of a procedure
* SYNOPSIS
* void dump_cfg (ir_graph *irg);
* FUNCTION
* - Dump the control flow graph of a procedure
* Dumps the control flow graph of a procedure in standard xvcg format.
* Dumps the graph to a file. The file name is constructed from the
* name of the entity describing the procedure (irg->entity) and the
* ending -cfg.vcg. Eventually overwrites existing files.
* INPUTS
* irg: The firm graph whose CFG shall be dumped.
* RESULT
* A file containing the CFG in vcg format.
* SEE ALSO
* turn_of_edge_labels
***
* @param irg: The firm graph whose CFG shall be dumped.
* @return A file containing the CFG in vcg format.
* @see turn_of_edge_labels
* @see
*/
void dump_cfg (ir_graph *irg);
/****m* irdump/dump_type_graph
/**
*
* NAME
* dump_type_graph --
* SYNOPSIS
* void dump_type_graph (ir_graph *irg);
* FUNCTION
* -
* Dumps all the type information needed for Calls, Sels, ... in this graph.
* Dumps this graph to a file. The file name is constructed from the
* name of the entity describing the procedure (irg->entity) and the
* ending -type.vcg. Eventually overwrites existing files.
* INPUTS
* irg: The firm graph whose type information is to be dumped.
* RESULT
* A file containing the type information of the firm graph in vcg format.
* SEE ALSO
* turn_of_edge_labels
***
* @param irg: The firm graph whose type information is to be dumped.
* @return A file containing the type information of the firm graph in vcg format.
* @see turn_of_edge_labels
* @see
*/
void dump_type_graph (ir_graph *irg);
/****m* irdump/dump_all_types
/**
*
* NAME
* dump_all_types -- Dumps all type information
* SYNOPSIS
* void dump_all_types (void);
* FUNCTION
* - Dumps all type information
* Dumps all type information that is somehow reachable in standard vcg
* format.
* Dumps the graph to a file named All_types.vcg.
* INPUTS
* No inputs.
* RESULT
* A file containing all type information for the program in standard
* vcg format.
* SEE ALSO
* turn_of_edge_labels
***
* @param No inputs.
* @return A file containing all type information for the program in standard
* @return vcg format.
* @see turn_of_edge_labels
* @see
*/
void dump_all_types (void);
/****m* irdump/dump_class_hierarchy
/**
*
* NAME
* dump_class_hierarchy -- Dumps the class hierarchy with or without entities.
* SYNOPSIS
* void dump_class_hierarchy (bool entities);
* FUNCTION
* - Dumps the class hierarchy with or without entities.
* Dumps a node for all classes and the sub/supertype relations. If
* entities is set to true also dumps the entities of classes, but without
* any additional information as the entities type. The overwrites relation
* is dumped along with the entities.
* Dumps to a file class_hierarchy.vcg
* INPUTS
* Flag whether to dump the entities.
* RESULT
* A file containing the class hierarchy tree for the program in standard
* vcg format.
* SEE ALSO
*
***
* @param Flag whether to dump the entities.
* @return A file containing the class hierarchy tree for the program in standard
* @return vcg format.
* @see
* @see
*/
void dump_class_hierarchy (bool entities);
/****m* irdump/dump_ir_graph_w_types
/**
*
* NAME
* dump_ir_graph_w_types
* SYNOPSIS
* void dump_ir_graph_w_types (ir_graph *irg);
* FUNCTION
* Dumps a firm graph and all the type information needed for Calls,
* Sels, ... in this graph.
* Dumps the graph to a file. The file name is constructed from the
* name of the entity describing the procedure (irg->entity) and the
* ending -all.vcg. Eventually overwrites existing files.
* INPUTS
* irg: The firm graph to be dumped with its type information.
* RESULT
* A file containing the firm graph and the type information of the firm graph in vcg format.
* SEE ALSO
* turn_of_edge_labels
***
* @param irg: The firm graph to be dumped with its type information.
* @return A file containing the firm graph and the type information of the firm graph in vcg format.
* @see turn_of_edge_labels
* @see
*/
void dump_ir_graph_w_types (ir_graph *irg);
/****m* irdump/dump_ir_block_graph_w_types
/**
*
* NAME
* dump_ir_block_graph_w_types
* SYNOPSIS
* void dump_ir_block_graph_w_types (ir_graph *irg);
* FUNCTION
* Dumps a firm graph and all the type information needed for Calls,
* Sels, ... in this graph. The graph is in blocked format.
* Dumps the graph to a file. The file name is constructed from the
* name of the entity describing the procedure (irg->entity) and the
* ending -all.vcg. Eventually overwrites existing files.
* INPUTS
* irg: The firm graph to be dumped with its type information.
* RESULT
* A file containing the firm graph and the type information of the firm graph in vcg format.
* SEE ALSO
* turn_of_edge_labels
***
* @param irg: The firm graph to be dumped with its type information.
* @return A file containing the firm graph and the type information of the firm graph in vcg format.
* @see turn_of_edge_labels
* @see
*/
void dump_ir_block_graph_w_types (ir_graph *irg);
/****m* irdump/dump_cg_graph
/**