From: Christian Würdig Date: Mon, 30 Apr 2007 11:44:51 +0000 (+0000) Subject: unified main comments X-Git-Url: http://nsz.repo.hu/git/?a=commitdiff_plain;h=8cb8fe7d9d69a9bd06365823d5d5f68d051f6db0;p=libfirm unified main comments unified .h include guards fixed include structure (every files includes needed headers) [r13560] --- diff --git a/ir/be/ia32/bearch_ia32.c b/ir/be/ia32/bearch_ia32.c index 93e306ec3..4de058f00 100644 --- a/ir/be/ia32/bearch_ia32.c +++ b/ir/be/ia32/bearch_ia32.c @@ -18,9 +18,10 @@ */ /** - * This is the main ia32 firm backend driver. - * @author Christian Wuerdig - * $Id$ + * @file + * @brief This is the main ia32 firm backend driver. + * @author Christian Wuerdig + * @version $Id$ */ #ifdef HAVE_CONFIG_H #include "config.h" diff --git a/ir/be/ia32/bearch_ia32_t.h b/ir/be/ia32/bearch_ia32_t.h index c07faef19..7bb058c1b 100644 --- a/ir/be/ia32/bearch_ia32_t.h +++ b/ir/be/ia32/bearch_ia32_t.h @@ -17,8 +17,14 @@ * PURPOSE. */ -#ifndef _BEARCH_IA32_T_H_ -#define _BEARCH_IA32_T_H_ +/** + * @file + * @brief This is the main ia32 firm backend driver. + * @author Christian Wuerdig + * @version $Id$ + */ +#ifndef FIRM_BE_IA32_BEARCH_IA32_T_H +#define FIRM_BE_IA32_BEARCH_IA32_T_H #include "firm_config.h" @@ -34,7 +40,7 @@ #ifdef NDEBUG #define SET_IA32_ORIG_NODE(n, o) -#else +#else /* ! NDEBUG */ #define SET_IA32_ORIG_NODE(n, o) set_ia32_orig_node(n, o); #endif /* NDEBUG */ @@ -223,4 +229,4 @@ ir_entity *ia32_create_intrinsic_fkt(ir_type *method, const ir_op *op, const ir_mode *imode, const ir_mode *omode, void *context); -#endif /* _BEARCH_IA32_T_H_ */ +#endif /* FIRM_BE_IA32_BEARCH_IA32_T_H */ diff --git a/ir/be/ia32/ia32_dbg_stat.h b/ir/be/ia32/ia32_dbg_stat.h index 3e15159fd..e8dc90290 100644 --- a/ir/be/ia32/ia32_dbg_stat.h +++ b/ir/be/ia32/ia32_dbg_stat.h @@ -18,12 +18,13 @@ */ /** - * This file contains macros to update ia32 firm statistics - * @author Christian Wuerdig - * $Id$ + * @file + * @brief This file contains macros to update ia32 firm statistics. + * @author Christian Wuerdig + * @version $Id$ */ -#ifndef _IA32_DBG_STAT_H_ -#define _IA32_DBG_STAT_H_ +#ifndef FIRM_BE_IA32_IA32_DBG_STAT_H +#define FIRM_BE_IA32_IA32_DBG_STAT_H #include "irhooks.h" #include "dbginfo_t.h" @@ -229,4 +230,4 @@ __dbg_info_merge_pair(nadd, lea, dbg_backend); \ } while(0) -#endif /* _IA32_DBG_STAT_H_ */ +#endif /* FIRM_BE_IA32_IA32_DBG_STAT_H */ diff --git a/ir/be/ia32/ia32_emitter.c b/ir/be/ia32/ia32_emitter.c index 48e9fef9a..7264bb45e 100644 --- a/ir/be/ia32/ia32_emitter.c +++ b/ir/be/ia32/ia32_emitter.c @@ -19,9 +19,9 @@ /** * @file - * @brief This file implements the node emitter. - * @author Christian Wuerdig, Matthias Braun - * @version $Id$ + * @brief This file implements the ia32 node emitter. + * @author Christian Wuerdig, Matthias Braun + * @version $Id$ */ #ifdef HAVE_CONFIG_H #include "config.h" diff --git a/ir/be/ia32/ia32_emitter.h b/ir/be/ia32/ia32_emitter.h index bfefd8f6b..83e7ee187 100644 --- a/ir/be/ia32/ia32_emitter.h +++ b/ir/be/ia32/ia32_emitter.h @@ -18,18 +18,17 @@ */ /** - * Header file for ia32 emitter, containing some function definitions and types. - * @author Christian Wuerdig, Matthias Braun - * $Id$ + * @file + * @brief This file implements the ia32 node emitter. + * @author Christian Wuerdig, Matthias Braun + * @version $Id$ */ -#ifndef _IA32_EMITTER_H_ -#define _IA32_EMITTER_H_ +#ifndef FIRM_BE_IA32_IA32_EMITTER_H +#define FIRM_BE_IA32_IA32_EMITTER_H -#include "irargs_t.h" #include "irnode.h" -#include "debug.h" -#include "../bearch_t.h" +#include "../bearch.h" #include "../beemitter.h" #include "bearch_ia32_t.h" @@ -58,4 +57,4 @@ void ia32_emit_x87_binop(ia32_emit_env_t *env, const ir_node *node); void ia32_gen_routine(ia32_code_gen_t *cg, ir_graph *irg); -#endif /* _IA32_EMITTER_H_ */ +#endif /* FIRM_BE_IA32_IA32_EMITTER_H */ diff --git a/ir/be/ia32/ia32_finish.h b/ir/be/ia32/ia32_finish.h index 93a430647..a99a9310c 100644 --- a/ir/be/ia32/ia32_finish.h +++ b/ir/be/ia32/ia32_finish.h @@ -18,19 +18,22 @@ */ /** - * Function prototypes for irg finishing. - * @author Christian Wuerdig - * $Id$ + * @file + * @brief This file implements functions to finalize the irg for emit. + * @author Christian Wuerdig + * @version $Id$ */ +#ifndef FIRM_BE_IA32_IA32_FINISH_H +#define FIRM_BE_IA32_IA32_FINISH_H -#ifndef _IA32_FINISH_H_ -#define _IA32_FINISH_H_ +#include "irgraph.h" +#include "bearch_ia32_t.h" /** - * Check 2-Addesscode constraints and call peephole optimizations. + * Check 2-Addresscode constraints and call peephole optimizations. * @param irg The irg to finish * @param cg The codegenerator object for the irg */ void ia32_finish_irg(ir_graph *irg, ia32_code_gen_t *cg); -#endif /* _IA32_FINISH_H_ */ +#endif /* FIRM_BE_IA32_IA32_FINISH_H */ diff --git a/ir/be/ia32/ia32_fpu.h b/ir/be/ia32/ia32_fpu.h index 3b96fa05f..c0f6db042 100644 --- a/ir/be/ia32/ia32_fpu.h +++ b/ir/be/ia32/ia32_fpu.h @@ -23,8 +23,8 @@ * @author Matthias Braun * @version $Id$ */ -#ifndef FIRM_BE_IA32_FPU_H -#define FIRM_BE_IA32_FPU_H +#ifndef FIRM_BE_IA32_IA32_FPU_H +#define FIRM_BE_IA32_IA32_FPU_H #include "bearch_ia32_t.h" @@ -33,4 +33,4 @@ */ void ia32_setup_fpu_mode(ia32_code_gen_t *cg); -#endif +#endif /* FIRM_BE_IA32_IA32_FPU_H */ diff --git a/ir/be/ia32/ia32_intrinsics.c b/ir/be/ia32/ia32_intrinsics.c index 83802fc5b..eb541cd7d 100644 --- a/ir/be/ia32/ia32_intrinsics.c +++ b/ir/be/ia32/ia32_intrinsics.c @@ -18,12 +18,12 @@ */ /** - * This file implements the mapping of 64Bit intrinsic functions to - * code or library calls. - * @author Michael Beck - * $Id$ + * @file + * @brief This file implements the mapping of 64Bit intrinsic + * functions to code or library calls. + * @author Michael Beck + * @version $Id$ */ - #ifdef HAVE_CONFIG_H #include "config.h" #endif diff --git a/ir/be/ia32/ia32_map_regs.c b/ir/be/ia32/ia32_map_regs.c index 2f574cdf0..765ce9f6a 100644 --- a/ir/be/ia32/ia32_map_regs.c +++ b/ir/be/ia32/ia32_map_regs.c @@ -18,10 +18,10 @@ */ /** - * Register mapping for firm nodes. Stolen from bearch_firm :) - * Calculate requirements for register parameter. - * @author Christian Wuerdig - * $Id$ + * @file + * @brief Register param constraints and some other register handling tools. + * @author Christian Wuerdig + * @version $Id$ */ #ifdef HAVE_CONFIG_H #include "config.h" diff --git a/ir/be/ia32/ia32_map_regs.h b/ir/be/ia32/ia32_map_regs.h index 2b53befe7..ef3034f74 100644 --- a/ir/be/ia32/ia32_map_regs.h +++ b/ir/be/ia32/ia32_map_regs.h @@ -18,19 +18,19 @@ */ /** - * General reqister mapping stuff. - * @author Christian Wuerdig - * $Id$ + * @file + * @brief Register param constraints and some other register handling tools. + * @author Christian Wuerdig + * @version $Id$ */ - -#ifndef _IA32_MAP_REGS_H_ -#define _IA32_MAP_REGS_H_ +#ifndef FIRM_BE_IA32_IA32_MAP_REGS_H +#define FIRM_BE_IA32_IA32_MAP_REGS_H #include "irnode.h" +#include "irmode.h" #include "set.h" #include "../bearch_t.h" -#include "ia32_nodes_attr.h" /** * Convenience macro to check if register out<\code> @@ -95,4 +95,4 @@ int ia32_get_n_regparam_class(int n, ir_mode **modes, int *n_int, int *n_float); */ const arch_register_t *ia32_get_RegParam_reg(int n, ir_mode **modes, long nr, unsigned cc); -#endif /* _IA32_MAP_REGS_H_ */ +#endif /* FIRM_BE_IA32_IA32_MAP_REGS_H */ diff --git a/ir/be/ia32/ia32_new_nodes.c b/ir/be/ia32/ia32_new_nodes.c index 35820ae8e..1d09b41b6 100644 --- a/ir/be/ia32/ia32_new_nodes.c +++ b/ir/be/ia32/ia32_new_nodes.c @@ -18,10 +18,13 @@ */ /** + * @file + * @brief Handling of ia32 specific firm opcodes. + * @author Christian Wuerdig + * @version $Id$ + * * This file implements the creation of the achitecture specific firm opcodes * and the coresponding node constructors for the ia32 assembler irg. - * @author Christian Wuerdig - * $Id$ */ #ifdef HAVE_CONFIG_H #include "config.h" diff --git a/ir/be/ia32/ia32_new_nodes.h b/ir/be/ia32/ia32_new_nodes.h index d2ce07d33..052712375 100644 --- a/ir/be/ia32/ia32_new_nodes.h +++ b/ir/be/ia32/ia32_new_nodes.h @@ -18,13 +18,16 @@ */ /** - * Function prototypes for the assembler ir node constructors. - * @author Christian Wuerdig - * $Id$ + * @file + * @brief Handling of ia32 specific firm opcodes. + * @author Christian Wuerdig + * @version $Id$ + * + * This file implements the creation of the achitecture specific firm opcodes + * and the coresponding node constructors for the ia32 assembler irg. */ - -#ifndef _IA32_NEW_NODES_H_ -#define _IA32_NEW_NODES_H_ +#ifndef FIRM_BE_IA32_IA32_NEW_NODES_H +#define FIRM_BE_IA32_IA32_NEW_NODES_H #include "firm_config.h" #include "ia32_nodes_attr.h" @@ -486,4 +489,4 @@ void ia32_register_copy_attr_func(void); /* Include the generated headers */ #include "gen_ia32_new_nodes.h" -#endif /* _IA32_NEW_NODES_H_ */ +#endif /* FIRM_BE_IA32_IA32_NEW_NODES_H */ diff --git a/ir/be/ia32/ia32_nodes_attr.h b/ir/be/ia32/ia32_nodes_attr.h index bcfc5ab7d..0a80d0663 100644 --- a/ir/be/ia32/ia32_nodes_attr.h +++ b/ir/be/ia32/ia32_nodes_attr.h @@ -18,13 +18,13 @@ */ /** - * Type definitions for ia32 node attributes. - * @author Christian Wuerdig - * $Id$ + * @file + * @brief Type definitions for ia32 node attributes. + * @author Christian Wuerdig + * @version $Id$ */ - -#ifndef _IA32_NODES_ATTR_H_ -#define _IA32_NODES_ATTR_H_ +#ifndef FIRM_BE_IA32_IA32_NODES_ATTR_H +#define FIRM_BE_IA32_IA32_NODES_ATTR_H #include "firm_config.h" @@ -148,4 +148,4 @@ typedef struct _ia32_attr_t { const arch_register_t *slots[1]; /**< register slots for assigned registers */ } ia32_attr_t; -#endif /* _IA32_NODES_ATTR_H_ */ +#endif /* FIRM_BE_IA32_IA32_NODES_ATTR_H */ diff --git a/ir/be/ia32/ia32_optimize.c b/ir/be/ia32/ia32_optimize.c index 068e9db62..4fa5caf4c 100644 --- a/ir/be/ia32/ia32_optimize.c +++ b/ir/be/ia32/ia32_optimize.c @@ -18,13 +18,10 @@ */ /** - * Project: libFIRM - * File name: ir/be/ia32/ia32_optimize.c - * Purpose: Implements several optimizations for IA32 - * Author: Christian Wuerdig - * CVS-ID: $Id$ - * Copyright: (c) 2006 Universitaet Karlsruhe - * Licence: This file protected by GPL - GNU GENERAL PUBLIC LICENSE. + * @file + * @brief Implements several optimizations for IA32. + * @author Christian Wuerdig + * @version $Id$ */ #ifdef HAVE_CONFIG_H #include "config.h" diff --git a/ir/be/ia32/ia32_optimize.h b/ir/be/ia32/ia32_optimize.h index 990bd897b..09bd1774d 100644 --- a/ir/be/ia32/ia32_optimize.h +++ b/ir/be/ia32/ia32_optimize.h @@ -18,13 +18,16 @@ */ /** - * Function prototypes for ia32 optimizations - * @author Christian Wuerdig - * $Id$ + * @file + * @brief Implements several optimizations for IA32. + * @author Christian Wuerdig + * @version $Id$ */ +#ifndef FIRM_BE_IA32_IA32_OPTIMIZE_H +#define FIRM_BE_IA32_IA32_OPTIMIZE_H -#ifndef _IA32_OPTIMIZE_H_ -#define _IA32_OPTIMIZE_H_ +#include "irgraph.h" +#include "bearch_ia32_t.h" /** * Prepares irg for codegeneration. Places consts and transform reference mode @@ -44,4 +47,4 @@ void ia32_optimize_addressmode(ia32_code_gen_t *cg); */ void ia32_peephole_optimization(ir_graph *irg, ia32_code_gen_t *cg); -#endif /* _IA32_OPTIMIZE_H_ */ +#endif /* FIRM_BE_IA32_IA32_OPTIMIZE_H */ diff --git a/ir/be/ia32/ia32_transform.c b/ir/be/ia32/ia32_transform.c index 706ee830c..f098cd528 100644 --- a/ir/be/ia32/ia32_transform.c +++ b/ir/be/ia32/ia32_transform.c @@ -18,9 +18,10 @@ */ /** - * This file implements the IR transformation from firm into ia32-Firm. - * @author Christian Wuerdig - * $Id$ + * @file + * @brief This file implements the IR transformation from firm into ia32-Firm. + * @author Christian Wuerdig, Matthias Braun + * @version $Id$ */ #ifdef HAVE_CONFIG_H #include "config.h" diff --git a/ir/be/ia32/ia32_transform.h b/ir/be/ia32/ia32_transform.h index cda3f7ec7..afb839a67 100644 --- a/ir/be/ia32/ia32_transform.h +++ b/ir/be/ia32/ia32_transform.h @@ -18,13 +18,13 @@ */ /** - * Function prototypes for Firm into ia32-Firm transformations. - * @author Christian Wuerdig - * $Id$ + * @file + * @brief This file implements the IR transformation from firm into ia32-Firm. + * @author Christian Wuerdig, Matthias Braun + * @version $Id$ */ - -#ifndef _IA32_TRANSFORM_H_ -#define _IA32_TRANSFORM_H_ +#ifndef FIRM_BE_IA32_IA32_TRANSFORM_H +#define FIRM_BE_IA32_IA32_TRANSFORM_H #include "firm_config.h" #include "bearch_ia32_t.h" @@ -34,18 +34,6 @@ */ void ia32_transform_graph(ia32_code_gen_t *cg); -#if 0 -/** - * Enters all transform functions into the generic pointer - */ -void ia32_register_transformers(void); - -/** - * Transforms the given Firm node into one or more appropriate ia32 nodes. - */ -void ia32_transform_node(ir_node *node, void *env); -#endif - /** * The Psi selector can be a tree of compares combined with "And"s and "Or"s. * We create a Set node, respectively a xCmp in case the Psi is a float, for each @@ -70,4 +58,4 @@ typedef enum { */ ir_entity *ia32_gen_fp_known_const(ia32_known_const_t kct); -#endif /* _IA32_TRANSFORM_H_ */ +#endif /* FIRM_BE_IA32_IA32_TRANSFORM_H */ diff --git a/ir/be/ia32/ia32_util.c b/ir/be/ia32/ia32_util.c index d3493e431..3f5d233c0 100644 --- a/ir/be/ia32/ia32_util.c +++ b/ir/be/ia32/ia32_util.c @@ -18,9 +18,10 @@ */ /** - * Contains implementation of some useful functions for ia32 backend. - * @author Christian Wuerdig - * $Id$ + * @file + * @brief Contains implementation of some useful functions for ia32 backend. + * @author Christian Wuerdig, Matthias Braun + * @version $Id$ */ #ifdef HAVE_CONFIG_H #include "config.h" diff --git a/ir/be/ia32/ia32_util.h b/ir/be/ia32/ia32_util.h index 2a57704e9..4c64aad0a 100644 --- a/ir/be/ia32/ia32_util.h +++ b/ir/be/ia32/ia32_util.h @@ -18,13 +18,16 @@ */ /** - * Contains some useful functions for ia32 backend. - * @author Christian Wuerdig - * $Id$ + * @file + * @brief Contains implementation of some useful functions for ia32 backend. + * @author Christian Wuerdig, Matthias Braun + * @version $Id$ */ +#ifndef FIRM_BE_IA32_IA32_UTIL_H +#define FIRM_BE_IA32_IA32_UTIL_H -#ifndef _IA32_UTIL_H_ -#define _IA32_UTIL_H_ +#include "irnode.h" +#include "irmode.h" /** * Returns the first Proj with given mode connected to irn. @@ -40,4 +43,4 @@ ir_node *ia32_get_proj_for_mode(const ir_node *irn, ir_mode *mode); */ ir_node *ia32_get_res_proj(const ir_node *irn); -#endif /* _IA32_UTIL_H_ */ +#endif /* FIRM_BE_IA32_IA32_UTIL_H */ diff --git a/ir/be/ia32/ia32_x87.c b/ir/be/ia32/ia32_x87.c index aca75fa89..03b541688 100644 --- a/ir/be/ia32/ia32_x87.c +++ b/ir/be/ia32/ia32_x87.c @@ -18,12 +18,11 @@ */ /** - * This file implements the x87 support and virtual to stack - * register translation for the ia32 backend. - * - * @author: Michael Beck - * - * $Id$ + * @file + * @brief This file implements the x87 support and virtual to stack + * register translation for the ia32 backend. + * @author Michael Beck + * @version $Id$ */ #ifdef HAVE_CONFIG_H #include "config.h" diff --git a/ir/be/ia32/ia32_x87.h b/ir/be/ia32/ia32_x87.h index 7e51ea5a5..20d3546f1 100644 --- a/ir/be/ia32/ia32_x87.h +++ b/ir/be/ia32/ia32_x87.h @@ -18,15 +18,17 @@ */ /** - * This file implements the x87 support and virtual to stack - * register translation. - * - * $Id$ + * @file + * @brief This file implements the x87 support and virtual to stack + * register translation for the ia32 backend. + * @author Michael Beck + * @version $Id$ */ -#ifndef _IA32_X87_H_ -#define _IA32_X87_H_ +#ifndef FIRM_BE_IA32_IA32_X87_H +#define FIRM_BE_IA32_IA32_X87_H -#include "../bearch_t.h" +#include "../bearch.h" +#include "../beirg.h" /** * Run a simulation and fix all virtual instructions for a graph. @@ -40,4 +42,4 @@ */ void x87_simulate_graph(const arch_env_t *env, be_irg_t *birg); -#endif /* _IA32_X87_H_ */ +#endif /* FIRM_BE_IA32_IA32_X87_H */