Commit a63062db authored by Boris Boesler's avatar Boris Boesler
Browse files

added

#ifdef HAVE_CONFIG_H
# include <config.h>
#endif

and replaced C++ comments bt standard C comments

[r109]
parent cf6e9b5a
......@@ -9,6 +9,10 @@
** by Goetz Lindenmaier
*/
#ifdef HAVE_CONFIG_H
# include <config.h>
#endif
# include "irgraph_t.h"
# include "irnode_t.h"
# include "irmode_t.h"
......
......@@ -6,6 +6,10 @@
** irdump.h: dumping of an intermediate representation graph
*/
#ifdef HAVE_CONFIG_H
# include <config.h>
#endif
# include "irnode_t.h"
# include "irgraph_t.h"
# include "irprog.h"
......
......@@ -6,6 +6,10 @@
** irflag --- optimization flags
*/
#ifdef HAVE_CONFIG_H
# include <config.h>
#endif
/* 0 - don't do this optimization
1 - lets see, if there is a better graph */
......
......@@ -7,6 +7,10 @@
** irgmod: ir graph modification
*/
#ifdef HAVE_CONFIG_H
# include <config.h>
#endif
# include "irnode_t.h"
# include "irgraph_t.h"
# include "irgmod.h"
......
......@@ -6,6 +6,10 @@
** Optimizations for a whole ir graph, i.e., a procedure.
*/
#ifdef HAVE_CONFIG_H
# include <config.h>
#endif
# include <assert.h>
# include "irgopt.h"
......
......@@ -6,6 +6,10 @@
**
*/
#ifdef HAVE_CONFIG_H
# include <config.h>
#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 **/
......
......@@ -8,6 +8,10 @@
** - execute the post function after recursion
*/
#ifdef HAVE_CONFIG_H
# include <config.h>
#endif
# include "irnode.h"
# include "irgraph.h" /* visited flag */
......
......@@ -5,6 +5,10 @@
**
*/
#ifdef HAVE_CONFIG_H
# include <config.h>
#endif
# include "irmode_t.h"
# include <malloc.h>
# include <stddef.h>
......
......@@ -5,6 +5,10 @@
**
*/
#ifdef HAVE_CONFIG_H
# include <config.h>
#endif
#include "irnode_t.h"
#include "irgraph_t.h"
#include "ident_t.h"
......
......@@ -5,6 +5,10 @@
**
*/
#ifdef HAVE_CONFIG_H
# include <config.h>
#endif
# include "irop_t.h"
# include "irnode_t.h"
# include "misc.h"
......
......@@ -6,6 +6,10 @@
** iropt --- optimizations intertwined with IR construction.
*/
#ifdef HAVE_CONFIG_H
# include <config.h>
#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);
......
......@@ -6,6 +6,10 @@
** irprog.c: ir representation of a program
*/
#ifdef HAVE_CONFIG_H
# include <config.h>
#endif
# include "irprog_t.h"
# include "array.h"
# include "obst.h"
......
......@@ -6,6 +6,10 @@
x**
*/
#ifdef HAVE_CONFIG_H
# include <config.h>
#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 */
......
......@@ -5,7 +5,12 @@
**
*/
#ifdef HAVE_CONFIG_H
# include <config.h>
#endif
# include <stdlib.h>
# include <stddef.h>
# include "entity_t.h"
# include "entity.h"
# include "mangle.h"
......
......@@ -5,6 +5,10 @@
**
*/
#ifdef HAVE_CONFIG_H
# include <config.h>
#endif
# include "mangle.h"
# include <obstack.h>
# include "obst.h"
......
......@@ -8,6 +8,10 @@
** type.c: datastructures to hold type information.
*/
#ifdef HAVE_CONFIG_H
# include <config.h>
#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);
......
......@@ -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 */
......
......@@ -9,6 +9,10 @@
** - execute the post function after recursion
*/
#ifdef HAVE_CONFIG_H
# include <config.h>
#endif
#include <stdlib.h>
#include <stdio.h>
#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; i<get_class_n_member((type_class *)tore); i++)
{
type_walk_2((type_or_ent *)get_class_member((type_class *)tore, i),
......@@ -101,7 +105,7 @@ void type_walk_2(type_or_ent *tore,
int i;
((type_strct *)tore)->visit = type_visited;
//CS
/* CS */
for (i=0; i<get_strct_n_member((type_strct *)tore); i++)
{
type_walk_2((type_or_ent *)get_strct_member((type_strct *)tore, i),
......
Markdown is supported
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