From a63062db7f43c0d0bec2779e62fa9493cd74d3af Mon Sep 17 00:00:00 2001 From: Boris Boesler Date: Mon, 5 Mar 2001 20:10:42 +0000 Subject: [PATCH] added #ifdef HAVE_CONFIG_H # include #endif and replaced C++ comments bt standard C comments [r109] --- ir/ir/ircons.c | 4 ++++ ir/ir/irdump.c | 4 ++++ ir/ir/irflag.c | 4 ++++ ir/ir/irgmod.c | 4 ++++ ir/ir/irgopt.c | 4 ++++ ir/ir/irgraph.c | 13 +++++++++---- ir/ir/irgwalk.c | 4 ++++ ir/ir/irmode.c | 4 ++++ ir/ir/irnode.c | 4 ++++ ir/ir/irop.c | 4 ++++ ir/ir/iropt.c | 6 +++++- ir/ir/irprog.c | 4 ++++ ir/ir/irvrfy.c | 8 ++++++-- ir/tr/entity.c | 5 +++++ ir/tr/mangle.c | 4 ++++ ir/tr/type.c | 12 ++++++++---- ir/tr/type.h | 6 +++--- ir/tr/typewalk.c | 8 ++++++-- 18 files changed, 86 insertions(+), 16 deletions(-) diff --git a/ir/ir/ircons.c b/ir/ir/ircons.c index 9d299f307..18f1b5383 100644 --- a/ir/ir/ircons.c +++ b/ir/ir/ircons.c @@ -9,6 +9,10 @@ ** by Goetz Lindenmaier */ +#ifdef HAVE_CONFIG_H +# include +#endif + # include "irgraph_t.h" # include "irnode_t.h" # include "irmode_t.h" diff --git a/ir/ir/irdump.c b/ir/ir/irdump.c index 0480f8c3a..45f4d0359 100644 --- a/ir/ir/irdump.c +++ b/ir/ir/irdump.c @@ -6,6 +6,10 @@ ** irdump.h: dumping of an intermediate representation graph */ +#ifdef HAVE_CONFIG_H +# include +#endif + # include "irnode_t.h" # include "irgraph_t.h" # include "irprog.h" diff --git a/ir/ir/irflag.c b/ir/ir/irflag.c index 1169a7adf..784d74b80 100644 --- a/ir/ir/irflag.c +++ b/ir/ir/irflag.c @@ -6,6 +6,10 @@ ** irflag --- optimization flags */ +#ifdef HAVE_CONFIG_H +# include +#endif + /* 0 - don't do this optimization 1 - lets see, if there is a better graph */ diff --git a/ir/ir/irgmod.c b/ir/ir/irgmod.c index ec7cc6d42..95d00f658 100644 --- a/ir/ir/irgmod.c +++ b/ir/ir/irgmod.c @@ -7,6 +7,10 @@ ** irgmod: ir graph modification */ +#ifdef HAVE_CONFIG_H +# include +#endif + # include "irnode_t.h" # include "irgraph_t.h" # include "irgmod.h" diff --git a/ir/ir/irgopt.c b/ir/ir/irgopt.c index 92aff145d..9f4c1a96f 100644 --- a/ir/ir/irgopt.c +++ b/ir/ir/irgopt.c @@ -6,6 +6,10 @@ ** Optimizations for a whole ir graph, i.e., a procedure. */ +#ifdef HAVE_CONFIG_H +# include +#endif + # include # include "irgopt.h" diff --git a/ir/ir/irgraph.c b/ir/ir/irgraph.c index 249fdb55a..357996f78 100644 --- a/ir/ir/irgraph.c +++ b/ir/ir/irgraph.c @@ -6,6 +6,10 @@ ** */ +#ifdef HAVE_CONFIG_H +# include +#endif + # include "ircons.h" # include "irgraph_t.h" # include "irprog.h" @@ -80,10 +84,11 @@ new_ir_graph (entity *ent, int n_loc) res->args = new_Proj (res->start, mode_T, pns_args); add_in_edge(res->start_block, projX); - // The code generation needs it. leave it in now. - // Use of this edge is matter of discussion, unresolved. Also possible: - // add_in_edge(res->start_block, res->start_block), but invalid typed. - + /* + * The code generation needs it. leave it in now. + * Use of this edge is matter of discussion, unresolved. Also possible: + * add_in_edge(res->start_block, res->start_block), but invalid typed. + */ mature_block (res->current_block); /** Make a block to start with **/ diff --git a/ir/ir/irgwalk.c b/ir/ir/irgwalk.c index e8ea20485..62909260b 100644 --- a/ir/ir/irgwalk.c +++ b/ir/ir/irgwalk.c @@ -8,6 +8,10 @@ ** - execute the post function after recursion */ +#ifdef HAVE_CONFIG_H +# include +#endif + # include "irnode.h" # include "irgraph.h" /* visited flag */ diff --git a/ir/ir/irmode.c b/ir/ir/irmode.c index 1901632c2..3f9ddc8fc 100644 --- a/ir/ir/irmode.c +++ b/ir/ir/irmode.c @@ -5,6 +5,10 @@ ** */ +#ifdef HAVE_CONFIG_H +# include +#endif + # include "irmode_t.h" # include # include diff --git a/ir/ir/irnode.c b/ir/ir/irnode.c index a9fccc2d4..701de9eac 100644 --- a/ir/ir/irnode.c +++ b/ir/ir/irnode.c @@ -5,6 +5,10 @@ ** */ +#ifdef HAVE_CONFIG_H +# include +#endif + #include "irnode_t.h" #include "irgraph_t.h" #include "ident_t.h" diff --git a/ir/ir/irop.c b/ir/ir/irop.c index da6f27d0a..40b10f8bb 100644 --- a/ir/ir/irop.c +++ b/ir/ir/irop.c @@ -5,6 +5,10 @@ ** */ +#ifdef HAVE_CONFIG_H +# include +#endif + # include "irop_t.h" # include "irnode_t.h" # include "misc.h" diff --git a/ir/ir/iropt.c b/ir/ir/iropt.c index c85202c33..05ffcef17 100644 --- a/ir/ir/iropt.c +++ b/ir/ir/iropt.c @@ -6,6 +6,10 @@ ** iropt --- optimizations intertwined with IR construction. */ +#ifdef HAVE_CONFIG_H +# include +#endif + # include "irnode_t.h" # include "irgraph_t.h" # include "iropt_t.h" @@ -1002,7 +1006,7 @@ optimize_in_place (ir_node *n) } /* remove unnecessary nodes */ - //if (get_opt_constant_folding()) + /*if (get_opt_constant_folding()) */ if (get_opt_constant_folding() || get_irn_op(n) == op_Phi) n = equivalent_node (n); diff --git a/ir/ir/irprog.c b/ir/ir/irprog.c index f7355f248..2e0077199 100644 --- a/ir/ir/irprog.c +++ b/ir/ir/irprog.c @@ -6,6 +6,10 @@ ** irprog.c: ir representation of a program */ +#ifdef HAVE_CONFIG_H +# include +#endif + # include "irprog_t.h" # include "array.h" # include "obst.h" diff --git a/ir/ir/irvrfy.c b/ir/ir/irvrfy.c index 74e0ee785..1deb11b1b 100644 --- a/ir/ir/irvrfy.c +++ b/ir/ir/irvrfy.c @@ -6,6 +6,10 @@ x** */ +#ifdef HAVE_CONFIG_H +# include +#endif + # include "irgraph_t.h" # include "irvrfy.h" # include "irgwalk.h" @@ -52,8 +56,8 @@ irn_vrfy (ir_node *n) break; case iro_Return: op1mode = get_irn_mode(in[1]); - /* Return: BB x M x data1 x ... x datan --> X */ - //printf("mode: %s, code %s\n", ID_TO_STR(n->mode->name), ID_TO_STR(n->op->name)); + /* Return: BB x M x data1 x ... x datan --> X */ + /* printf("mode: %s, code %s\n", ID_TO_STR(n->mode->name), ID_TO_STR(n->op->name));*/ assert ( op1mode == mode_M ); /* operand M */ for (i=2; i < get_irn_arity(n); i++) { assert ( mode_is_data(get_irn_mode(in[i])) ); /* operand datai */ diff --git a/ir/tr/entity.c b/ir/tr/entity.c index 91043f318..eb4d407cb 100644 --- a/ir/tr/entity.c +++ b/ir/tr/entity.c @@ -5,7 +5,12 @@ ** */ +#ifdef HAVE_CONFIG_H +# include +#endif + # include +# include # include "entity_t.h" # include "entity.h" # include "mangle.h" diff --git a/ir/tr/mangle.c b/ir/tr/mangle.c index 03f91c152..b13f303fb 100644 --- a/ir/tr/mangle.c +++ b/ir/tr/mangle.c @@ -5,6 +5,10 @@ ** */ +#ifdef HAVE_CONFIG_H +# include +#endif + # include "mangle.h" # include # include "obst.h" diff --git a/ir/tr/type.c b/ir/tr/type.c index d1bdeac3f..1020e9c72 100644 --- a/ir/tr/type.c +++ b/ir/tr/type.c @@ -8,6 +8,10 @@ ** type.c: datastructures to hold type information. */ +#ifdef HAVE_CONFIG_H +# include +#endif + # include "type.h" # include "irprog.h" /* So that constructors can add the type to global data structure. */ @@ -26,7 +30,7 @@ init (void) /*******************************************************************/ type_class * -new_type_class (ident *name)//, int members) +new_type_class (ident *name) /*, int members) */ { type_class *res; @@ -165,7 +169,7 @@ set_class_size (type_class *clss, int size) { /*******************************************************************/ type_strct * -new_type_strct (ident *name)//, int members) +new_type_strct (ident *name) /*, int members) */ { type_strct *res; @@ -244,7 +248,7 @@ new_type_method (ident *name, int arity, int n_res) add_irp_type((type *) res); /* Remember the new type global. */ res->kind = k_type_method; - res->name = name; // do I need the name, or is the name in entity sufficient? + res->name = name; /* do I need the name, or is the name in entity sufficient? */ res->arity = arity; res->param_type = (type **) xmalloc (sizeof (type *) * arity); res->n_res = n_res; @@ -339,7 +343,7 @@ new_type_union (ident *name, int n_types) res = (type_union *) xmalloc (sizeof (type_union)); add_irp_type((type *) res); /* Remember the new type global. */ res->kind = k_type_union; - res->name = name; // do I need a name? + res->name = name; /* do I need a name? */ res->n_types = n_types; /* res->unioned_type = (int *) xmalloc (sizeof (int) * n_types); diff --git a/ir/tr/type.h b/ir/tr/type.h index 8c16654bb..9c749acb2 100644 --- a/ir/tr/type.h +++ b/ir/tr/type.h @@ -191,11 +191,11 @@ typedef struct entity entity; #endif /* for recursive type definiton */ -//#ifndef _TYPE_TYPEDEF_ -//#define _TYPE_TYPEDEF_ +/*#ifndef _TYPE_TYPEDEF_ */ +/*#define _TYPE_TYPEDEF_ */ /* to resolve recursion between entity.h and irgraph.h */ typedef union type type; -//#endif +/*#endif */ /* visited flag to traverse the type information */ diff --git a/ir/tr/typewalk.c b/ir/tr/typewalk.c index 36935f737..5f136b6b7 100644 --- a/ir/tr/typewalk.c +++ b/ir/tr/typewalk.c @@ -9,6 +9,10 @@ ** - execute the post function after recursion */ +#ifdef HAVE_CONFIG_H +# include +#endif + #include #include #include "irgwalk.h" @@ -78,7 +82,7 @@ void type_walk_2(type_or_ent *tore, { int i; ((type_class *)tore)->visit = type_visited; - //CS + /* CS */ for (i=0; ivisit = type_visited; - //CS + /* CS */ for (i=0; i