From: Sebastian Felis Date: Mon, 13 Jan 2003 10:41:54 +0000 (+0000) Subject: added doxygen comments X-Git-Url: http://nsz.repo.hu/git/?a=commitdiff_plain;h=df83e37827032795585d3b25776c465870672901;p=libfirm added doxygen comments [r594] --- diff --git a/ir/ident/ident.h b/ir/ident/ident.h index e03d2e6fb..28d39b977 100644 --- a/ir/ident/ident.h +++ b/ir/ident/ident.h @@ -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 # 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); diff --git a/ir/ident/ident_t.h b/ir/ident/ident_t.h index 34685d2be..ae5aa7704 100644 --- a/ir/ident/ident_t.h +++ b/ir/ident/ident_t.h @@ -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$ */ diff --git a/ir/ir/ircons.c b/ir/ir/ircons.c index 18ffa1b44..160164d88 100644 --- a/ir/ir/ircons.c +++ b/ir/ir/ircons.c @@ -1,12 +1,12 @@ /* 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. diff --git a/ir/ir/ircons.h b/ir/ir/ircons.h index 13dbadd33..9e52da2cd 100644 --- a/ir/ir/ircons.h +++ b/ir/ir/ircons.h @@ -1,17 +1,17 @@ /* 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. * - ***** */ diff --git a/ir/ir/irdump.c b/ir/ir/irdump.c index 5f7b6c960..94e712503 100644 --- a/ir/ir/irdump.c +++ b/ir/ir/irdump.c @@ -1,9 +1,9 @@ /* 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$ */ diff --git a/ir/ir/irdump.h b/ir/ir/irdump.h index b170f3281..c3e40b557 100644 --- a/ir/ir/irdump.h +++ b/ir/ir/irdump.h @@ -1,9 +1,9 @@ /* 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 +/** * - * NAME * dump_cg_graph - * SYNOPSIS - * void dump_cg_graph (ir_graph *irg); - * FUNCTION * Dumps a interprocedural firm graph as dump_ir_graph. - * INPUTS - * irg: The firm graph to be dumped. - * RESULT - * A file containing the firm graph in vcg format. - * SEE ALSO - *** + * @param irg: The firm graph to be dumped. + * @return A file containing the firm graph in vcg format. + * @see */ void dump_cg_graph(ir_graph * irg); -/****m* irdump/dump_cg_block_graph +/** * - * NAME * dump_cg_block_graph - * SYNOPSIS - * void dump_cg_block_graph (ir_graph *irg); - * FUNCTION * Dumps a interprocedural firm graph as dump_ir_block_graph. - * INPUTS - * irg: The firm graph to be dumped. - * RESULT - * A file containing the firm graph in vcg format. - * SEE ALSO - *** + * @param irg: The firm graph to be dumped. + * @return A file containing the firm graph in vcg format. + * @see */ void dump_cg_block_graph(ir_graph * irg); void dump_all_cg_block_graph(); -/****m* irdump/dump_all_ir_graphs +/** * - * NAME - * dump_all_ir_graphs -- a walker that calls a dumper for each graph - * SYNOPSIS - * void dump_all_ir_graphs (void dump_graph(ir_graph*)); - * FUNCTION + * - a walker that calls a dumper for each graph * Walks over all firm graphs and calls a dumper for each graph. * The following dumpers can be passed as arguments: * dump_ir_graph @@ -262,151 +185,99 @@ void dump_all_cg_block_graph(); * dump_cfg * dump_type_graph * dump_ir_graph_w_types - * INPUTS - * The dumper to be used for dumping. - * RESULT - * Whatever the dumper creates. - * SEE ALSO - * turn_of_edge_labels - *** + * @param The dumper to be used for dumping. + * @return Whatever the dumper creates. + * @see turn_of_edge_labels + * @see */ typedef void (dump_graph_func)(ir_graph *); void dump_all_ir_graphs (dump_graph_func *dump_graph); -/****m* irdump/turn_off_edge_labels +/** * - * NAME * turn_off_edge_labels - * SYNOPSIS - * void turn_off_edge_labels(); - * FUNCTION * Sets the vcg flag "display_edge_labels" to no. This is necessary * as xvcg and aisee both fail to display graphs with self-edges if these * edges have labes. - * INPUTS - * No inputs - * RESULT - * dumpers will generate vcg flags with a different header. - * SEE ALSO - * - *** + * @param No inputs + * @return dumpers will generate vcg flags with a different header. + * @see + * @see */ void turn_off_edge_labels(); -/****m* irdump/dump_consts_local +/** * - * NAME * dump_consts_local - * SYNOPSIS - * void dump_consts_local(bool b); - * FUNCTION * If set to true constants will be replicated for every use. In non blocked * view edges from constant to block are scipped. Vcg * then layouts the graphs more compact, this makes them better readable. * The flag is automatically and temporarily set to false if other * edges are dumped, as outs, loop, ... * Default setting: false. - * INPUTS - * RESULT - * SEE ALSO - * - *** + * @see + * @see */ void dump_consts_local(bool b); -/****m* irdump/turn_off_constant_entity_values +/** * - * NAME * turn_off_constant_entity_values - * SYNOPSIS - * void turn_off_constant_entity_values() - * FUNCTION * Turns off dumping the values of constant entities. Makes type graphs * better readable. - * INPUTS - * No inputs - * RESULT - * SEE ALSO - * - *** + * @param No inputs + * @see + * @see */ void turn_off_constant_entity_values(); -/****m* irdump/dump_keepalive_edges +/** * - * NAME * dump_keepalive_edges - * SYNOPSIS - * void dump_keepalive_edges() - * FUNCTION * Turns on dumping the edges from the End node to nodes to be kept * alive - * INPUTS - * No inputs - * RESULT - * SEE ALSO - * - *** + * @param No inputs + * @see + * @see */ void dump_keepalive_edges(bool b); -/****m* irdump/dump_out_edges +/** * - * NAME * dump_out_edges - * SYNOPSIS - * void dump_out_edges() - * FUNCTION * Turns on dumping the out edges starting from the Start block in * dump_ir_graph. To test the consistency of the out datastructure. - * INPUTS - * No inputs - * RESULT - * SEE ALSO - * - *** + * @param No inputs + * @see + * @see */ void dump_out_edges(); -/****m* irdump/dump_dominator_information +/** * - * NAME * dump_dominator_information - * SYNOPSIS - * void dump_dominator_information() - * FUNCTION * If this flag is set the dumper dumps edges to immediate dominator in cfg. - * INPUTS - * No inputs - * RESULT - * SEE ALSO - * - *** + * @param No inputs + * @see + * @see */ void dump_dominator_information(); -/****m* irdump/dump_loop_information +/** * - * NAME * dump_loop_information - * SYNOPSIS - * void dump_loop_information() - * FUNCTION * If this flag is set the dumper dumps loop nodes and edges from * these nodes to the contained ir nodes. * Can be turned off with dont_dump_loop_information(). * If the loops are interprocedural nodes can be missing. - * INPUTS - * No inputs - * RESULT - * SEE ALSO - * - *** + * @param No inputs + * @see + * @see */ void dump_loop_information(); void dont_dump_loop_information(); diff --git a/ir/ir/irflag.c b/ir/ir/irflag.c index 74cb1bb5c..5f63e29db 100644 --- a/ir/ir/irflag.c +++ b/ir/ir/irflag.c @@ -1,9 +1,9 @@ /* Copyright (C) 1998 - 2000 by Universitaet Karlsruhe -** All rights reserved. -** -** Authors: Christian Schaefer -** -** irflag --- optimization flags +* All rights reserved. +* +* Authors: Christian Schaefer +* +* irflag --- optimization flags */ /* $Id$ */ diff --git a/ir/ir/irflag.h b/ir/ir/irflag.h index b45c9fbe7..8f7d3d0f1 100644 --- a/ir/ir/irflag.h +++ b/ir/ir/irflag.h @@ -1,9 +1,9 @@ /* Copyright (C) 1998 - 2000 by Universitaet Karlsruhe -** All rights reserved. -** -** Authors: Christian Schaefer -** -** irflag --- optimization flags +* All rights reserved. +* +* Authors: Christian Schaefer +* +* irflag --- optimization flags */ /* $Id$ */ diff --git a/ir/ir/irgmod.c b/ir/ir/irgmod.c index 47157bc9b..4932d7c0f 100644 --- a/ir/ir/irgmod.c +++ b/ir/ir/irgmod.c @@ -1,10 +1,10 @@ /* Copyright (C) 1998 - 2000 by Universitaet Karlsruhe -** All rights reserved. -** -** Authors: Martin Trapp, Christian Schaefer -** -** irgmod: ir graph modification +* All rights reserved. +* +* Authors: Martin Trapp, Christian Schaefer +* +* irgmod: ir graph modification */ /* $Id$ */ diff --git a/ir/ir/irgmod.h b/ir/ir/irgmod.h index b30f6e735..ab100d313 100644 --- a/ir/ir/irgmod.h +++ b/ir/ir/irgmod.h @@ -1,9 +1,9 @@ /* Copyright (C) 1998 - 2000 by Universitaet Karlsruhe -** All rights reserved. -** -** Authors: Martin Trapp, Christian Schaefer -** -** irgmod.h: ir graph modification +* All rights reserved. +* +* Authors: Martin Trapp, Christian Schaefer +* +* irgmod.h: ir graph modification */ /* $Id$ */ diff --git a/ir/ir/irgopt.c b/ir/ir/irgopt.c index 6f0f7389b..bef751393 100644 --- a/ir/ir/irgopt.c +++ b/ir/ir/irgopt.c @@ -1,9 +1,9 @@ /* Coyright (C) 1998 - 2002 by Universitaet Karlsruhe -** All rights reserved. -** -** Author: Christian Schaefer, Goetz Lindenmaier, Sebastian Felis -** -** Optimizations for a whole ir graph, i.e., a procedure. +* All rights reserved. +* +* Author: Christian Schaefer, Goetz Lindenmaier, Sebastian Felis +* +* Optimizations for a whole ir graph, i.e., a procedure. */ /* $Id$ */ @@ -558,7 +558,7 @@ void inline_method(ir_node *call, ir_graph *called_graph) { if (called_graph == current_ir_graph) return; - /** Part the Call node into two nodes. Pre_call collects the parameters of +/** the procedure and later replaces the Start node of the called graph. Post_call is the old Call node and collects the results of the called graph. Both will end up being a tuple. **/ @@ -573,7 +573,7 @@ void inline_method(ir_node *call, ir_graph *called_graph) { pre_call = new_Tuple(5, in); post_call = call; - /** Part the block of the Call node into two blocks. +/** The new block gets the ins of the old block, pre_call and all its predecessors and all Phi nodes. **/ part_block(pre_call); @@ -656,7 +656,7 @@ void inline_method(ir_node *call, ir_graph *called_graph) { /* The new end node will die, but the in array is not on the obstack ... */ free_End(end); - /** Collect control flow from Return blocks to post_calls block. Replace +/** Return nodes by Jump nodes. **/ n_ret = 0; for (i = 0; i < arity; i++) { @@ -669,7 +669,7 @@ void inline_method(ir_node *call, ir_graph *called_graph) { } set_irn_in(post_bl, n_ret, cf_pred); - /** Collect results from Return nodes to post_call. Post_call is +/** turned into a tuple. **/ turn_into_tuple(post_call, 4); /* First the Memory-Phi */ @@ -753,7 +753,7 @@ void inline_method(ir_node *call, ir_graph *called_graph) { free(res_pred); free(cf_pred); - /*** Correct the control flow to the end node. +/** If the exception control flow from the Call directly branched to the end block we now have the following control flow predecessor pattern: ProjX -> Tuple -> Jmp. @@ -1264,7 +1264,7 @@ static void optimize_blocks(ir_node *b, void *env) { } in = (ir_node **) malloc(max_preds * sizeof(ir_node *)); - /** Debug output ** +/** printf(" working on "); DDMN(b); for (i = 0; i < get_Block_n_cfgpreds(b); i++) { pred = get_nodes_Block(get_Block_cfgpred(b, i)); @@ -1275,7 +1275,7 @@ static void optimize_blocks(ir_node *b, void *env) { printf(" removing pred %i ", i); DDMN(pred); } else { printf(" Nothing to do for "); DDMN(pred); } } - ** end Debug output **/ + * end Debug output **/ /** Fix the Phi nodes **/ phi = get_irn_link(b); @@ -1323,7 +1323,7 @@ static void optimize_blocks(ir_node *b, void *env) { phi = get_irn_link(phi); } - /** Move Phi nodes from removed blocks to this one. +/** This happens only if merge between loop backedge and single loop entry. **/ for (k = 0; k < get_Block_n_cfgpreds(b); k++) { pred = get_nodes_Block(get_Block_cfgpred(b, k)); diff --git a/ir/ir/irgopt.h b/ir/ir/irgopt.h index 6817c69b6..b0a26dd55 100644 --- a/ir/ir/irgopt.h +++ b/ir/ir/irgopt.h @@ -1,9 +1,9 @@ /* Copyright (C) 1998 - 2001 by Universitaet Karlsruhe -** All rights reserved. -** -** Author: Christian Schaefer, Goetz Lindenmaier -** -** Optimizations for a whole ir graph, i.e., a procedure. +* All rights reserved. +* +* Author: Christian Schaefer, Goetz Lindenmaier +* +* Optimizations for a whole ir graph, i.e., a procedure. */ /* $Id$ */ diff --git a/ir/ir/irgraph.c b/ir/ir/irgraph.c index 679423e7c..47a908580 100644 --- a/ir/ir/irgraph.c +++ b/ir/ir/irgraph.c @@ -1,9 +1,9 @@ /* Copyright (C) 1998 - 2000 by Universitaet Karlsruhe -** All rights reserved. -** -** Authors: Martin Trapp, Christian Schaefer -** -** +* All rights reserved. +* +* Authors: Martin Trapp, Christian Schaefer +* +* */ /* $Id$ */ @@ -67,8 +67,8 @@ new_ir_graph (entity *ent, int n_loc) current_ir_graph = res; add_irp_irg(res); /* remember this graph global. */ - /** Internal information for graph construction either held in the graph or - *** initialized for each graph. **/ +/** + * initialized for each graph. **/ #if PRECISE_EXC_CONTEXT res->n_loc = n_loc + 1 + 1; /* number of local variables that are never dereferenced in this graph plus one for @@ -105,7 +105,7 @@ new_ir_graph (entity *ent, int n_loc) res->ent = ent; set_entity_irg(ent, res); - /** A type that represents the stack frame. A class type so that it can +/** contain "inner" methods as in Pascal. **/ res->frame_type = new_type_class(mangle(get_entity_ident(ent), id_from_str(FRAME_TP_SUFFIX, strlen(FRAME_TP_SUFFIX)))); diff --git a/ir/ir/irgraph.h b/ir/ir/irgraph.h index e3162489c..9bfd6f40f 100644 --- a/ir/ir/irgraph.h +++ b/ir/ir/irgraph.h @@ -1,9 +1,9 @@ /* Copyright (C) 1998 - 2000 by Universitaet Karlsruhe -** All rights reserved. -** -** Authors: Martin Trapp, Christian Schaefer -** -** irgraph.h: ir graph construction +* All rights reserved. +* +* Authors: Martin Trapp, Christian Schaefer +* +* irgraph.h: ir graph construction */ /* $Id$ */ @@ -26,12 +26,11 @@ typedef struct ir_node ir_node; typedef struct ir_graph ir_graph; #endif -/***** irgraph/irgraph +/** * * NAME Datastructure that holds central information about a procedure * - * NOTE - ** ir_graph *new_ir_graph (entity *ent, int params); + * ir_graph *new_ir_graph (entity *ent, int params); * ------------------------------------------------- * * This constructor generates the basic infrastructure needed to @@ -60,11 +59,9 @@ typedef struct ir_graph ir_graph; * datastructure is used to build the Phi nodes and removed after * completion of the graph. There is no path from end to start in the * graph after calling ir_graph. - * FIELDS * pinned set to "pinned" if no global cse was performed on the graph. * set to "floats" if global cse was performed (and during construction: * did actually change something). Code placement is necessary. - * SOURCE */ /* Global variable holding the current_ir_graph. This global variable @@ -150,7 +147,7 @@ int get_irg_n_locs (ir_graph *irg); /* States of an ir_graph. */ /********************************************************************************/ -/** An ir_graph can have different states. These states represent the analysis +/** information associated with the graph. Optimizations invalidate these states. **/ @@ -239,6 +236,5 @@ unsigned long inc_max_irg_visited(void); void inc_irg_block_visited(ir_graph *irg); unsigned long get_irg_block_visited (ir_graph *irg); void set_irg_block_visited(ir_graph *irg, unsigned long i); -/*****/ # endif /* _IRGRAPH_H_ */ diff --git a/ir/ir/irgraph_t.h b/ir/ir/irgraph_t.h index bc7d0fdd3..66f7ae8ec 100644 --- a/ir/ir/irgraph_t.h +++ b/ir/ir/irgraph_t.h @@ -1,9 +1,9 @@ /* Copyright (C) 1998 - 2000 by Universitaet Karlsruhe -** All rights reserved. -** -** Authors: Martin Trapp, Christian Schaefer -** -** irgraph.h: ir graph construction +* All rights reserved. +* +* Authors: Martin Trapp, Christian Schaefer +* +* irgraph.h: ir graph construction */ /* $Id$ */ diff --git a/ir/ir/irgwalk.c b/ir/ir/irgwalk.c index 4a679f3e7..6da5562a4 100644 --- a/ir/ir/irgwalk.c +++ b/ir/ir/irgwalk.c @@ -1,11 +1,11 @@ /* Copyright (C) 1998 - 2000 by Universitaet Karlsruhe -** All rights reserved. -** -** Author: Boris Boesler -** -** traverse an ir graph -** - execute the pre function before recursion -** - execute the post function after recursion +* All rights reserved. +* +* Author: Boris Boesler +* +* traverse an ir graph +* - execute the pre function before recursion +* - execute the post function after recursion */ /* $Id$ */ diff --git a/ir/ir/irgwalk.h b/ir/ir/irgwalk.h index f8e1102e9..efafb55e7 100644 --- a/ir/ir/irgwalk.h +++ b/ir/ir/irgwalk.h @@ -1,14 +1,14 @@ /* Copyright (C) 1998 - 2000 by Universitaet Karlsruhe -** All rights reserved. -** -** Author: Boris Boesler -** -** traverse an ir graph -** - execute the pre function before recursion -** - execute the post function after recursion -** -** Uses current_ir_graph (from irgraph.h)!!! Set it to the proper -** graph before starting the walker. +* All rights reserved. +* +* Author: Boris Boesler +* +* traverse an ir graph +* - execute the pre function before recursion +* - execute the post function after recursion +* +* Uses current_ir_graph (from irgraph.h)!!! Set it to the proper +* graph before starting the walker. */ /* $Id$ */ diff --git a/ir/ir/irmode.c b/ir/ir/irmode.c index 0dc24bb71..bef5bd332 100644 --- a/ir/ir/irmode.c +++ b/ir/ir/irmode.c @@ -1,8 +1,8 @@ /* Copyright (C) 1998 - 2000 by Universitaet Karlsruhe -** All rights reserved. -** -** Authors: Martin Trapp, Christian Schaefer -** +* All rights reserved. +* +* Authors: Martin Trapp, Christian Schaefer +* */ /* $Id$ */ diff --git a/ir/ir/irmode.h b/ir/ir/irmode.h index c192350c9..a5584712f 100644 --- a/ir/ir/irmode.h +++ b/ir/ir/irmode.h @@ -1,8 +1,8 @@ /* Copyright (C) 1998 - 2000 by Universitaet Karlsruhe -** All rights reserved. -** -** Authors: Christian Schaefer -** +* All rights reserved. +* +* Authors: Christian Schaefer +* irmode.h Modes for ir operators. This module specifies the modes that type the firm nodes. See diff --git a/ir/ir/irnode.c b/ir/ir/irnode.c index c6de708b7..5c601c598 100644 --- a/ir/ir/irnode.c +++ b/ir/ir/irnode.c @@ -1,8 +1,8 @@ /* Copyright (C) 1998 - 2000 by Universitaet Karlsruhe -** All rights reserved. -** -** Authors: Martin Trapp, Christian Schaefer, Goetz Lindenmaier -** +* All rights reserved. +* +* Authors: Martin Trapp, Christian Schaefer, Goetz Lindenmaier +* */ /* $Id$ */ diff --git a/ir/ir/irnode.h b/ir/ir/irnode.h index 34542ea21..2e6f4b872 100644 --- a/ir/ir/irnode.h +++ b/ir/ir/irnode.h @@ -1,9 +1,9 @@ /* Copyright (C) 1998 - 2000 by Universitaet Karlsruhe 3 2002/02/28 13:33:52 -** All rights reserved. -** -** Authors: Martin Trapp, Christian Schaefer -** -** declarations of an ir node +* All rights reserved. +* +* Authors: Martin Trapp, Christian Schaefer +* +* declarations of an ir node */ /* $Id$ */ @@ -23,35 +23,33 @@ /* The type definiton of ir_node is also in irgraph.h to resolve recursion between irnode.h and irgraph.h */ -/****s* irnode/irnode +/** * * NAME ir_node - a datatype representing a Firm node * - * NOTE Not properly documented ;-) + * Not properly documented ;-) * - * ATTRIBUTES - * The common fields are: + * @param The common fields are: * - * firm_kind A firm_kind tag containing k_type. This is useful + * @param firm_kind A firm_kind tag containing k_type. This is useful * for dynamically checking whether a node is a ir_node. - * arity The number of predecessors in the Firm graph. - * in A list with the predecessors in the Firm graph. There are + * @param arity The number of predecessors in the Firm graph. + * @param in A list with the predecessors in the Firm graph. There are * routines to access individual elements and to obtain the * array. The method returning the array should not be used. - * mode The mode of the node. There are routines to get the mode but + * @param mode The mode of the node. There are routines to get the mode but * also to access the mode's fields directly. - * opcode The opcode of the node. There are routines to get the opcode but + * @param opcode The opcode of the node. There are routines to get the opcode but * also to access the opcode's fields directly. - * node_nr A unique number for the node. Available only if debugging is + * @param node_nr A unique number for the node. Available only if debugging is * turned on. - * SOURCE */ #ifndef _IR_NODE_TYPEDEF_ #define _IR_NODE_TYPEDEF_ typedef struct ir_node ir_node; #endif -/** Manipulate the fields of ir_node. With these access routines +/** you can work on the graph without considering the different types of nodes, it's just a big graph. **/ @@ -105,7 +103,6 @@ INLINE long get_irn_node_nr(ir_node *node); /* Returns the ir_graph this node belongs to. Only valid for * CallBegin, EndReg and EndExcept */ INLINE ir_graph *get_irn_irg(ir_node *node); -/*****/ /* irnode constructor */ /* Create a new irnode in irg, with an op, mode, arity and */ @@ -121,13 +118,12 @@ new_ir_node (dbg_info *db, int arity, ir_node *in[]); -/****s* irnode/other +/** * * NAME access functions for node fields. * - * NOTE Not properly documented ;-) + * Not properly documented ;-) * - * SOURCE */ /* this works for all except Block */ @@ -500,15 +496,13 @@ INLINE void set_Tuple_pred (ir_node *node, int pos, ir_node *pred); INLINE ir_node *get_Id_pred (ir_node *node); INLINE void set_Id_pred (ir_node *node, ir_node *pred); -/*****/ -/****s* irnode/other2 +/** * * NAME Auxiliary routines * - * NOTE Not properly documented ;-) + * Not properly documented ;-) * - * SOURCE */ /* returns operand of node if node is a Proj. */ @@ -544,7 +538,6 @@ int is_fragile_op(ir_node *node); /* Returns the memory operand of fragile operations. */ ir_node *get_fragile_op_mem(ir_node *node); -/*****/ /* Makros for debugging the libfirm */ #include "ident.h" diff --git a/ir/ir/irnode_t.h b/ir/ir/irnode_t.h index d8fe5748d..17549a77c 100644 --- a/ir/ir/irnode_t.h +++ b/ir/ir/irnode_t.h @@ -1,9 +1,9 @@ /* Copyright (C) 1998 - 2000 by Universitaet Karlsruhe -** All rights reserved. -** -** Authors: Martin Trapp, Christian Schaefer -** -** declarations of an ir node +* All rights reserved. +* +* Authors: Martin Trapp, Christian Schaefer +* +* declarations of an ir node */ /* $Id$ */ diff --git a/ir/ir/irop.c b/ir/ir/irop.c index 77f7de02c..7c7bc3921 100644 --- a/ir/ir/irop.c +++ b/ir/ir/irop.c @@ -1,8 +1,8 @@ /* Copyright (C) 1998 - 2000 by Universitaet Karlsruhe -** All rights reserved. -** -** Authors: Christian Schaefer -** +* All rights reserved. +* +* Authors: Christian Schaefer +* */ /* $Id$ */ diff --git a/ir/ir/irop.h b/ir/ir/irop.h index 68edea7ba..0f845777d 100644 --- a/ir/ir/irop.h +++ b/ir/ir/irop.h @@ -1,15 +1,15 @@ /* -** Copyright (C) 1998 - 2000 by Universitaet Karlsruhe -** All rights reserved. -** -** Authors: Christian Schaefer -** -** irop.h operators of firm nodes -** -** This module specifies the opcodes possible for ir nodes. Their -** definition is close to the operations specified in UKA Tech-Report -** 1999-14 -** +* Copyright (C) 1998 - 2000 by Universitaet Karlsruhe +* All rights reserved. +* +* Authors: Christian Schaefer +* +* irop.h operators of firm nodes +* +* This module specifies the opcodes possible for ir nodes. Their +* definition is close to the operations specified in UKA Tech-Report +* 1999-14 +* */ /* $Id$ */ diff --git a/ir/ir/iropt.c b/ir/ir/iropt.c index 8c132b117..1f8da8395 100644 --- a/ir/ir/iropt.c +++ b/ir/ir/iropt.c @@ -1,9 +1,9 @@ /* Copyright (C) 1998 - 2000 by Universitaet Karlsruhe -** All rights reserved. -** -** Authors: Christian Schaefer, Goetz Lindenmaier -** -** iropt --- optimizations intertwined with IR construction. +* All rights reserved. +* +* Authors: Christian Schaefer, Goetz Lindenmaier +* +* iropt --- optimizations intertwined with IR construction. */ /* $Id$ */ diff --git a/ir/ir/iropt.h b/ir/ir/iropt.h index a24cdfce3..e4d9bd3e2 100644 --- a/ir/ir/iropt.h +++ b/ir/ir/iropt.h @@ -1,9 +1,9 @@ /* Copyright (C) 1998 - 2000 by Universitaet Karlsruhe -** All rights reserved. -** -** Authors: Martin Trapp, Christian Schaefer -** -** Declarations for optimizations intertwined with IR construction. +* All rights reserved. +* +* Authors: Martin Trapp, Christian Schaefer +* +* Declarations for optimizations intertwined with IR construction. */ /* $Id$ */ diff --git a/ir/ir/iropt_t.h b/ir/ir/iropt_t.h index 62b0db27d..0974a0b31 100644 --- a/ir/ir/iropt_t.h +++ b/ir/ir/iropt_t.h @@ -1,9 +1,9 @@ /* Copyright (C) 1998 - 2000 by Universitaet Karlsruhe -** All rights reserved. -** -** Authors: Martin Trapp, Christian Schaefer -** -** Declarations for optimizations intertwined with IR construction. +* All rights reserved. +* +* Authors: Martin Trapp, Christian Schaefer +* +* Declarations for optimizations intertwined with IR construction. */ /* $Id$ */ diff --git a/ir/ir/irprog.c b/ir/ir/irprog.c index 2728791eb..95bd7f426 100644 --- a/ir/ir/irprog.c +++ b/ir/ir/irprog.c @@ -1,9 +1,9 @@ /* Copyright (C) 2000 by Universitaet Karlsruhe -** All rights reserved. -** -** Authors: Goetz Lindenmaier -** -** irprog.c: ir representation of a program +* All rights reserved. +* +* Authors: Goetz Lindenmaier +* +* irprog.c: ir representation of a program */ /* $Id$ */ diff --git a/ir/ir/irprog.h b/ir/ir/irprog.h index dfc98b936..639ccf2a8 100644 --- a/ir/ir/irprog.h +++ b/ir/ir/irprog.h @@ -1,18 +1,18 @@ /* Copyright (C) 2000 by Universitaet Karlsruhe -** All rights reserved. -** -** Authors: Goetz Lindenmaier -** -** irprog.h: ir representation of a program -** -** This file defines a construct that keeps all information about a -** program: -** - A list of all procedures. -** - A list of all types. -** - A global type that can be thought of as a god-class containing all -** global variables and procedures. This is not the base class of -** all classes in a class hierarchy (as, e.g., "object" in java). -** - (An obstack containing global things, e.g., the above mentioned lists.) +* All rights reserved. +* +* Authors: Goetz Lindenmaier +* +* irprog.h: ir representation of a program +* +* This file defines a construct that keeps all information about a +* program: +* - A list of all procedures. +* - A list of all types. +* - A global type that can be thought of as a god-class containing all +* global variables and procedures. This is not the base class of +* all classes in a class hierarchy (as, e.g., "object" in java). +* - (An obstack containing global things, e.g., the above mentioned lists.) */ /* $Id$ */ @@ -23,22 +23,20 @@ # include "irnode.h" # include "type.h" -/***** irprog/irprog +/** * * NAME Datastructure that holds central information about a program * - * NOTE Preliminary documentation ;-) + * Preliminary documentation ;-) * - * SOURCE */ -/***s* irprog/irprog +/** * * NAME Datastructure that holds central information about a program * - * NOTE Preliminary documentation ;-) + * Preliminary documentation ;-) * - * FIELDS * main_irg The ir graph that is the entry point to the program. * (Anything not reachable from here may be optimized away. * If we want to translate libraries or the like correctly @@ -49,7 +47,6 @@ * using exchange_types()). * glob_type The unique global type that is owner of all global entities. * - * SOURCE */ typedef struct ir_prog ir_prog; @@ -89,16 +86,11 @@ void set_irp_type(int pos, type *typ); /** Functions to access the fields of ir_prog **/ type *get_glob_type(void); -/*****/ -/***p* irprog/get_const_code_irg +/** * - * NAME - * get_const_code_irg - Returns an irgraph that only contains constant + * Returns an irgraph that only contains constant * expressions for constant entities. - * SYNOPSIS - * ir_graph *get_const_code_irg(); - * NOTE * Do not use any access function for this graph, do not generate code * for this graph. This graph contains only one block. The constant * expressions may not contain control flow. See also copy_const_code diff --git a/ir/ir/irvrfy.c b/ir/ir/irvrfy.c index d836e45d0..61211960d 100644 --- a/ir/ir/irvrfy.c +++ b/ir/ir/irvrfy.c @@ -1,9 +1,9 @@ /* Copyright (C) 1998 - 2000 by Universitaet Karlsruhe -** All rights reserved. -** -** Authors: Christian Schaefer -** -** +* All rights reserved. +* +* Authors: Christian Schaefer +* +* */ /* $Id$ */ diff --git a/ir/ir/irvrfy.h b/ir/ir/irvrfy.h index 72ef99f97..2335d0c91 100644 --- a/ir/ir/irvrfy.h +++ b/ir/ir/irvrfy.h @@ -1,9 +1,9 @@ /* Copyright (C) 1998 - 2000 by Universitaet Karlsruhe -** All rights reserved. -** -** Author: Christian Schaefer -** -** irgraph.h: ir graph verification +* All rights reserved. +* +* Author: Christian Schaefer +* +* irgraph.h: ir graph verification */ /* $Id$ */ diff --git a/ir/ir/old_fctnames.h b/ir/ir/old_fctnames.h index 56522df86..345cc0ad3 100644 --- a/ir/ir/old_fctnames.h +++ b/ir/ir/old_fctnames.h @@ -1,10 +1,10 @@ /* Copyright (C) 2001 by Universitaet Karlsruhe -** All rights reserved. -** -** Authors: Goetz Lindenmaier -** -** Some makros supporting old function names. +* All rights reserved. +* +* Authors: Goetz Lindenmaier +* +* Some makros supporting old function names. */ /* $Id$ */ diff --git a/ir/st/bs.h b/ir/st/bs.h index 12ff85db7..beea7f877 100644 --- a/ir/st/bs.h +++ b/ir/st/bs.h @@ -1,11 +1,11 @@ /* Copyright (c) 2002 by Universität Karlsruhe (TH). All Rights Reserved */ -/*** +/** NAME bs PURPOSE provide bs_t - NOTES + S not quite complete HISTORY liekweg - Feb 27, 2002: Created. diff --git a/ir/st/exc.c b/ir/st/exc.c index 5d58fc2cb..bd8f159e9 100644 --- a/ir/st/exc.c +++ b/ir/st/exc.c @@ -1,14 +1,14 @@ /* Copyright (c) 2002 by Universität Karlsruhe (TH). All Rights Reserved */ /* -** Time-stamp: +* Time-stamp: */ -/*** +/** NAME exc PURPOSE Helper functions for exceptions - NOTES + S not quite complete HISTORY liekweg - Mar 4, 2002: Created. diff --git a/ir/st/exc.h b/ir/st/exc.h index 60e795e80..f27066491 100644 --- a/ir/st/exc.h +++ b/ir/st/exc.h @@ -1,14 +1,14 @@ /* Copyright (c) 2002 by Universität Karlsruhe (TH). All Rights Reserved */ /* -** Time-stamp: +* Time-stamp: */ -/*** +/** NAME exc PURPOSE Helper functions for exceptions - NOTES + S not quite complete HISTORY liekweg - Mar 4, 2002: Created. diff --git a/ir/st/st.c b/ir/st/st.c index 7f3e8e6f5..259a8de80 100644 --- a/ir/st/st.c +++ b/ir/st/st.c @@ -1,14 +1,14 @@ /* Copyright (c) 2002 by Universität Karlsruhe (TH). All Rights Reserved */ /* -** Time-stamp: +* Time-stamp: */ -/*** +/** NAME st.h PURPOSE provide some auxilliary structures for firm graphs. - NOTES + S not quite complete HISTORY liekweg - Feb 26, 2002: Created. @@ -33,8 +33,8 @@ static dtree_t *last = 0; */ /* -------------------------------------------------------------------- -** Helper Functions -** -------------------------------------------------------------------- */ +* Helper Functions +* -------------------------------------------------------------------- */ /* Helper function for get_n_blocks */ @@ -127,8 +127,8 @@ static void free_dt (dt_t *dt) */ /* -------------------------------------------------------------------- -** Private Functions -** -------------------------------------------------------------------- */ +* Private Functions +* -------------------------------------------------------------------- */ /* Given a graph, find its dominator tree in the global list: @@ -398,8 +398,8 @@ static ir_node *_get_idom (dt_t *dt, ir_node *block) } /* -------------------------------------------------------------------- -** Public Functions -** -------------------------------------------------------------------- */ +* Public Functions +* -------------------------------------------------------------------- */ /* Say wether a dominates b diff --git a/ir/st/st.h b/ir/st/st.h index 15e6ce471..37e28943f 100644 --- a/ir/st/st.h +++ b/ir/st/st.h @@ -1,11 +1,11 @@ /* Copyright (c) 2002 by Universität Karlsruhe (TH). All Rights Reserved */ -/*** +/** NAME st.h PURPOSE provide some auxilliary structures for firm graphs. - NOTES + S not quite complete HISTORY liekweg - Feb 26, 2002: Created. diff --git a/ir/tr/entity.c b/ir/tr/entity.c index 6e305b41c..1c30d61bb 100644 --- a/ir/tr/entity.c +++ b/ir/tr/entity.c @@ -1,8 +1,8 @@ /* Copyright (C) 1998 - 2000 by Universitaet Karlsruhe -** All rights reserved. -** -** Authors: Martin Trapp, Christian Schaefer -** +* All rights reserved. +* +* Authors: Martin Trapp, Christian Schaefer +* */ /* $Id$ */ diff --git a/ir/tr/entity.h b/ir/tr/entity.h index e6c2cd2f4..c1476cbe3 100644 --- a/ir/tr/entity.h +++ b/ir/tr/entity.h @@ -1,46 +1,46 @@ /* -** Copyright (C) 1998 - 2000 by Universitaet Karlsruhe -** All rights reserved. -** -** Authors: Martin Trapp, Christian Schaefer, -** Goetz Lindenmaier -** -** entity.h: entities represent all program known objects. -** -** An entity is the representation of program known objects in Firm. -** The primary concept of entities is to represent members of complex -** types, i.e., fields and methods of classes. As not all programming -** language model all variables and methods as members of some class, -** the concept of entities is extended to cover also local and global -** variables, and arbitrary procedures. -** -** An entity always specifies the type of the object it represents and -** the type of the object it is a part of, the owner of the entity. -** Originally this is the type of the class of which the entity is a -** member. -** The owner of local variables is the procedure they are defined in. -** The owner of global variables and procedures visible in the whole -** program is a universally defined class type "GlobalType". The owner -** of procedures defined in the scope of an other procedure is the -** enclosing procedure. -** -** In detail the datastructure entity has the following fields: -** -** ident *name Name of this entity as specified in the source code. -** Only unequivocal in conjuction with scope. -** ident *ld_name Unique name of this entity, i.e., the mangled -** name. E.g., for a class `A' with field `a' this -** is the ident for `A_a'. -** type *type The type of this entity, e.g., a method type, a -** basic type of the language or a class itself. -** type *owner; The class this entity belongs to. In case of local -** variables the method they are defined in. -** int offset; Offset in byte for this entity. Fixed when layout -** of owner is determined. -** ir_graph *irg; If (type == method_type) this is the corresponding irg. -** The ir_graph constructor automatically sets this field. -** If (type != method_type) access of this field will cause -** an assertion. +* Copyright (C) 1998 - 2000 by Universitaet Karlsruhe +* All rights reserved. +* +* Authors: Martin Trapp, Christian Schaefer, +* Goetz Lindenmaier +* +* entity.h: entities represent all program known objects. +* +* An entity is the representation of program known objects in Firm. +* The primary concept of entities is to represent members of complex +* types, i.e., fields and methods of classes. As not all programming +* language model all variables and methods as members of some class, +* the concept of entities is extended to cover also local and global +* variables, and arbitrary procedures. +* +* An entity always specifies the type of the object it represents and +* the type of the object it is a part of, the owner of the entity. +* Originally this is the type of the class of which the entity is a +* member. +* The owner of local variables is the procedure they are defined in. +* The owner of global variables and procedures visible in the whole +* program is a universally defined class type "GlobalType". The owner +* of procedures defined in the scope of an other procedure is the +* enclosing procedure. +* +* In detail the datastructure entity has the following fields: +* +* ident *name Name of this entity as specified in the source code. +* Only unequivocal in conjuction with scope. +* ident *ld_name Unique name of this entity, i.e., the mangled +* name. E.g., for a class `A' with field `a' this +* is the ident for `A_a'. +* type *type The type of this entity, e.g., a method type, a +* basic type of the language or a class itself. +* type *owner; The class this entity belongs to. In case of local +* variables the method they are defined in. +* int offset; Offset in byte for this entity. Fixed when layout +* of owner is determined. +* ir_graph *irg; If (type == method_type) this is the corresponding irg. +* The ir_graph constructor automatically sets this field. +* If (type != method_type) access of this field will cause +* an assertion. */ /* $Id$ */ @@ -69,48 +69,43 @@ void init_entity (void); typedef struct ir_graph ir_graph; #endif -/****s* entity/entity +/** * - * NAME - * entity - An abstract data type to represent program entites. - * NOTE + * An abstract data type to represent program entites. * - * ATTRIBUTES - * owner A compound type this entity is a part of. - * type The type of this entity. - * name The string that represents this entity in the source program. - * allocation A flag saying whether the entity is dynamically or statically + * @param owner A compound type this entity is a part of. + * @param type The type of this entity. + * @param name The string that represents this entity in the source program. + * @param allocation A flag saying whether the entity is dynamically or statically * allocated (values: dynamic_allocated, static_allocated, * automatic_allocated). - * visibility A flag indicating the visibility of this entity (values: local, + * @param visibility A flag indicating the visibility of this entity (values: local, * external_visible, external_allocated) - * variability A flag indicating the variability of this entity (values: + * @param variability A flag indicating the variability of this entity (values: * uninitialized, initalized, part_constant, constant) - * volatility @@@ - * offset The offset of the entity within the compound object. Only set + * @param volatility @@@ + * @param offset The offset of the entity within the compound object. Only set * if the owner in the state "layout_fixed". - * overwrites A list of entities overwritten by this entity. This list is only + * @param overwrites A list of entities overwritten by this entity. This list is only * existent if the owner of this entity is a class. The members in * this list must be entities of super classes. - * overwrittenby A list of entities that overwrite this entity. This list is only + * @param overwrittenby A list of entities that overwrite this entity. This list is only * existent if the owner of this entity is a class. The members in * this list must be entities of sub classes. - * link A void* to associate some additional information with the entity. - * irg If the entity is a method this is the ir graph that represents the + * @param link A void* to associate some additional information with the entity. + * @param irg If the entity is a method this is the ir graph that represents the * code of the method. - * peculiarity The peculiarity of the entity. If the entity is a method this + * @param peculiarity The peculiarity of the entity. If the entity is a method this * indicates whether the entity represents * a real method or whether it only exists to describe an interface. * In that case there nowhere exists code for this entity and this entity * is never dynamically used in the code. * Values: description, existent. Default: existent. - * visited visited flag. Master flag is type_visited. + * @param visited visited flag. Master flag is type_visited. * - * These fields can only be accessed via access functions. + * @param These fields can only be accessed via access functions. * - * SEE ALSO - * type - * SOURCE + * @see type */ /* to resolve recursion between entity.h and type.h */ @@ -304,6 +299,5 @@ void set_entity_visited(entity *ent, unsigned long num); void mark_entity_visited(entity *ent); -/*****/ # endif /* _ENTITY_H_ */ diff --git a/ir/tr/entity_t.h b/ir/tr/entity_t.h index 0a8bfbe4a..906b1fb02 100644 --- a/ir/tr/entity_t.h +++ b/ir/tr/entity_t.h @@ -1,29 +1,29 @@ /*10 2002/03/19 13:08:33 -** Copyright (C) 1998 - 2000 by Universitaet Karlsruhe -** All rights reserved. -** -** Authors: Martin Trapp, Christian Schaefer, -** Goetz Lindenmaier -** -** entity.h: entities represent all program known objects. -** -** An entity is the representation of program known objects in Firm. -** The primary concept of entities is to represent members of complex -** types, i.e., fields and methods of classes. As not all programming -** language model all variables and methods as members of some class, -** the concept of entities is extended to cover also local and global -** variables, and arbitrary procedures. -** -** An entity always specifies the type of the object it represents and -** the type of the object it is a part of, the owner of the entity. -** Originally this is the type of the class of which the entity is a -** member. -** The owner of local variables is the procedure they are defined in. -** The owner of global variables and procedures visible in the whole -** program is a universally defined class type "GlobalType". The owner -** of procedures defined in the scope of an other procedure is the -** enclosing procedure. -** +* Copyright (C) 1998 - 2000 by Universitaet Karlsruhe +* All rights reserved. +* +* Authors: Martin Trapp, Christian Schaefer, +* Goetz Lindenmaier +* +* entity.h: entities represent all program known objects. +* +* An entity is the representation of program known objects in Firm. +* The primary concept of entities is to represent members of complex +* types, i.e., fields and methods of classes. As not all programming +* language model all variables and methods as members of some class, +* the concept of entities is extended to cover also local and global +* variables, and arbitrary procedures. +* +* An entity always specifies the type of the object it represents and +* the type of the object it is a part of, the owner of the entity. +* Originally this is the type of the class of which the entity is a +* member. +* The owner of local variables is the procedure they are defined in. +* The owner of global variables and procedures visible in the whole +* program is a universally defined class type "GlobalType". The owner +* of procedures defined in the scope of an other procedure is the +* enclosing procedure. +* */ /* $Id$ */ diff --git a/ir/tr/mangle.c b/ir/tr/mangle.c index bc903d609..453ea3695 100644 --- a/ir/tr/mangle.c +++ b/ir/tr/mangle.c @@ -1,8 +1,8 @@ /* Copyright (C) 1998 - 2000 by Universitaet Karlsruhe -** All rights reserved. -** -** Authors: Martin Trapp, Christian Schaefer -** +* All rights reserved. +* +* Authors: Martin Trapp, Christian Schaefer +* */ /* $Id$ */ diff --git a/ir/tr/mangle.h b/ir/tr/mangle.h index 189e6fb8b..bbf34446c 100644 --- a/ir/tr/mangle.h +++ b/ir/tr/mangle.h @@ -1,8 +1,8 @@ /* Copyright (C) 1998 - 2000 by Universitaet Karlsruhe -** All rights reserved. -** -** Authors: Martin Trapp, Christian Schaefer -** +* All rights reserved. +* +* Authors: Martin Trapp, Christian Schaefer +* */ /* $Id$ */ diff --git a/ir/tr/tpop.c b/ir/tr/tpop.c index 7aeb34f90..e9c4d4e56 100644 --- a/ir/tr/tpop.c +++ b/ir/tr/tpop.c @@ -1,8 +1,8 @@ /* Copyright (C) 2001 by Universitaet Karlsruhe -** All rights reserved. -** -** Authors: Goetz Lindenmaier -** +* All rights reserved. +* +* Authors: Goetz Lindenmaier +* */ /* $Id$ */ diff --git a/ir/tr/tpop.h b/ir/tr/tpop.h index 74ff4ef59..52c3b7012 100644 --- a/ir/tr/tpop.h +++ b/ir/tr/tpop.h @@ -6,28 +6,20 @@ #include "ident.h" -/****h* libfirm/tpop +/** * - * NAME * file tpop.h - * COPYRIGHT * (C) 2001 by Universitaet Karlsruhe - * AUTHORS * Goetz Lindenmaier - * NOTES * This module specifies the kinds of types available in firm. They are * called type opcodes. These include classes, structs, methods, unions, * arrays, enumerations, pointers and primitive types. - ***** */ -/****** tpop/typecode +/** * - * NAME - * typecode -- an enum for the type kinds - * PURPOSE + * - an enum for the type kinds * For each type kind exists a typecode to identify it. - * SOURCE */ typedef enum { tpo_class, @@ -40,206 +32,143 @@ typedef enum { tpo_primitive, tpo_id } tp_opcode; -/******/ -/****s* tpop/tp_op +/** * - * NAME - * tp_op - a structure containing information about a kind of type. - * PURPOSE + * a structure containing information about a kind of type. * A structure containing information about a kind of type. So far * this is only the kind name, an enum for case-switching and some * internal values. - * SEE ALSO - * get_tpop_name, get_tpop_code, get_tpop_ident - * SOURCE + * @see get_tpop_name, get_tpop_code, get_tpop_ident */ typedef struct tp_op tp_op; -/******/ -/****f* tpop/get_tpop_name +/** + * + * Returns the string for the type opcode. + * @param op - The type opcode to get the string from. + * @return a string. (@@@ Null terminated???) * - * NAME - * get_tpop_name - Returns the string for the type opcode. - * SYNOPSIS - * const char *get_tpop_name (tp_op *op) - * INPUTS - * op - The type opcode to get the string from. - * RESULT - * a string. (@@@ Null terminated???) - *** */ const char *get_tpop_name (tp_op *op); -/****f* tpop/get_tpop_code +/** + * + * Returns an enum for the type opcode. + * @param op - The type opcode to get the enum from. + * @return the enum. * - * NAME - * get_tpop_code - Returns an enum for the type opcode. - * SYNOPSIS - * tp_opcode get_tpop_code (tp_op *op); - * INPUTS - * op - The type opcode to get the enum from. - * RESULT - * the enum. - *** */ tp_opcode get_tpop_code (tp_op *op); -/****f* tpop/get_tpop_ident +/** + * + * Returns the ident for the type opcode. + * @param op - The type opcode to get the ident from. + * @return The ident. * - * NAME - * get_tpop_ident - Returns the ident for the type opcode. - * SYNOPSIS - * ident *get_tpop_ident (tp_op *op); - * INPUTS - * op - The type opcode to get the ident from. - * RESULT - * The ident. - *** */ ident *get_tpop_ident (tp_op *op); -/****d* tpop/type_class +/** + * * - * NAME - * type_class - - * PURPOSE * This type opcode marks that the corresponding type is a class type. * Consequently the type refers to supertypes, subtypes and entities. * Entities can be any fields, but also methods. * @@@ value class or not??? - * NOTES * This struct is dynamically allocated but constant for the lifetime * of the library. - * SOURCE */ extern tp_op *type_class; tp_op *get_type_class(); -/******/ -/****d* tpop/type_struct +/** * - * NAME * type_struct - * PURPOSE * This type opcode marks that the corresponding type is a compound type * as a struct in C. Consequently the type refers to a list of entities * which may not be methods (but pointers to methods). - * NOTES * This struct is dynamically allocated but constant for the lifetime * of the library. - * SOURCE */ extern tp_op *type_struct; tp_op *get_type_struct(); -/******/ -/****d* tpop/type_method +/** * - * NAME * type_method - * PURPOSE * This type opcode marks that the corresponding type is a method type. * Consequently it refers to a list of arguments and results. - * NOTES * This struct is dynamically allocated but constant for the lifetime * of the library. - * SOURCE */ extern tp_op *type_method; tp_op *get_type_method(); -/******/ -/****d* tpop/type_union +/** * - * NAME * type_union - * PURPOSE * This type opcode marks that the corresponding type is a union type. * Consequently it refers to a list of unioned types. - * NOTES * This struct is dynamically allocated but constant for the lifetime * of the library. - * SOURCE */ extern tp_op *type_union; tp_op *get_type_union(); -/******/ -/****d* tpop/type_array +/** * - * NAME * type_array - * PURPOSE * This type opcode marks that the corresponding type is an array type. * Consequently it contains a list of dimensions (lower and upper bounds) * and an element type. - * NOTES * This struct is dynamically allocated but constant for the lifetime * of the library. - * SOURCE */ extern tp_op *type_array; tp_op *get_type_array(); -/******/ -/****d* tpop/type_enumeration +/** * - * NAME * type_enumeration - * PURPOSE * This type opcode marks that the corresponding type is an enumeration type. * Consequently it contains a list of idents for the enumeration identifiers * and a list of tarbet values that are the constants used to implement * the enumerators. - * NOTES * This struct is dynamically allocated but constant for the lifetime * of the library. - * SOURCE */ extern tp_op *type_enumeration; tp_op *get_type_enumeration(); -/******/ -/****d* tpop/type_pointer +/** * - * NAME * type_pointer - * PURPOSE * This type opcode marks that the corresponding type is a pointer type. * It contains a reference to the type the pointer points to. - * NOTES * This struct is dynamically allocated but constant for the lifetime * of the library. - * SOURCE */ extern tp_op *type_pointer; tp_op *get_type_pointer(); -/******/ -/****d* tpop/type_primitive +/** * - * NAME * type_primitive - * PURPOSE * This type opcode marks that the corresponding type is a primitive type. * Primitive types are types that are directly mapped to target machine * modes. - * NOTES * This struct is dynamically allocated but constant for the lifetime * of the library. - * SOURCE */ extern tp_op *type_primitive; tp_op *get_type_primitive(); -/******/ -/****d* tpop/type_id +/** * - * NAME * type_id - * PURPOSE * This type opcode is an auxiliary opcode dedicated to support transformations * of the type structure. If a type is changed to another type with another * opcode the new type will be allocated with new memory. All nodes refering @@ -251,13 +180,10 @@ tp_op *get_type_primitive(); * type_id. Two types are exchanged by a call to exchange_types. * If a type_id is visible externally report this as bug. If it is assured that * this never happens this extern variable can be moved to tpop_t.h. - * NOTES * This struct is dynamically allocated but constant for the lifetime * of the library. - * SOURCE */ extern tp_op *type_id; tp_op *get_type_id(); -/******/ # endif /*_TYPEOP_H_ */ diff --git a/ir/tr/tpop_t.h b/ir/tr/tpop_t.h index be3cc7a38..afffb48d6 100644 --- a/ir/tr/tpop_t.h +++ b/ir/tr/tpop_t.h @@ -6,19 +6,13 @@ # include # include "tpop.h" -/****h* libfirm/tpop_t.h +/** * - * NAME * file tpop_t.h - * COPYRIGHT * (C) 2001 by Universitaet Karlsruhe - * AUTHORS * Goetz Lindenmaier - * NOTES * This file contains the datatypes hidden in tpop.h. - * SEE ALSO - * tpop.h - ***** + * @see tpop.h */ struct tp_op { @@ -27,61 +21,41 @@ struct tp_op { size_t attr_size; }; -/****f* tpop/new_tpop +/** * - * NAME - * new_tpop - Returns a new type opcode. - * NOTE + * Returns a new type opcode. * Allocates a new tp_op struct and initializes it's fields with * the passed values. This function is only to be used during * initialization of the library. - * SYNOPSIS - * tp_op * new_tpop (tp_opcode code, ident *name, size_t attr_size); - * INPUTS - * code - the enum for this type opcode. - * name - an ident for the name of the type opcode. - * attr_size - the size of the attributes necessary for a type with + * @param code - the enum for this type opcode. + * @param name - an ident for the name of the type opcode. + * @param attr_size - the size of the attributes necessary for a type with * this opcode - * RESULT - * A new type opcode. - *** + * @return A new type opcode. + * */ tp_op * new_tpop (tp_opcode code, ident *name, size_t attr_size); -/****f* tpop/new_tpop +/** * - * NAME - * init_tpop - Initialize the tpop module. - * NOTE + * Initialize the tpop module. * Must be called during the initizlization of the library. Allocates * opcodes and sets the globals that are external visible as specified * in tpop.h. - * SYNOPSIS - * void init_tpop (void); - * INPUTS - * RESULT - * SIDE EFFECTS * Allocates opcodes for classes, struct, method, union, array, * enumeration, pointer and primitive and sets the according values. - *** + * */ void init_tpop (void); -/****f* tpop/get_tpop_attr_size +/** * - * NAME - * get_tpop_attr_size - Returns the size of the attribute to this kind + * Returns the size of the attribute to this kind * of type. - * NOTE * Internal feature. - * SYNOPSIS - * int get_tpop_attr_size (tp_op *op) - * INPUTS - * op - The type opcode to get the size for. - * RESULT - * The size of the attribute of types with this opcode. - * SIDE EFFECTS - *** + * @param op - The type opcode to get the size for. + * @return The size of the attribute of types with this opcode. + * */ int get_tpop_attr_size (tp_op *op); diff --git a/ir/tr/type.c b/ir/tr/type.c index 9aaab6ad6..c47c13010 100644 --- a/ir/tr/type.c +++ b/ir/tr/type.c @@ -1,14 +1,10 @@ -/****h* libfirm/type.c +/** * - * NAME * file type.c - implementation of the datastructure to hold * type information. - * COPYRIGHT * (C) 2001 by Universitaet Karlsruhe - * AUTHORS * Martin Trapp, Christian Schaefer, Goetz Lindenmaier * - * NOTES * This module supplies a datastructure to represent all types * known in the compiled program. This includes types specified * in the program as well as types defined by the language. In the @@ -24,9 +20,7 @@ * on the level of the programming language, modes at the level of * the target processor. * - * SEE ALSO - * type_t.h type tpop - ***** + * @see type_t.h type tpop */ /* $Id$ */ @@ -819,7 +813,6 @@ bool is_method_type (type *method) { assert(method); if (method->type_op == type_method) return 1; else return 0; } -/*****/ /*******************************************************************/ /** TYPE_UNION **/ diff --git a/ir/tr/type.h b/ir/tr/type.h index 0ca9f587a..57249e3a1 100644 --- a/ir/tr/type.h +++ b/ir/tr/type.h @@ -1,13 +1,9 @@ -/****h* libfirm/type6 2002/03/19 13:08:33 +/** * - * NAME * file type.h - datastructure to hold type information. - * COPYRIGHT * (C) 2001 by Universitaet Karlsruhe - * AUTHORS * Goetz Lindenmaier * - * NOTES * This module supplies a datastructure to represent all types * known in the compiled program. This includes types specified * in the program as well as types defined by the language. In the @@ -23,9 +19,7 @@ * on the level of the programming language, modes at the level of * the target processor. * - * SEE ALSO - * tpop.h - ***** + * @see tpop.h */ /* $Id$ */ @@ -52,11 +46,9 @@ typedef struct entity entity; typedef struct ir_node ir_node; #endif -/****s* type/type +/** * - * NAME - * type - An abstract data type to represent types. - * NOTE + * An abstract data type to represent types. * This is the abstract data type with which any type known in the * compiled program can be represented. This includes types specified * in the program as well as types defined by the language. In the @@ -71,21 +63,20 @@ typedef struct ir_node ir_node; * The following describes the common attributes. They can only be * accessed by the functions given below. * - * ATTRIBUTES - * The common fields are: + * @param The common fields are: * - * firm_kind A firm_kind tag containing k_type. This is useful + * @param firm_kind A firm_kind tag containing k_type. This is useful * for dynamically checking whether a node is a type node. - * type_op A tp_op specifying the kind of the type. - * mode The mode to be used to represent the type on a machine. + * @param type_op A tp_op specifying the kind of the type. + * @param mode The mode to be used to represent the type on a machine. * @@@ maybe not global field?? - * name An identifier specifying the name of the type. To be + * @param name An identifier specifying the name of the type. To be * set by the frontend. - * size The size of the type, i.e. an entity of this type will + * @param size The size of the type, i.e. an entity of this type will * occupy size bytes in memory. In several cases this is * determined when fixing the layout of this type (class, * struct, union, array, enumeration). - * state The state of the type. The state represents whether the + * @param state The state of the type. The state represents whether the * layout of the type is undefined or fixed (values: layout_undefined * or layout_fixed). Compound types can have an undefined * layout. The layout of the basic types primitive and pointer @@ -94,16 +85,14 @@ typedef struct ir_node ir_node; * and the size of the type must be set. * A fixed layout for enumeration types means that each enumeration * is associated with an implementation value. - * visit A counter for walks of the type information. - * link A void* to associate some additional information with the type. + * @param visit A counter for walks of the type information. + * @param link A void* to associate some additional information with the type. * - * These fields can only be accessed via access functions. + * @param These fields can only be accessed via access functions. * - * Depending on the value of type_op, i.e., depending on the kind of the - * type the adt contains further attributes. These are documented below. - * SEE ALSO - * class, struct, method, union, array, enumeration, pointer, primitive - * SOURCE + * @param Depending on the value of type_op, i.e., depending on the kind of the + * @param type the adt contains further attributes. These are documented below. + * @see class, struct, method, union, array, enumeration, pointer, primitive */ #ifndef _TYPE_TYPEDEF_ #define _TYPE_TYPEDEF_ @@ -160,53 +149,37 @@ void mark_type_visited(type *tp); void* get_type_link(type *tp); void set_type_link(type *tp, void *l); -/*****/ -/****v* type/visited +/** * - * NAME - * type_visited - visited flag to traverse the type information - * PURPOSE + * visited flag to traverse the type information * Increase this flag by one before traversing the type information. * Mark type nodes as visited by set_type_visited(type, type_visited). * Check whether node was already visited by comparing get_type_visited(type) * and type_visited. * Or use the function to walk all types. - * SEE ALSO - * typewalk - * SOURCE + * @see typewalk */ extern unsigned long type_visited; void set_master_type_visited(unsigned long val); unsigned long get_master_type_visited(); void inc_master_type_visited(); -/*****/ - -/****f* type/is_type - * - * NAME - * is_type - Checks whether a pointer points to a type. - * SYNOPSIS - * bool is_type (void *thing); - * INPUTS - * thing - a pointer - * RESULT - * true if the thing is a type, else false - *** + +/** + * + * Checks whether a pointer points to a type. + * @param thing - a pointer + * @return true if the thing is a type, else false + * */ int is_type (void *thing); -/****f* type/equal_types - * - * NAME - * equal_type - Checks whether two types are structural equal. - * SYNOPSIS - * bool equal_types (type *typ1, type *typ2); - * INPUTS - * two pointer types - * RESULT - * true if the types are equal, else false. - * Types are equal if +/** + * + * Checks whether two types are structural equal. + * @param two pointer types + * @return true if the types are equal, else false. + * @return Types are equal if * - they are the same type kind * - they have the same name * - they have the same mode (if applicable) @@ -233,22 +206,17 @@ int is_type (void *thing); * This is to avoid endless recursions; with pointer types circlic * type graphs are possible.) * - *** + * */ bool equal_type(type *tpy1, type *typ2); -/****f* type/smaller_type - * - * NAME - * smaller_type - Checks whether two types are structural comparable. - * SYNOPSIS - * bool smaller_type (type *st, type *lt); - * INPUTS - * two pointer type - * RESULT - * true if type st is smaller than type lt, i.e. whenever - * lt is expected a st can be used. - * This is true if +/** + * + * Checks whether two types are structural comparable. + * @param two pointer type + * @return true if type st is smaller than type lt, i.e. whenever + * @return lt is expected a st can be used. + * @return This is true if * - they are the same type kind * - mode(st) < mode (lt) (if applicable) * - they are class types and st is (transitive) subtype of lt, @@ -260,45 +228,42 @@ bool equal_type(type *tpy1, type *typ2); * - the parameter types of st are smaller than those of lt, * - the result types of st are smaller than those of lt * - they are union types and have the members of st have exactly one - * counterpart in lt and the type is smaller + * @return counterpart in lt and the type is smaller * - they are array types and have * - the same number of dimensions * - all bounds of lt are bound of st * - the same dimension order * - the same element type - * or + * @return or * - the element type of st is smaller than that of lt * - the element types have the same size and fixed layout. * - they are enumeration types and have the same enumerator names * - they are pointer types and have the points_to type of st is - * smaller than the points_to type of lt. - *** + * @return smaller than the points_to type of lt. + * */ bool smaller_type (type *st, type *lt); -/****** type/class - * NAME +/** * Representation of a class type. - * NOTE * If the type opcode is set to type_class the type represents class * types. A list of fields and methods is associated with a class. * Further a class can inherit from and bequest to other classes. * @@@ value class??? - * ATTRIBUTES - * The following attributes are private to this type kind. - * member All entities belonging to this class. This are methode entities + * @param The following attributes are private to this type kind. + * @param member All entities belonging to this class. This are methode entities * which have type_method or fields that can have any of the * following type kinds: type_class, type_struct, type_union, * type_array, type_enumeration, type_pointer, type_primitive. * - * subtypes A list of direct subclasses. + * @param subtypes A list of direct subclasses. * - * supertypes A list of direct superclasses. + * @param supertypes A list of direct superclasses. * - * These are dynamic lists that can be grown with an "add_" function, - * but not shrinked. + * @param These are dynamic lists that can be grown with an "add_" function, + * @param but not shrinked. * - * peculiarity The peculiarity of this class. If the class is of peculiarity + * @param peculiarity The peculiarity of this class. If the class is of peculiarity * "description" it only is a description of requirememts to a class, * as, e.g., a Java interface. The class will never be allocated. * Peculiatity inherited is only possible for entities. An entity @@ -307,7 +272,6 @@ bool smaller_type (type *st, type *lt); * no value for irg. * Values: description, existent, inherited. Default: existent. * - * SOURCE */ /* create a new class type */ type *new_type_class (ident *name); @@ -392,16 +356,12 @@ int get_class_dfn (type *clss); bool is_class_type(type *clss); /* Returns true if low is subclass of high. */ bool is_subclass_of(type *low, type *high); -/*****/ -/****** type/struct - * NAME +/** * Representation of a struct type. - * NOTE * Type_strct represents aggregate types that consist of a list * of fields. - * ATTRIBUTES - * member All entities belonging to this class. This are the fields + * @param member All entities belonging to this class. This are the fields * that can have any of the following types: type_class, * type_struct, type_union, type_array, type_enumeration, * type_pointer, type_primitive. @@ -409,7 +369,6 @@ bool is_subclass_of(type *low, type *high); * but not shrinked. * This is a dynamic list that can be grown with an "add_" function, * but not shrinked. - * SOURCE */ /* create a new type struct */ type *new_type_struct (ident *name); @@ -425,34 +384,29 @@ void remove_struct_member (type *strct, entity *member); /* typecheck */ bool is_struct_type(type *strct); -/*****/ -/****** type/method - * NAME +/** * Representation of a method type. - * NOTE * A method type represents a method, function or procedure type. * It contains a list of the parameter and result types, as these * are part of the type description. These lists should not * be changed by a optimization, as a change creates a new method * type. Therefore optimizations should allocated new method types. * The set_ routines are only for construction by a frontend. - * ATTRIBUTES - * n_params Number of parameters to the procedure. + * @param n_params Number of parameters to the procedure. * A procedure in FIRM has only call by value parameters. * - * param_type A list with the types of parameters. This list is ordered. + * @param param_type A list with the types of parameters. This list is ordered. * The nth type in this list corresponds to the nth element * in the parameter tuple that is a result of the start node. * (See ircons.h for more information.) * - * n_res The number of results of the method. In general, procedures + * @param n_res The number of results of the method. In general, procedures * have zero results, functions one. * - * res_type A list with the types of parameters. This list is ordered. + * @param res_type A list with the types of parameters. This list is ordered. * The nth type in this list corresponds to the nth input to * Return nodes. (See ircons.h for more information.) - * SOURCE */ /* Create a new method type. @@ -473,19 +427,14 @@ void set_method_res_type(type *method, int pos, type* tp); /* typecheck */ bool is_method_type (type *method); -/*****/ -/****** type/union - * NAME +/** * Representation of a union type. - * NOTE * The union type represents union types. - * ATTRIBUTES - * n_types Number of unioned types. - * members Entities for unioned types. Fixed length array. + * @param n_types Number of unioned types. + * @param members Entities for unioned types. Fixed length array. * This is a dynamic list that can be grown with an "add_" function, * but not shrinked. - * SOURCE */ /* create a new type union */ type *new_type_union (ident *name); @@ -501,26 +450,21 @@ void remove_union_member (type *uni, entity *member); /* typecheck */ bool is_union_type (type *uni); -/*****/ -/****** type/array - * NAME +/** * Representation of an array type. - * NOTE * The array type represents rectangular multi dimensional arrays. * The constants representing the bounds must be allocated to * get_const_code_irg() by setting current_ir_graph accordingly. - * ATTRIBUTES - * n_dimensions Number of array dimensions. - * *lower_bound Lower bounds of dimensions. Usually all 0. - * *upper_bound Upper bounds or dimensions. - * *element_type The type of the array elements. - * *element_ent An entity for the array elements to be used for + * @param n_dimensions Number of array dimensions. + * @param *lower_bound Lower bounds of dimensions. Usually all 0. + * @param *upper_bound Upper bounds or dimensions. + * @param *element_type The type of the array elements. + * @param *element_ent An entity for the array elements to be used for * element selection with Sel. * @@@ Do we need several entities? One might want * to select a dimension and not a single element in * case of multidim arrays. - * SOURCE */ /* create a new type array -- Sets n_dimension to dimension and all dimension entries to NULL. @@ -557,22 +501,17 @@ entity *get_array_element_entity (type *array); /* typecheck */ bool is_array_type (type *array); -/*****/ -/****** type/enumeration - * NAME +/** * Representation of an enumeration type. - * NOTE * Enumeration types need not necessarily be represented explicitly * by Firm types, as the frontend can lower them to integer constants as * well. For debugging purposes or similar tasks this information is useful. - * ATTRIBUTES - * *enum The target values representing the constants used to + * @param *enum The target values representing the constants used to * represent individual enumerations. - * *enum_nameid Idents containing the source program name of the enumeration + * @param *enum_nameid Idents containing the source program name of the enumeration * constants * -***** */ /* create a new type enumeration -- set the enumerators independently */ type *new_type_enumeration (ident *name, int n_enums); @@ -590,16 +529,11 @@ const char *get_enumeration_name(type *enumeration, int pos); /* typecheck */ bool is_enumeration_type (type *enumeration); -/*****/ -/****** type/pointer - * NAME +/** * Representation of a pointer type. - * NOTE * Pointer types. - * ATTRIBUTES - * points_to The type of the entity this pointer points to. - * SOURCE + * @param points_to The type of the entity this pointer points to. */ /* Create a new type pointer */ type *new_type_pointer (ident *name, type *points_to); @@ -611,16 +545,12 @@ type *get_pointer_points_to_type (type *pointer); /* typecheck */ bool is_pointer_type (type *pointer); -/*****/ -/****** type/primitive - * NAME +/** * Representation of a primitive type. - * NOTE * Primitive types are types that represent indivisible data values that * map directly to modes. They don't have a private attribute. The * important information they carry is held in the common mode field. - * SOURCE */ /* create a new type primitive */ type *new_type_primitive (ident *name, ir_mode *mode); @@ -628,35 +558,24 @@ type *new_d_type_primitive (ident *name, ir_mode *mode, dbg_info* db); /* typecheck */ bool is_primitive_type (type *primitive); -/*****/ -/****f* type/is_atomic_type +/** + * + * Checks whether a type is atomic. + * @param tp - any type + * @return true if type is primitive, pointer or enumeration * - * NAME - * is_atomic_type - Checks whether a type is atomic. - * SYNOPSIS - * int is_atomic_type(type *tp); - * INPUTS - * tp - any type - * RESULT - * true if type is primitive, pointer or enumeration - *** */ int is_atomic_type(type *tp); -/****f* type/is_compound_type - * - * NAME - * is_compound_type - Checks whether a type is compound. - * SYNOPSIS - * int is_compound_type(type *tp) - * INPUTS - * tp - any type - * RESULT - * true if the type is class, structure, union or array type. - *** +/** + * + * Checks whether a type is compound. + * @param tp - any type + * @return true if the type is class, structure, union or array type. + * */ int is_compound_type(type *tp); diff --git a/ir/tr/type_or_entity.h b/ir/tr/type_or_entity.h index d232e1703..ef4a12f14 100644 --- a/ir/tr/type_or_entity.h +++ b/ir/tr/type_or_entity.h @@ -1,9 +1,9 @@ /* Copyright (C) 1998 - 2000 by Universitaet Karlsruhe -** All rights reserved. -** -** Author: Goetz Lindenmaier -** +* All rights reserved. +* +* Author: Goetz Lindenmaier +* */ /* $Id$ */ diff --git a/ir/tr/type_t.h b/ir/tr/type_t.h index 63949c991..c9e435e6b 100644 --- a/ir/tr/type_t.h +++ b/ir/tr/type_t.h @@ -6,19 +6,13 @@ # include "type.h" -/****h* libfirm/type_t.h +/** * - * NAME * file type_t.h - * COPYRIGHT * (C) 2001 by Universitaet Karlsruhe - * AUTHORS * Goetz Lindenmaier - * NOTES * This file contains the datatypes hidden in type.h. - * SEE ALSO - * type.h tpop_t.h tpop.h - ***** + * @see type.h tpop_t.h tpop.h */ typedef struct { @@ -114,20 +108,15 @@ struct type { entry in this struct! Varying size! */ }; -/****f* type_t.h/new_type +/** + * + * creates a new type representation + * @param type_op - the kind of this type. May not be type_id. + * @param mode - the mode to be used for this type, may be NULL + * @param name - an ident for the name of this type. + * @return a new type of the given type. The remaining private attributes are not + * @return initalized. The type is in state layout_undefined. * - * NAME - * new_type - creates a new type representation - * SYNOPSIS - * type *new_type(tp_op *type_op, ir_mode *mode, ident* name); - * INPUTS - * type_op - the kind of this type. May not be type_id. - * mode - the mode to be used for this type, may be NULL - * name - an ident for the name of this type. - * RESULT - * a new type of the given type. The remaining private attributes are not - * initalized. The type is in state layout_undefined. - *** */ INLINE type * new_type(tp_op *type_op, diff --git a/ir/tr/typegmod.c b/ir/tr/typegmod.c index a3cf5e1f4..bc4744a67 100644 --- a/ir/tr/typegmod.c +++ b/ir/tr/typegmod.c @@ -1,8 +1,8 @@ /* Copyright (C) 2001 by Universitaet Karlsruhe -** All rights reserved. -** -** Authors: Goetz Lindenmaier -** +* All rights reserved. +* +* Authors: Goetz Lindenmaier +* */ /* $Id$ */ diff --git a/ir/tr/typegmod.h b/ir/tr/typegmod.h index 9b862482e..22d8719c3 100644 --- a/ir/tr/typegmod.h +++ b/ir/tr/typegmod.h @@ -6,28 +6,18 @@ # include "type.h" -/****h* libfirm/typegmod +/** * - * NAME * file typegmod.h - * COPYRIGHT * (C) 2001 by Universitaet Karlsruhe - * AUTHORS * Goetz Lindenmaier - * NOTES * This module supplies routines that support changing the type graph. - ***** */ -/****f* tpop/exchange_types +/** * - * NAME - * exchange_types -- replaces one type by the other. - * SYNOPSIS - * void exchange_types(type *old_type, type *new_type); - * INPUTS - * The old type that shall be replaced by the new type. - * SIDE EFFECTS + * - replaces one type by the other. + * @param The old type that shall be replaced by the new type. * Old type is replaced by new_type. All references to old_type * now point to new_type. The memory for the old type is destroyed, * but still used. Therefore it is not freed. @@ -35,22 +25,17 @@ * An exception is the list of types in irp (irprog.h). * In the future there might be a routine to recover the memory, but * this will be at considerable runtime cost. - *** + * */ INLINE void exchange_types(type *old_type, type *new_type); -/****f* tpop/skip_tid +/** * - * NAME - * skip_tid -- skip id types until a useful type is reached. - * SYNOPSIS - * type *skip_tid(type *tp) - * INPUTS - * A type of arbitrary kind. - * RETURNS + * - skip id types until a useful type is reached. + * @param A type of arbitrary kind. * tp if it is not an id type. * If tp is an id type retruns the real type it stands for. - *** + * */ INLINE type *skip_tid(type *tp); diff --git a/ir/tr/typegmod_t.h b/ir/tr/typegmod_t.h index eb98428fc..6cf1416c4 100644 --- a/ir/tr/typegmod_t.h +++ b/ir/tr/typegmod_t.h @@ -6,17 +6,12 @@ # include "typegmod.h" -/****h* libfirm/typegmod +/** * - * NAME * file typegmod.h - * COPYRIGHT * (C) 2001 by Universitaet Karlsruhe - * AUTHORS * Goetz Lindenmaier - * NOTES * This module supplies routines that support changing the type graph. - ***** */ diff --git a/ir/tr/typewalk.c b/ir/tr/typewalk.c index f4207fb17..4e49fd957 100644 --- a/ir/tr/typewalk.c +++ b/ir/tr/typewalk.c @@ -1,12 +1,12 @@ /* Copyright (C) 1998 - 2000 by Universitaet Karlsruhe -** All rights reserved. -** -** Author: Goetz Lindenmaier -** -** traverse the type information. The walker walks the whole ir graph -** to find the distinct type trees in the type graph forest. -** - execute the pre function before recursion -** - execute the post function after recursion +* All rights reserved. +* +* Author: Goetz Lindenmaier +* +* traverse the type information. The walker walks the whole ir graph +* to find the distinct type trees in the type graph forest. +* - execute the pre function before recursion +* - execute the post function after recursion */ /* $Id$ */ diff --git a/ir/tr/typewalk.h b/ir/tr/typewalk.h index e9e1ebf80..26b951bfe 100644 --- a/ir/tr/typewalk.h +++ b/ir/tr/typewalk.h @@ -1,13 +1,13 @@ /* Copyright (C) 1998 - 2000 by Universitaet Karlsruhe -** All rights reserved. -** -** Author: Goetz Lindenmaier -** -** traverse the type information. The walker walks the whole ir graph -** to find the distinct type trees in the type graph forest. -** - execute the pre function before recursion -** - execute the post function after recursion +* All rights reserved. +* +* Author: Goetz Lindenmaier +* +* traverse the type information. The walker walks the whole ir graph +* to find the distinct type trees in the type graph forest. +* - execute the pre function before recursion +* - execute the post function after recursion */ /* $Id$ */ @@ -23,7 +23,7 @@ typedef void (type_walk_func)(type_or_ent *, void *); -/** Walks over all type information reachable from global roots. +/** Touches every type and entity in unspecified order. If new types/entities are created during the traversal these will be visited, too. **/ @@ -37,7 +37,7 @@ void type_walk_irg(ir_graph *irg, type_walk_func *post, void *env); -/** Walks over all type information reachable from global roots. +/** Touches every class in specified order: - first the super class - second the class itself @@ -49,7 +49,7 @@ void type_walk_super2sub(type_walk_func *pre, type_walk_func *post, void *env); -/** Walks over all type information reachable from global roots. +/** Touches every class in specified order: - first the super class - second the class itself diff --git a/testprograms/array-heap_example.c b/testprograms/array-heap_example.c index 9c07f244c..6acb446fa 100644 --- a/testprograms/array-heap_example.c +++ b/testprograms/array-heap_example.c @@ -1,9 +1,9 @@ /* Copyright (C) 1998 - 2000 by Universitaet Karlsruhe -** All rights reserved. -** -** Authors: Goetz Lindenmaier -** -** testprogram. +* All rights reserved. +* +* Authors: Goetz Lindenmaier +* +* testprogram. */ # include @@ -13,33 +13,33 @@ # include "irdump.h" # include "firm.h" -/** This example describes a possible representation of heap allocated -*** variables of imperative programs. -*** It constructs the IR for the following program: -*** -*** -*** main(): int -*** int *a[10]; -*** -*** a = malloc(sizeof(a[10])); -*** return (a[3]); -*** end; -*** -*** The array is placed on the heap. The pointer to the array that -*** is a local variable is represented as a dataflow edge. -*** There are two ways to model allocation to the heap in programs with -*** explicit memory allocation: -*** 1. Model the calls to malloc and free as simple procedure (of compiler -*** known procedures returning a pointer. This is the simpler way of -*** generating FIRM, but restricts the information that can be deduced -*** for the call. -*** 2. Insert an Alloc node. A later pass can lower this to the compiler -*** known function. This makes the allocation explicit in FIRM, supporting -*** optimization. -*** A problem is modeling free. There is no free node in FIRM. Is this -*** a necessary extension? -*** This example shows the second alternative, where the size of the array -*** is explicitly computed. +/** +* variables of imperative programs. +* It constructs the IR for the following program: +* +* +* main(): int +* int *a[10]; +* +* a = malloc(sizeof(a[10])); +* return (a[3]); +* end; +* +* The array is placed on the heap. The pointer to the array that +* is a local variable is represented as a dataflow edge. +* There are two ways to model allocation to the heap in programs with +* explicit memory allocation: +* 1. Model the calls to malloc and free as simple procedure (of compiler +* known procedures returning a pointer. This is the simpler way of +* generating FIRM, but restricts the information that can be deduced +* for the call. +* 2. Insert an Alloc node. A later pass can lower this to the compiler +* known function. This makes the allocation explicit in FIRM, supporting +* optimization. +* A problem is modeling free. There is no free node in FIRM. Is this +* a necessary extension? +* This example shows the second alternative, where the size of the array +* is explicitly computed. **/ #define OPTIMIZE_NODE 0 diff --git a/testprograms/array-stack_example.c b/testprograms/array-stack_example.c index 715354370..10ac2a4bf 100644 --- a/testprograms/array-stack_example.c +++ b/testprograms/array-stack_example.c @@ -1,9 +1,9 @@ /* Copyright (C) 1998 - 2000 by Universitaet Karlsruhe -** All rights reserved. -** -** Authors: Goetz Lindenmaier -** -** testprogram. +* All rights reserved. +* +* Authors: Goetz Lindenmaier +* +* testprogram. */ # include @@ -13,24 +13,24 @@ # include "irdump.h" # include "firm.h" -/** This example describes representation of stack allocated variables of -*** imperative programs. -*** It constructs the IR for the following program: -*** -*** -*** main(): int -*** int a[10]; -*** -*** return (a[3]); -*** end; -*** -*** The array is placed on the stack, i.e., a pointer to the array -*** is obtained by selecting the entity "a" from the stack. The variables -*** on the stack are considered to be entities of the method, as locals -*** of a method are only visible within the method. (An alternative to -*** make the method owner of the stack variables is to give the ownership -*** to the class representing the C-file. This would extend the visibility -*** of the locals, though.) +/** +* imperative programs. +* It constructs the IR for the following program: +* +* +* main(): int +* int a[10]; +* +* return (a[3]); +* end; +* +* The array is placed on the stack, i.e., a pointer to the array +* is obtained by selecting the entity "a" from the stack. The variables +* on the stack are considered to be entities of the method, as locals +* of a method are only visible within the method. (An alternative to +* make the method owner of the stack variables is to give the ownership +* to the class representing the C-file. This would extend the visibility +* of the locals, though.) **/ diff --git a/testprograms/call_str_example.c b/testprograms/call_str_example.c index b61bf2b4e..b1750e913 100644 --- a/testprograms/call_str_example.c +++ b/testprograms/call_str_example.c @@ -1,9 +1,9 @@ /* Copyright (C) 1998 - 2000 by Universitaet Karlsruhe -** All rights reserved. -** -** Authors: Christian Schaefer, Goetz Lindenmaier -** -** testprogram. +* All rights reserved. +* +* Authors: Christian Schaefer, Goetz Lindenmaier +* +* testprogram. */ # include @@ -14,13 +14,13 @@ # include "firm.h" /** -*** This file constructs the ir for the following pseudo-program: -*** -*** void f(char *); -*** -*** main() { -*** f("Hello world !"); -*** } +* This file constructs the ir for the following pseudo-program: +* +* void f(char *); +* +* main() { +* f("Hello world !"); +* } **/ int main(int argc, char **argv) diff --git a/testprograms/cond_example.c b/testprograms/cond_example.c index 5d1c73f06..2d9f0a1d7 100644 --- a/testprograms/cond_example.c +++ b/testprograms/cond_example.c @@ -1,9 +1,9 @@ /* Copyright (C) 1998 - 2000 by Universitaet Karlsruhe -** All rights reserved. -** -** Authors: Christian Schaefer, Goetz Lindenmaier -** -** testprogram. +* All rights reserved. +* +* Authors: Christian Schaefer, Goetz Lindenmaier +* +* testprogram. */ #include @@ -14,13 +14,13 @@ # include "firm.h" /** -*** This file constructs the ir for the following pseudo-program: -*** -*** main(int a) { -*** if ((a > 2) && (a < 10)) -*** { a = 1; } -*** -*** return a; +* This file constructs the ir for the following pseudo-program: +* +* main(int a) { +* if ((a > 2) && (a < 10)) +* { a = 1; } +* +* return a; **/ int main(int argc, char **argv) diff --git a/testprograms/const_ent_example.c b/testprograms/const_ent_example.c index f2e16d1a9..a0d8bb3e0 100644 --- a/testprograms/const_ent_example.c +++ b/testprograms/const_ent_example.c @@ -1,9 +1,9 @@ /* Copyright (C) 2000 by Universitaet Karlsruhe -** All rights reserved. -** -** Author: Goetz Lindenmaier -** -** testprogram. +* All rights reserved. +* +* Author: Goetz Lindenmaier +* +* testprogram. */ #include @@ -14,25 +14,25 @@ # include "firm.h" /** -*** This file constructs type information for constant entities. -*** -*** It constructs the information for a class type with a dispatch -*** table. The class has a field a, and two methods f and g. The -*** class is represented by a class type with two entities for the -*** field a and the reference to the dispatch table. This reference -*** is a constant entity. Ther dispatch table is also represented -*** by a class type that contains the two methods. There is one entity -*** of the dispatch table which is constant. -*** -*** Further the example shows the representation of a constant global -*** array. -*** -*** class C { -*** int a; -*** void f(); -*** void g(int); -*** } -*** int[4] arre = (7, 2, 13, 92); +* This file constructs type information for constant entities. +* +* It constructs the information for a class type with a dispatch +* table. The class has a field a, and two methods f and g. The +* class is represented by a class type with two entities for the +* field a and the reference to the dispatch table. This reference +* is a constant entity. Ther dispatch table is also represented +* by a class type that contains the two methods. There is one entity +* of the dispatch table which is constant. +* +* Further the example shows the representation of a constant global +* array. +* +* class C { +* int a; +* void f(); +* void g(int); +* } +* int[4] arre = (7, 2, 13, 92); **/ int main(int argc, char **argv) diff --git a/testprograms/const_eval_example.c b/testprograms/const_eval_example.c index 2bbe5b51c..14ac280f3 100644 --- a/testprograms/const_eval_example.c +++ b/testprograms/const_eval_example.c @@ -1,9 +1,9 @@ /* Copyright (C) 1998 - 2000 by Universitaet Karlsruhe -** All rights reserved. -** -** Authors: Christian Schaefer, Goetz Lindenmaier -** -** testprogram +* All rights reserved. +* +* Authors: Christian Schaefer, Goetz Lindenmaier +* +* testprogram */ #include @@ -14,16 +14,16 @@ # include "firm.h" /** -*** This file constructs the ir for the following pseudo-program: -*** -*** main() { -*** int c, d; -*** -*** c = 5 + 7; -*** d = 7 + 5; -*** -*** return (c, d); -*** } +* This file constructs the ir for the following pseudo-program: +* +* main() { +* int c, d; +* +* c = 5 + 7; +* d = 7 + 5; +* +* return (c, d); +* } **/ int diff --git a/testprograms/dead_block_example.c b/testprograms/dead_block_example.c index 966210678..bdbe69ad6 100644 --- a/testprograms/dead_block_example.c +++ b/testprograms/dead_block_example.c @@ -1,9 +1,9 @@ /* Copyright (C) 1998 - 2000 by Universitaet Karlsruhe -** All rights reserved. -** -** Authors: Christian Schaefer, Goetz Lindenmaier -** -** testprogram. +* All rights reserved. +* +* Authors: Christian Schaefer, Goetz Lindenmaier +* +* testprogram. */ # include @@ -18,30 +18,30 @@ */ /** -*** This file constructs a control flow of following shape: -*** -*** -*** firstBlock -*** / \ -*** / \ -*** |/_ _\| -*** Block1 Block2 deadBlock -*** \ | / -*** \ | / -*** _\| \ / |/_ -*** nextBlock -*** -*** -*** This is a program as, e.g., -*** -*** if () then -*** { Jmp label1; } // happens anyways -*** else -*** { Jmp label1; } // happens anyways -*** label1: -*** return(); -*** Jmp label1; -*** +* This file constructs a control flow of following shape: +* +* +* firstBlock +* / \ +* / \ +* |/_ _\| +* Block1 Block2 deadBlock +* \ | / +* \ | / +* _\| \ / |/_ +* nextBlock +* +* +* This is a program as, e.g., +* +* if () then +* { Jmp label1; } // happens anyways +* else +* { Jmp label1; } // happens anyways +* label1: +* return(); +* Jmp label1; +* **/ int main(int argc, char **argv) diff --git a/testprograms/empty.c b/testprograms/empty.c index 9672b898a..a08b20917 100644 --- a/testprograms/empty.c +++ b/testprograms/empty.c @@ -1,8 +1,8 @@ /* Copyright (C) 1998 - 2000 by Universitaet Karlsruhe -** All rights reserved. -** -** Authors: Christian Schaefer, Goetz Lindenmaier -** +* All rights reserved. +* +* Authors: Christian Schaefer, Goetz Lindenmaier +* */ # include @@ -13,15 +13,15 @@ # include "firm.h" /** -*** An empty Firm program. -*** -*** This file constructs the ir for the following pseudo-program: -*** -*** main() { -*** return; -*** } -*** -*** +* An empty Firm program. +* +* This file constructs the ir for the following pseudo-program: +* +* main() { +* return; +* } +* +* **/ int main(int argc, char **argv) diff --git a/testprograms/endless_loop.c b/testprograms/endless_loop.c index 4d2d7fb0b..661395ee7 100644 --- a/testprograms/endless_loop.c +++ b/testprograms/endless_loop.c @@ -1,9 +1,9 @@ /* (C) 2002 by Universitaet Karlsruhe -** All rights reserved. -** -** Authors: Goetz Lindenmaier -** -** testprogram. +* All rights reserved. +* +* Authors: Goetz Lindenmaier +* +* testprogram. */ /* $ID$ */ @@ -16,23 +16,23 @@ # include "firm.h" /** -*** This file constructs the ir for the following pseudo-program: -*** -*** VAR_A is some extern variable. -*** -*** main(int a) { // pos 0 -*** int b = 1; // pos 1 -*** int h; // pos 2 -*** -*** while (0 == 0) loop { -*** h = a; -*** a = b; -*** b = h; -*** VAR_A = b; -*** } -*** -*** return a-b; -*** } +* This file constructs the ir for the following pseudo-program: +* +* VAR_A is some extern variable. +* +* main(int a) { // pos 0 +* int b = 1; // pos 1 +* int h; // pos 2 +* +* while (0 == 0) loop { +* h = a; +* a = b; +* b = h; +* VAR_A = b; +* } +* +* return a-b; +* } **/ int diff --git a/testprograms/float_example.c b/testprograms/float_example.c index c8cf6f0bd..783ada129 100644 --- a/testprograms/float_example.c +++ b/testprograms/float_example.c @@ -1,8 +1,8 @@ /* Copyright (C) 1998 - 2000 by Universitaet Karlsruhe -** All rights reserved. -** -** Authors: Christian Schaefer, Goetz Lindenmaier -** +* All rights reserved. +* +* Authors: Christian Schaefer, Goetz Lindenmaier +* */ # include @@ -13,15 +13,15 @@ # include "firm.h" /** -*** An Firm program to test float values. -*** -*** This file constructs the ir for the following pseudo-program: -*** -*** main() { -*** ... -*** } -*** -*** +* An Firm program to test float values. +* +* This file constructs the ir for the following pseudo-program: +* +* main() { +* ... +* } +* +* **/ int main(int argc, char **argv) diff --git a/testprograms/global_cse.c b/testprograms/global_cse.c index d81b393e6..025a8e32c 100644 --- a/testprograms/global_cse.c +++ b/testprograms/global_cse.c @@ -1,9 +1,9 @@ /* Copyright (C) 2002 by Universitaet Karlsruhe -** All rights reserved. -** -** Authors: Christian Schaefer, Goetz Lindenmaier -** -** testprogram. +* All rights reserved. +* +* Authors: Christian Schaefer, Goetz Lindenmaier +* +* testprogram. */ /* $Id$ */ @@ -16,18 +16,18 @@ # include "firm.h" /** -*** This file constructs the ir for the following pseudo-program: -*** -*** int main(int a) { -*** int b = 2; -*** if ( a == b ) { -*** a := a - 3; -*** } else { -*** a := a - 3; -*** a := a + 5; -*** } -*** return a; -*** } +* This file constructs the ir for the following pseudo-program: +* +* int main(int a) { +* int b = 2; +* if ( a == b ) { +* a := a - 3; +* } else { +* a := a - 3; +* a := a + 5; +* } +* return a; +* } **/ int diff --git a/testprograms/global_var_example.c b/testprograms/global_var_example.c index 503f1ea1b..5c8a346e3 100644 --- a/testprograms/global_var_example.c +++ b/testprograms/global_var_example.c @@ -1,10 +1,10 @@ /* Copyright (C) 1998 - 2000 by Universitaet Karlsruhe -** All rights reserved. -** -** Authors: Goetz Lindenmaier -** -** testprogram. -** +* All rights reserved. +* +* Authors: Goetz Lindenmaier +* +* testprogram. +* */ # include @@ -19,15 +19,15 @@ */ /** -*** This program shows how to build ir for global variables. -*** It constructs the ir for the following pseudo-program: -*** -*** int i; -*** -*** main() { -*** i = 2; -*** return; -*** } +* This program shows how to build ir for global variables. +* It constructs the ir for the following pseudo-program: +* +* int i; +* +* main() { +* i = 2; +* return; +* } **/ int main(int argc, char **argv) diff --git a/testprograms/if_else_example.c b/testprograms/if_else_example.c index fd1345296..1b4c70bc8 100644 --- a/testprograms/if_else_example.c +++ b/testprograms/if_else_example.c @@ -1,9 +1,9 @@ /* Copyright (C) 1998 - 2000 by Universitaet Karlsruhe -** All rights reserved. -** -** Authors: Christian Schaefer, Goetz Lindenmaier -** -** testprogram. +* All rights reserved. +* +* Authors: Christian Schaefer, Goetz Lindenmaier +* +* testprogram. */ # include @@ -18,18 +18,18 @@ */ /** -*** This file constructs the ir for the following pseudo-program: -*** -*** main() { -*** int a = 0; -*** int b = 1; -*** -*** if (a > 2) -*** { a = b; } -*** else -*** { b = 2; } -*** -*** return a, b; +* This file constructs the ir for the following pseudo-program: +* +* main() { +* int a = 0; +* int b = 1; +* +* if (a > 2) +* { a = b; } +* else +* { b = 2; } +* +* return a, b; **/ int main(int argc, char **argv) diff --git a/testprograms/if_example.c b/testprograms/if_example.c index daf1b9cff..86d5e66d1 100644 --- a/testprograms/if_example.c +++ b/testprograms/if_example.c @@ -1,9 +1,9 @@ /* Copyright (C) 1998 - 2000 by Universitaet Karlsruhe -** All rights reserved. -** -** Authors: Christian Schaefer, Goetz Lindenmaier -** -** testprogram. +* All rights reserved. +* +* Authors: Christian Schaefer, Goetz Lindenmaier +* +* testprogram. */ # include @@ -14,15 +14,15 @@ # include "firm.h" /** -*** This file constructs the ir for the following pseudo-program: -*** -*** int main(int a) { -*** int b = 2; -*** if ( a == b ) -*** { a := a - 3; } -*** -*** return a; -*** } +* This file constructs the ir for the following pseudo-program: +* +* int main(int a) { +* int b = 2; +* if ( a == b ) +* { a := a - 3; } +* +* return a; +* } **/ int diff --git a/testprograms/if_while_example.c b/testprograms/if_while_example.c index ad423a900..e5b62bd62 100644 --- a/testprograms/if_while_example.c +++ b/testprograms/if_while_example.c @@ -1,9 +1,9 @@ /* (C) 1998 - 2000 by Universitaet Karlsruhe -** All rights reserved. -** -** Authors: Christian Schaefer, Goetz Lindenmaier -** -** testprogram. +* All rights reserved. +* +* Authors: Christian Schaefer, Goetz Lindenmaier +* +* testprogram. */ # include @@ -14,24 +14,24 @@ # include "firm.h" /** -*** This file constructs the ir for the following pseudo-program: -*** -*** main() { -*** int a = 0; // pos 0 -*** int b = 1; // pos 1 -*** int h; // pos 2 -*** -*** if (0 == 0) -*** { a = 2; } -*** -*** while (0 == 0) loop { -*** h = a; -*** a = b; -*** b = h; -*** } -*** -*** return a-b; -*** } +* This file constructs the ir for the following pseudo-program: +* +* main() { +* int a = 0; // pos 0 +* int b = 1; // pos 1 +* int h; // pos 2 +* +* if (0 == 0) +* { a = 2; } +* +* while (0 == 0) loop { +* h = a; +* a = b; +* b = h; +* } +* +* return a-b; +* } **/ int diff --git a/testprograms/inheritance_example.c b/testprograms/inheritance_example.c index 561ae165c..03bdc2700 100644 --- a/testprograms/inheritance_example.c +++ b/testprograms/inheritance_example.c @@ -1,9 +1,9 @@ /* Copyright (C) 2000 by Universitaet Karlsruhe -** All rights reserved. -** -** Author: Goetz Lindenmaier -** -** testprogram. +* All rights reserved. +* +* Author: Goetz Lindenmaier +* +* testprogram. */ # include @@ -14,27 +14,27 @@ # include "firm.h" /** -*** This file constructs type information for the following pseudo-program. -*** The procedure code is not constructed. -*** -*** interface I { -*** void m1 (void); -*** } -*** -*** class C implements I { -*** void m1 (void) {return}; -*** void m2 (int) {return 0}; -*** } -*** -*** class D { -*** int b; -*** } -*** -*** class E extends C, D { -*** void m2 (int) {return 1}; -*** int a; -*** } -*** +* This file constructs type information for the following pseudo-program. +* The procedure code is not constructed. +* +* interface I { +* void m1 (void); +* } +* +* class C implements I { +* void m1 (void) {return}; +* void m2 (int) {return 0}; +* } +* +* class D { +* int b; +* } +* +* class E extends C, D { +* void m2 (int) {return 1}; +* int a; +* } +* **/ int main(int argc, char **argv) diff --git a/testprograms/irr_cf_example.c b/testprograms/irr_cf_example.c index 691aba7c2..e40d9ace2 100644 --- a/testprograms/irr_cf_example.c +++ b/testprograms/irr_cf_example.c @@ -1,9 +1,9 @@ /* Copyright (C) 1998 - 2000 by Universitaet Karlsruhe -** All rights reserved. -** -** Authors: Christian Schaefer, Goetz Lindenmaier -** -** testprogram. +* All rights reserved. +* +* Authors: Christian Schaefer, Goetz Lindenmaier +* +* testprogram. */ # include @@ -18,31 +18,31 @@ */ /** -*** This file constructs a control flow of following shape: -*** -*** StartBlock -*** | -*** \|/ -*** Block ---> Block -*** | | -*** \|/ \|/ -*** Block ---> Block -*** | | -*** \|/ \|/ -*** Block ---> Block -*** | -*** \|/ -*** EndBlock -*** -*** This is a program as, e.g., -*** -*** switch (expr){ -*** case 1: -*** case 2: -*** break; -*** default: -*** } -*** return +* This file constructs a control flow of following shape: +* +* StartBlock +* | +* \|/ +* Block ---> Block +* | | +* \|/ \|/ +* Block ---> Block +* | | +* \|/ \|/ +* Block ---> Block +* | +* \|/ +* EndBlock +* +* This is a program as, e.g., +* +* switch (expr){ +* case 1: +* case 2: +* break; +* default: +* } +* return **/ int main(int argc, char **argv) diff --git a/testprograms/irr_loop_example.c b/testprograms/irr_loop_example.c index 485881e37..8509c37f8 100644 --- a/testprograms/irr_loop_example.c +++ b/testprograms/irr_loop_example.c @@ -1,9 +1,9 @@ /* Copyright (C) 1998 - 2000 by Universitaet Karlsruhe -** All rights reserved. -** -** Authors: Christian Schaefer, Goetz Lindenmaier -** -** testprogram. +* All rights reserved. +* +* Authors: Christian Schaefer, Goetz Lindenmaier +* +* testprogram. */ # include @@ -18,22 +18,22 @@ */ /** -*** This file constructs a control flow of following shape: -*** -*** -*** firstBlock -*** / \ -*** / \ -*** |/_ _\| -*** ----> -*** LoopBlock1 LoopBlock2 -*** <---- -*** \ / -*** \ / -*** _\| |/_ -*** nextBlock -*** -*** +* This file constructs a control flow of following shape: +* +* +* firstBlock +* / \ +* / \ +* |/_ _\| +* ----> +* LoopBlock1 LoopBlock2 +* <---- +* \ / +* \ / +* _\| |/_ +* nextBlock +* +* **/ int main(int argc, char **argv) diff --git a/testprograms/memory_example.c b/testprograms/memory_example.c index c56ef8f66..00497660e 100644 --- a/testprograms/memory_example.c +++ b/testprograms/memory_example.c @@ -1,9 +1,9 @@ /* Copyright (C) 1998 - 2000 by Universitaet Karlsruhe -** All rights reserved. -** -** Authors: Christian Schaefer, Goetz Lindenmaier -** -** testprogram. +* All rights reserved. +* +* Authors: Christian Schaefer, Goetz Lindenmaier +* +* testprogram. */ @@ -14,44 +14,44 @@ # include "irdump.h" # include "firm.h" -/** This example demonstrates the use of memory edges. -*** This file constructs the ir for the following pseudo-program: -*** -*** int VAR_A -*** int VAR_B -*** -*** main() { -*** -*** VAR_A = 0 -*** VAR_B = 1 -*** -*** repeat { -*** h = VAR_A; -*** VAR_A = VAR_B; -*** VAR_B = h; -*** } until (0 == h) -*** -*** return (VAR_A) -*** } -*** -*** -*** A better example would be the following program: -*** (name e.g.: memory-imp_example.c as it models imperative concepts.) -*** -*** In this program a local variable is dereferenced. It has -*** to be modeled as an entity of the stack so that a pointer to it is available. -*** It is also an example where an analysis could find out that the -*** pointer is never actually used. -*** -*** main () { -*** int a; -*** int *p; -*** -*** a = 2; -*** p = &a; -*** return (*p); -*** } -*** +/** +* This file constructs the ir for the following pseudo-program: +* +* int VAR_A +* int VAR_B +* +* main() { +* +* VAR_A = 0 +* VAR_B = 1 +* +* repeat { +* h = VAR_A; +* VAR_A = VAR_B; +* VAR_B = h; +* } until (0 == h) +* +* return (VAR_A) +* } +* +* +* A better example would be the following program: +* (name e.g.: memory-imp_example.c as it models imperative concepts.) +* +* In this program a local variable is dereferenced. It has +* to be modeled as an entity of the stack so that a pointer to it is available. +* It is also an example where an analysis could find out that the +* pointer is never actually used. +* +* main () { +* int a; +* int *p; +* +* a = 2; +* p = &a; +* return (*p); +* } +* **/ int diff --git a/testprograms/oo_inline_example.c b/testprograms/oo_inline_example.c index 69bdb2531..9d4d38079 100644 --- a/testprograms/oo_inline_example.c +++ b/testprograms/oo_inline_example.c @@ -1,9 +1,9 @@ /* Copyright (C)2002 by Universitaet Karlsruhe -** All rights reserved. -** -** Authors: Goetz Lindenmaier -** -** testprogram. +* All rights reserved. +* +* Authors: Goetz Lindenmaier +* +* testprogram. */ /* $ID$ */ @@ -16,28 +16,28 @@ # include "irdump.h" # include "firm.h" -/** This file constructs the IR for the following program: -*** @@@ this is no more correct ... -*** class PRIMA { -*** a: int; -*** -*** int c(d: int) { -*** return (d + self.a); -*** } -*** -*** void set_a(e:int) { -*** self.a = e; -*** } -*** -*** } -*** -*** int main() { -*** o: PRIMA; -*** o = new PRIMA; -*** o.set_a(2); -*** return o.c(5); -*** }; -*** +/** +* @@@ this is no more correct ... +* class PRIMA { +* a: int; +* +* int c(d: int) { +* return (d + self.a); +* } +* +* void set_a(e:int) { +* self.a = e; +* } +* +* } +* +* int main() { +* o: PRIMA; +* o = new PRIMA; +* o.set_a(2); +* return o.c(5); +* }; +* **/ int diff --git a/testprograms/oo_program_example.c b/testprograms/oo_program_example.c index 8339fa130..e20660ce4 100644 --- a/testprograms/oo_program_example.c +++ b/testprograms/oo_program_example.c @@ -1,9 +1,9 @@ /* Copyright (C) 1998 - 2000 by Universitaet Karlsruhe -** All rights reserved. -** -** Authors: Goetz Lindenmaier -** -** testprogram. +* All rights reserved. +* +* Authors: Goetz Lindenmaier +* +* testprogram. */ # include @@ -13,28 +13,28 @@ # include "irdump.h" # include "firm.h" -/** This file constructs the IR for the following program: -*** -*** class PRIMA { -*** a: int; -*** -*** int c(d: int) { -*** return (d + self.a); -*** } -*** -*** void set_a(e:int) { -*** self.a = e; -*** } -*** -*** } -*** -*** int main() { -*** o: PRIMA; -*** o = new PRIMA; -*** o.set_a(2); -*** return o.c(5); -*** }; -*** +/** +* +* class PRIMA { +* a: int; +* +* int c(d: int) { +* return (d + self.a); +* } +* +* void set_a(e:int) { +* self.a = e; +* } +* +* } +* +* int main() { +* o: PRIMA; +* o = new PRIMA; +* o.set_a(2); +* return o.c(5); +* }; +* **/ int diff --git a/testprograms/three_cfpred_example.c b/testprograms/three_cfpred_example.c index 4702029f9..c4618d718 100644 --- a/testprograms/three_cfpred_example.c +++ b/testprograms/three_cfpred_example.c @@ -1,9 +1,9 @@ /* Copyright (C) 1998 - 2000 by Universitaet Karlsruhe -** All rights reserved. -** -** Authors: Christian Schaefer, Goetz Lindenmaier -** -** testprogram. +* All rights reserved. +* +* Authors: Christian Schaefer, Goetz Lindenmaier +* +* testprogram. */ # include @@ -18,34 +18,34 @@ */ /** -*** This file constructs a control flow of following shape: -*** -*** -*** firstCondBlock -*** / \ -*** / \ -*** |/_ _\| -*** Block1 scnCondBlock -*** | | | -*** | | | -*** | \ / \ / -*** | Block2 Block3 -*** \ | / -*** \ | / -*** _\| \ / |/_ -*** nextBlock -*** -*** -*** This is a program as, e.g., -*** -*** if () then -*** { Jmp label1; } // happens anyways -*** else -*** { Jmp label1; } // happens anyways -*** label1: -*** return(); -*** Jmp label1; -*** +* This file constructs a control flow of following shape: +* +* +* firstCondBlock +* / \ +* / \ +* |/_ _\| +* Block1 scnCondBlock +* | | | +* | | | +* | \ / \ / +* | Block2 Block3 +* \ | / +* \ | / +* _\| \ / |/_ +* nextBlock +* +* +* This is a program as, e.g., +* +* if () then +* { Jmp label1; } // happens anyways +* else +* { Jmp label1; } // happens anyways +* label1: +* return(); +* Jmp label1; +* **/ int main(int argc, char **argv) diff --git a/testprograms/while_example.c b/testprograms/while_example.c index f31406f3b..69d2bdfb1 100644 --- a/testprograms/while_example.c +++ b/testprograms/while_example.c @@ -1,9 +1,9 @@ /* Copyright (C) 2001 by Universitaet Karlsruhe -** All rights reserved. -** -** Authors: Goetz Lindenmaier -** -** testprogram. +* All rights reserved. +* +* Authors: Goetz Lindenmaier +* +* testprogram. */ # include @@ -14,20 +14,20 @@ # include "firm.h" /** -*** This file constructs the ir for the following pseudo-program: -*** -*** main(int a) { // pos 0 -*** int b = 1; // pos 1 -*** int h; // pos 2 -*** -*** while (0 == 2) loop { -*** h = a; -*** a = b; -*** b = h; -*** } -*** -*** return a-b; -*** } +* This file constructs the ir for the following pseudo-program: +* +* main(int a) { // pos 0 +* int b = 1; // pos 1 +* int h; // pos 2 +* +* while (0 == 2) loop { +* h = a; +* a = b; +* b = h; +* } +* +* return a-b; +* } **/ int