-/* 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
* @author Martin Trapp, Christian Schaefer
*/
-/* $Id$ */
# ifndef _IRNODE_T_H_
# define _IRNODE_T_H_
#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. */
@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;
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 */
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
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 (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);