Commit 6023590e authored by Michael Beck's avatar Michael Beck
Browse files

Converted comments to doxygen

[r738]
parent 456c65ce
/* Copyright (C) 2002 by Universitaet Karlsruhe
* All rights reserved.
*/
/**
* @file irouts.h
*
* Implements Def-Use edges, also called outedges.
*
* Authors: Goetz Lindenmaier
* @author Goetz Lindenmaier
*
* irouts.h: Implements Def-Use edges, also called outedges.
* @@@ eventually add reverse conrtol flow graph. (If needed.)
* @todo eventually add reverse conrtol flow graph. (If needed.)
*/
/* $Id$ */
......@@ -15,55 +20,60 @@
# include "irgraph.h"
# include "irnode.h"
/**********************************************************************/
/** Accessing the out datastructures. **/
/** These routines only work properly if the ir_graph is in state **/
/** outs_consistent or outs_inconsistent. **/
/**********************************************************************/
/*------------------------------------------------------------------*/
/* Accessing the out datastructures. */
/* These routines only work properly if the ir_graph is in state */
/* outs_consistent or outs_inconsistent. */
/*------------------------------------------------------------------*/
/* To iterate through the successors iterate from 0 to i < get_irn_outs(). No
/** To iterate through the successors iterate from 0 to i < get_irn_outs(). No
order of successors guaranteed. Will return edges from block to floating
nodes even if irgraph is in state "floats". */
/* returns the number of successors of the node: */
int get_irn_n_outs (ir_node *node);
/* Access predecessor n */
/** Get predecessor n */
INLINE ir_node *get_irn_out (ir_node *node, int pos);
/** Set predecessor n */
INLINE void set_irn_out (ir_node *node, int pos, ir_node *out);
/* Methods to iterate through the control flow graph. Iterate from 0 to
i < get_Block_cfg_outs(block). No order of successors guaranteed. */
int get_Block_n_cfg_outs (ir_node *node);
/* Access predecessor n. */
/** Access predecessor n. */
INLINE ir_node *get_Block_cfg_out (ir_node *node, int pos);
#ifndef _IRG_WALK_FUNC_TYPEDEF_
#define _IRG_WALK_FUNC_TYPEDEF_
typedef void (irg_walk_func)(ir_node *, void *);
/** The type of the walk function */
typedef void irg_walk_func(ir_node *, void *);
#endif
/* Walks over the graph starting at node. Walks also if graph is in state
/** Walks over the graph starting at node. Walks also if graph is in state
"outs_inconsistent". Assumes current_ir_graph is set properly. */
void irg_out_walk(ir_node *node,
irg_walk_func *pre, irg_walk_func *post,
void *env);
/* Walks only over Block nodes in the graph. Has it's own visited
/** Walks only over Block nodes in the graph. Has it's own visited
flag, so that it can be interleaved with the other walker.
node must be either op_Block or mode_X. */
void irg_out_block_walk(ir_node *node,
irg_walk_func *pre, irg_walk_func *post,
void *env);
/**********************************************************************/
/* Building and Removing the out datasturcture **/
/**********************************************************************/
/*------------------------------------------------------------------*/
/* Building and Removing the out datasturcture */
/*------------------------------------------------------------------*/
/* Computes the out edges. Sets a flag in irg to "outs_consistent". If the
/** Computes the out edges. Sets a flag in irg to "outs_consistent". If the
graph is changed this flag must be set to "outs_inconsistent". Computes
out edges from block to floating nodes even if graph is in state
"floats". Optimizes Tuple nodes. */
void compute_outs(ir_graph *irg);
/* Frees the out datastructures. Sets the flag in irg to "no_outs". */
/** Frees the out datastructures. Sets the flag in irg to "no_outs". */
void free_outs(ir_graph *irg);
#endif /* _IROUTS_H_ */
/* Copyright (C) 1998 - 2000 by Universitaet Karlsruhe
* All rights reserved.
*
* Authors: Martin Trapp, Christian Schaefer,
* Goetz Lindenmaier
*
* ircons.h ir node construction
*/
/* $Id$ */
/**
* 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,
constructor then adds all Proj nodes and returns the pointer
to the Proj node that selects the result of the arithmetic operation.
Maybe hide the exception region in a global variable, especially if
it is always unambiguous.
**/
@todo
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,
constructor then adds all Proj nodes and returns the pointer
to the Proj node that selects the result of the arithmetic operation.
-# Maybe hide the exception region in a global variable, especially if
it is always unambiguous.
*/
/**
* @file ircons.h
*
* ir node construction.
*
* file ircons.h
* @author Martin Trapp, Christian Schaefer, Goetz Lindenmaier
*
* This file documents all datatypes and constructors needed to
* build a FIRM representation of a pocedure. The constructors are
......@@ -1075,9 +1072,9 @@
# include "type.h"
# include "dbginfo.h"
/***************************************************************************/
/*-------------------------------------------------------------------------*/
/* The raw interface */
/***************************************************************************/
/*-------------------------------------------------------------------------*/
/* Constructs a Block with a fixed number of predecessors.
Does not set current_block. Can not be used with automatic
......@@ -1167,9 +1164,9 @@ ir_node *new_rd_Break (dbg_info *db, ir_graph *irg, ir_node *block);
ir_node *new_rd_Filter (dbg_info *db, ir_graph *irg, ir_node *block, ir_node *arg,
ir_mode *mode, long proj);
/***************************************************************************/
/*-------------------------------------------------------------------------*/
/* The raw interface without debug support */
/***************************************************************************/
/*-------------------------------------------------------------------------*/
/* Constructs a Block with a fixed number of predecessors.
Does not set current_block. Can not be used with automatic
......@@ -1259,11 +1256,11 @@ ir_node *new_r_Break (ir_graph *irg, ir_node *block);
ir_node *new_r_Filter (ir_graph *irg, ir_node *block, ir_node *arg,
ir_mode *mode, long proj);
/*************************************************************************/
/*-----------------------------------------------------------------------*/
/* The block oriented interface */
/*************************************************************************/
/*-----------------------------------------------------------------------*/
/* Sets the current block in which the following constructors place the
/** Sets the current block in which the following constructors place the
nodes they construct. */
void switch_block (ir_node *target);
......@@ -1325,9 +1322,9 @@ ir_node *new_d_EndExcept(dbg_info *db);
ir_node *new_d_Break (dbg_info *db);
ir_node *new_d_Filter (dbg_info *db, ir_node *arg, ir_mode *mode, long proj);
/*************************************************************************/
/*-----------------------------------------------------------------------*/
/* The block oriented interface without debug support */
/*************************************************************************/
/*-----------------------------------------------------------------------*/
/* Needed from the interfase with debug support:
void switch_block (ir_node *target); */
......@@ -1389,61 +1386,59 @@ ir_node *new_Id (ir_node *val, ir_mode *mode);
ir_node *new_Bad (void);
ir_node *new_Unknown(void);
/***********************************************************************/
/*---------------------------------------------------------------------*/
/* The comfortable interface. */
/* Supports automatic Phi node construction. */
/* All routines of the block oriented interface except new_Block are */
/* needed also. */
/***********************************************************************/
/*---------------------------------------------------------------------*/
/** Block construction **/
/* --- Block construction --- */
/* immature Block without predecessors */
ir_node *new_d_immBlock (dbg_info* db);
ir_node *new_immBlock (void);
/* Add a control flow edge to an immature block. */
/** Add a control flow edge to an immature block. */
void add_in_edge (ir_node *immblock, ir_node *jmp);
/* fixes the number of predecessors of a block. */
/** fixes the number of predecessors of a block. */
void mature_block (ir_node *block);
/** Parameter administration **/
/* --- Parameter administration --- */
/* Read a value from the array with the local variables. Use this
function to obtain the last definition of the value associated with
pos. Pos may not exceed the value passed as n_loc to new_ir_graph. */
ir_node *get_d_value (dbg_info* db, int pos, ir_mode *mode);
ir_node *get_value (int pos, ir_mode *mode);
/* Write a value in the array with the local variables. Use this function
/** Write a value in the array with the local variables. Use this function
to remember a new definition of the value associated with pos. Pos may
not exceed the value passed as n_loc to new_ir_graph. */
void set_value (int pos, ir_node *value);
/* Read a store.
/** Read a store.
Use this function to get the most recent version of the store (type M).
Internally it does the same as get_value. */
ir_node *get_store (void);
/* Write a store. */
/** Write a store. */
void set_store (ir_node *store);
/* keep this node alive even if End is not control-reachable from it */
/** keep this node alive even if End is not control-reachable from it */
void keep_alive (ir_node *ka);
/** Useful access routines **/
/* Returns the current block of the current graph. To set the current
/* --- Useful access routines --- */
/** Returns the current block of the current graph. To set the current
block use switch_block(). */
ir_node *get_cur_block();
/* Returns the frame type of the current graph */
/** Returns the frame type of the current graph */
type *get_cur_frame_type();
/***********************************************************************/
/* initialize and finalize ir construction */
/***********************************************************************/
/* --- initialize and finalize ir construction --- */
/* Puts the graph into state "phase_high" */
/** Puts the graph into state "phase_high" */
void finalize_cons (ir_graph *irg);
......
/* $Id$ */
/**
* @file irmode_t.h
*/
# ifndef _IRMODE_T_H_
# define _IRMODE_T_H_
......
/* Copyright (C) 1998 - 2000 by Universitaet Karlsruhe
* All rights reserved.
*
* Authors: Martin Trapp, Christian Schaefer
*/
/**
* @file iropt.h
*
* Declarations for optimizations intertwined with IR construction.
*
* @author Martin Trapp, Christian Schaefer
*/
/* $Id$ */
......
/* Copyright (C) 1998 - 2000 by Universitaet Karlsruhe
* All rights reserved.
*
* Authors: Martin Trapp, Christian Schaefer
*/
/**
* @file iropt_t.h
*
* Declarations for optimizations intertwined with IR construction.
*
* @author Martin Trapp, Christian Schaefer
*/
/* $Id$ */
......@@ -16,10 +20,13 @@
ir_node *equivalent_node (ir_node *n);
/* For cse */
/*@{*/
/** For cse */
pset *new_identities (void);
void del_identities (pset *value_table);
void add_identities (pset *value_table, ir_node *node);
/*@}*/
ir_node *optimize_node (ir_node *n);
......
/* Copyright (C) 2000 by Universitaet Karlsruhe
* All rights reserved.
*/
/**
* @file irprog.h
*
* Authors: Goetz Lindenmaier
* ir representation of a program.
*
* irprog.h: ir representation of a program
* @author Goetz Lindenmaier
*
* This file defines a construct that keeps all information about a
* program:
......@@ -24,78 +28,77 @@
# include "type.h"
/**
*
* NAME Datastructure that holds central information about a program
*
* Preliminary documentation ;-)
*
*/
/**
*
* NAME Datastructure that holds central information about a program
* Datastructure that holds central information about a program
*
* Preliminary documentation ;-)
*
* 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
* we must replace this by a list.)
* irg List of all ir graphs in the program.
* type A list containing all types known to the translated program.
* Some types can have several entries in this list (as a result of
* using exchange_types()).
* glob_type The unique global type that is owner of all global entities.
* - 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
* we must replace this by a list.)
* - irg List of all ir graphs in the program.
* - type A list containing all types known to the translated program.
* Some types can have several entries in this list (as a result of
* using exchange_types()).
* - glob_type The unique global type that is owner of all global entities.
*
*/
typedef struct ir_prog ir_prog;
/* A variable from where everything in the ir can be accessed. */
/** A variable from where everything in the ir can be accessed. */
extern ir_prog *irp;
ir_prog *get_irp();
/* initializes ir_prog. Calls the constructor for an ir_prog. */
/**
* Returns the access points from where everything in the ir can be accessed.
*
* @see irp
*/
ir_prog *get_irp(void);
/** initializes ir_prog. Calls the constructor for an ir_prog. */
void init_irprog(void);
/* Creates a new ir_prog, returns it and sets irp with it.
Automatically called by init_firm through init_irprog. */
/** Creates a new ir_prog, returns it and sets irp with it.
Automatically called by init_firm() through init_irprog. */
ir_prog *new_ir_prog (void);
/* Access the main routine of the compiled program. */
ir_graph *get_irp_main_irg();
/** Gets the main routine of the compiled program. */
ir_graph *get_irp_main_irg(void);
/** Sets the main routine of the compiled program. */
void set_irp_main_irg(ir_graph *main_irg);
/* Adds irg to the list of ir graphs in irp. */
/** Adds irg to the list of ir graphs in irp. */
void add_irp_irg(ir_graph *irg);
/* Removes irg from the list of irgs, deallocates it and
/** Removes irg from the list of irgs, deallocates it and
shrinks the list by one. */
void remove_irp_irg(ir_graph *irg);
int get_irp_n_irgs();
int get_irp_n_irgs(void);
ir_graph *get_irp_irg(int pos);
void set_irp_irg(int pos, ir_graph *irg);
/* Adds type to the list of types in irp. */
/** Adds type to the list of types in irp. */
void add_irp_type(type *typ);
/* Removes type from the list of types, deallocates it and
shrinks the list by one. */
void remove_irp_type(type *typ);
int get_irp_n_types();
int get_irp_n_types(void);
type *get_irp_type(int pos);
void set_irp_type(int pos, type *typ);
/** Functions to access the fields of ir_prog **/
/* --- Functions to access the fields of ir_prog --- */
type *get_glob_type(void);
/**
*
* Returns an irgraph that only contains constant
*
* expressions for constant entities.
* 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
* expressions may not contain control flow. See also copy_const_code()
* in entity.h.
*/
ir_graph *get_const_code_irg();
ir_graph *get_const_code_irg(void);
#endif /* ifndef _IRPROG_H_ */
/* $Id$ */
/**
* @file irprog_t.h
*/
# ifndef _IRPROG_T_H_
# define _IRPROG_T_H_
#include "irprog.h"
#include "firm_common_t.h"
/** ir_prog */
struct ir_prog {
firm_kind kind;
ir_graph *main_irg; /* entry point to the compiled program */
/* or a list, in case we compile a library or the like? */
ir_graph **graphs; /* all graphs in the ir */
type *glob_type; /* global type. Must be a class as it can
ir_graph *main_irg; /**< entry point to the compiled program
or a list, in case we compile a library or the like? */
ir_graph **graphs; /**< all graphs in the ir */
type *glob_type; /**< global type. Must be a class as it can
have fields and procedures. */
type **types; /* all types in the ir */
ir_graph *const_code_irg; /* This ir graph gives the proper environment
type **types; /**< all types in the ir */
ir_graph *const_code_irg; /**< This ir graph gives the proper environment
to allocate nodes the represent values
of constant entities. It is not meant as
a procedure. */
......@@ -23,15 +28,15 @@ struct ir_prog {
entities on an obstack, too? */
#ifdef DEBUG_libfirm
long max_node_nr; /* to generate unique numbers for nodes. */
long max_node_nr; /**< to generate unique numbers for nodes. */
#endif
};
INLINE void remove_irp_type_from_list (type *typ);
#ifdef DEBUG_libfirm
/* Returns a new, unique number to number nodes or the like. */
int get_irp_new_node_nr();
/** Returns a new, unique number to number nodes or the like. */
int get_irp_new_node_nr(void);
#endif
#endif /* ifndef _IRPROG_T_H_ */
/* Copyright (C) 1998 - 2000 by Universitaet Karlsruhe
* All rights reserved.
*/
/**
* @file irgraph.h
*
* Author: Christian Schaefer
* ir graph verification.
*
* irgraph.h: ir graph verification
* @author Christian Schaefer
*/
/* $Id$ */
......@@ -14,11 +18,11 @@
# include "irnode.h"
# include "irgraph.h"
/* Tests the modes of chechnode and its predecessors.
/** Tests the modes of chechnode and its predecessors.
Checknode must be in current_ir_graph. */
void irn_vrfy (struct ir_node *checknode);
/* Calls irn_vrfy for each node in irg.
/** Calls irn_vrfy for each node in irg.
Graph must be in state "pinned".*/
void irg_vrfy (ir_graph *irg);
......
......@@ -8,9 +8,11 @@
# include "typegmod.h"
/**
* @file typegmod.h
* Goetz Lindenmaier
* @file typegmod_t.h
*
* This module supplies routines that support changing the type graph.
*
* @author Goetz Lindenmaier
*/
......
/* Declarations for Target Values.
Copyright (C) 1995, 1996 Christian von Roques */
/**
* @file tv_t.h
*
* @author Christian von Roques
*/
/* $Id$ */
#ifndef _TV_T_H_
......@@ -11,7 +17,7 @@
int tarval_print (XP_PAR1, const xprintf_info *, XP_PARN);
/* Hash function on tarvals */
/** Hash function on tarvals */
unsigned tarval_hash (tarval *);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment