* Copyright: (c) 1998-2003 Universität Karlsruhe
* Licence: This file protected by GPL - GNU GENERAL PUBLIC LICENSE.
*/
-
# ifndef _IRNODE_H_
# define _IRNODE_H_
#include <stddef.h>
-# include "pnc.h"
-# include "tv.h"
# include "irgraph.h"
# include "entity.h"
# include "firm_common.h"
} pn_Raise; /* Projection numbers for Raise. */
typedef enum {
- CNST_NULL = TV_CLASSIFY_NULL, /**< The node is a const(0). */
- CNST_ONE = TV_CLASSIFY_ONE, /**< The node is a const(1). */
- CNST_ALL_ONE = TV_CLASSIFY_ALL_ONE, /**< The node is a const(11111...). */
- CNST_OTHER = TV_CLASSIFY_OTHER, /**< The tarvel of the const has another value. */
- CNST_SYMCONST, /**< The node is symconst. */
- CNST_NO_CONST /**< The node is no const at all. */
+ CNST_NULL = 0, /**< The node is a const(0). */
+ CNST_ONE = +1, /**< The node is a const(1). */
+ CNST_ALL_ONE = -1, /**< The node is a const(11111...). */
+ CNST_OTHER = 2, /**< The tarvel of the const has another value. */
+ CNST_SYMCONST = 3, /**< The node is symconst. */
+ CNST_NO_CONST = 4 /**< The node is no const at all. */
} cnst_classify_t;
tarval *get_Const_tarval (ir_node *node);
ir_node *get_Sync_pred (ir_node *node, int pos);
void set_Sync_pred (ir_node *node, int pos, ir_node *pred);
+/** Returns the source language type of a Proj node.
+ * Must be an atomic type. Mode of type must be mode of node.
+ */
+type *get_Proj_type (ir_node *node);
+
+/** Return the predecessor of a Proj node. */
ir_node *get_Proj_pred (ir_node *node);
void set_Proj_pred (ir_node *node, ir_node *pred);
+/** Return the projection number of a Proj node. */
long get_Proj_proj (ir_node *node);
void set_Proj_proj (ir_node *node, long proj);
* operation: Cond. */
int is_forking_op(const ir_node *node);
+/** Return the type associated with the value produced by n
+ * if the node remarks this type as it is the case for
+ * Cast, Const, SymConst and some Proj nodes. */
+type *get_irn_type(ir_node *n);
+
/**
* Access custom node data.
* The data must have been registered with