Add is_Conv().
[libfirm] / ir / ir / irgraph_t.h
index 1a5bbd0..72a9b8b 100644 (file)
@@ -1,22 +1,30 @@
 /*
- * Project:     libFIRM
- * File name:   ir/ir/irgraph.c
- * Purpose:     Entry point to the representation of procedure code -- internal header.
- * Author:      Martin Trapp, Christian Schaefer
- * Modified by: Goetz Lindenmaier, Michael Beck
- * Created:
- * CVS-ID:      $Id$
- * Copyright:   (c) 1998-2007 Universität Karlsruhe
- * Licence:     This file protected by GPL -  GNU GENERAL PUBLIC LICENSE.
+ * Copyright (C) 1995-2007 University of Karlsruhe.  All right reserved.
+ *
+ * This file is part of libFirm.
+ *
+ * This file may be distributed and/or modified under the terms of the
+ * GNU General Public License version 2 as published by the Free Software
+ * Foundation and appearing in the file LICENSE.GPL included in the
+ * packaging of this file.
+ *
+ * Licensees holding valid libFirm Professional Edition licenses may use
+ * this file in accordance with the libFirm Commercial License.
+ * Agreement provided with the Software.
+ *
+ * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+ * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE.
  */
 
 /**
- * @file irgraph_t.h
- *
- * IR graph construction.
+ * @file
+ * @brief    Entry point to the representation of procedure code -- internal header.
+ * @author   Martin Trapp, Christian Schaefer, Goetz Lindenmaier, Michael Beck
+ * @version  $Id$
  */
-#ifndef _IRGRAPH_T_H_
-#define _IRGRAPH_T_H_
+#ifndef FIRM_IR_IRGRAPH_T_H
+#define FIRM_IR_IRGRAPH_T_H
 
 #include "firm_types.h"
 #include "irgraph.h"
@@ -155,8 +163,13 @@ struct ir_graph {
                     every time someone walks through
                     the graph */
   unsigned long block_visited;       /**< same as visited, for a complete block */
-  unsigned inside_irg_walk   : 1;    /**< set to 1 if we are currently in an irg walk */
-  unsigned inside_block_walk : 1;    /**< set to 1 if we are currently in a block walk */
+
+#ifndef NDEBUG
+  unsigned using_visited        : 1; /**< set to 1 if we are currently using the visited flag */
+  unsigned using_block_visited : 1;  /**< set to 1 if we are currently using the block_visited flag */
+  unsigned using_irn_link      : 1;  /**< set to 1 if we are currently using the irn_link fields */
+#endif
+
   unsigned estimated_node_count;     /**< estimated number of nodes in this graph,
                                           updated after every walk */
   irg_edges_info_t edge_info;        /**< edge info for automatic outs */
@@ -557,36 +570,6 @@ _dec_irg_block_visited(ir_graph *irg) {
   --irg->block_visited;
 }
 
-static INLINE void
-_set_inside_block_walk(ir_graph *irg) {
-  irg->inside_block_walk = 1;
-}
-
-static INLINE void
-_clear_inside_block_walk(ir_graph *irg) {
-  irg->inside_block_walk = 0;
-}
-
-static INLINE unsigned
-_inside_block_walk(const ir_graph *irg) {
-  return irg->inside_block_walk;
-}
-
-static INLINE void
-_set_inside_irg_walk(ir_graph *irg) {
-  irg->inside_irg_walk = 1;
-}
-
-static INLINE void
-_clear_inside_irg_walk(ir_graph *irg) {
-  irg->inside_irg_walk = 0;
-}
-
-static INLINE unsigned
-_inside_irg_walk(const ir_graph *irg) {
-  return irg->inside_irg_walk;
-}
-
 static INLINE unsigned
 _get_irg_estimated_node_cnt(const ir_graph *irg) {
   return irg->estimated_node_count;
@@ -704,13 +687,7 @@ get_idx_irn(ir_graph *irg, unsigned idx) {
 #define set_irg_block_visited(irg, v)         _set_irg_block_visited(irg, v)
 #define inc_irg_block_visited(irg)            _inc_irg_block_visited(irg)
 #define dec_irg_block_visited(irg)            _dec_irg_block_visited(irg)
-#define set_inside_block_walk(irg)            _set_inside_block_walk(irg)
-#define clear_inside_block_walk(irg)          _clear_inside_block_walk(irg)
-#define inside_block_walk(irg)                _inside_block_walk(irg)
-#define set_inside_irg_walk(irg)              _set_inside_irg_walk(irg)
-#define clear_inside_irg_walk(irg)            _clear_inside_irg_walk(irg)
-#define inside_irg_walk(irg)                  _inside_irg_walk(irg)
 #define get_irg_estimated_node_cnt(irg)       _get_irg_estimated_node_cnt(irg)
 #define get_irg_fp_model(irg)                 _get_irg_fp_model(irg)
 
-# endif /* _IRGRAPH_T_H_ */
+#endif