removed exc.h from libfirm interface
[libfirm] / ir / ir / irnode_t.h
index eceb7fe..396a4a4 100644 (file)
@@ -1,6 +1,15 @@
-/* Copyright (C) 1998 - 2000 by Universitaet Karlsruhe
-* All rights reserved.
-*/
+/*
+ * Project:     libFIRM
+ * File name:   ir/ir/irnode_t.h
+ * Purpose:     Representation of an intermediate operation -- private header.
+ * Author:      Martin Trapp, Christian Schaefer
+ * Modified by: Goetz Lindenmaier
+ * Created:
+ * CVS-ID:      $Id$
+ * Copyright:   (c) 1998-2003 Universität Karlsruhe
+ * Licence:     This file protected by GPL -  GNU GENERAL PUBLIC LICENSE.
+ */
+
 
 /**
  * @file irnode_t.h
@@ -10,7 +19,6 @@
  * @author Martin Trapp, Christian Schaefer
  */
 
-/* $Id$ */
 
 # ifndef _IRNODE_T_H_
 # define _IRNODE_T_H_
@@ -20,7 +28,6 @@
 #endif
 
 # include "irnode.h"
-# include "xprintf.h"
 # include "irop_t.h"
 # include "firm_common_t.h"
 # include "irdom_t.h" /* For size of struct dom_info. */
@@ -52,17 +59,28 @@ typedef struct {
                                 @todo Ev. replace by bitfield! */
 } block_attr;
 
+/** Start attributes */
+typedef struct {
+  ir_graph *irg;
+} start_attr;
+
 /** Cond attributes */
 typedef struct {
   cond_kind kind;    /**< flavor of Cond */
   long default_proj; /**< for optimization: biggest Proj number, i.e. the one
-                       used for default. */
+                         used for default. */
 } cond_attr;
 
+/** Const attributes */
+typedef struct {
+  tarval *tv;        /**< the target value */
+  type   *tp;        /**< the source type, for analyses. default: type_unknown. */
+} const_attr;
+
 /** SymConst attributes
     This union contains the symbolic information represented by the node */
 typedef union type_or_id {
-  type *typ;
+  type  *typ;
   ident *ptrinfo;
 } type_or_id;
 
@@ -121,12 +139,18 @@ typedef struct {
   ir_node * call;            /**< associated Call-operation */
 } callbegin_attr;
 
+/** Cast attributes */
+typedef struct {
+  type *totype;
+} cast_attr;
+
 /** Some irnodes just have one attribute, these are stored here,
    some have more. Their name is 'irnodename_attr' */
 typedef union {
+  start_attr     start; /**< For Start */
   block_attr     block; /**< For Block: Fields needed to construct it */
   cond_attr      c;     /**< For Cond. */
-  struct tarval *con;   /**< For Const: contains the value of the constant */
+  const_attr     con;   /**< For Const: contains the value of the constant and a type */
   symconst_attr  i;     /**< For SymConst. */
   sel_attr       s;     /**< For Sel. */
   call_attr      call;  /**< For Call: pointer to the type of the method to call */
@@ -134,6 +158,7 @@ typedef union {
   alloc_attr     a;     /**< For Alloc. */
   io_attr       io;    /**< For InstOf */
   type          *f;     /**< For Free. */
+  cast_attr      cast;  /**< For Cast. */
   int            phi0_pos;  /**< For Phi. Used to remember the value defined by
                               this Phi node.  Needed when the Phi is completed
                               to call get_r_internal_value to find the
@@ -184,17 +209,13 @@ void
 copy_attrs (ir_node *old, ir_node *new);
 
 
-/** Print IR-Nodes with attributes
-    @todo brauchen wir dienoch? dann fliegt ev. das xprint raus? */
-int ir_node_print (XP_PAR1, const xprintf_info *, XP_PARN);
-
 /** Returns the array with the ins.  The content of the array may not be
    changed.  */
-ir_node     **get_irn_in            (ir_node *node);
+ir_node     **get_irn_in            (const ir_node *node);
 
 /*@{*/
 /** access attributes directly */
-INLINE tarval       *get_irn_const_attr    (ir_node *node);
+INLINE const_attr    get_irn_const_attr    (ir_node *node);
 INLINE long          get_irn_proj_attr     (ir_node *node);
 INLINE alloc_attr    get_irn_alloc_attr    (ir_node *node);
 INLINE type         *get_irn_free_attr     (ir_node *node);