X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=ir%2Fir%2Firgraph.h;h=a2d769bc1828d52e563a1319bb86d94b2da9a485;hb=eda9d668d0e8c8246015b4c5e743316a6a835a23;hp=e5318a689c7a1e5a261a286471d7934849f9a9df;hpb=0a94cad2debcb79eee8a8148650bf50057bdcbb5;p=libfirm diff --git a/ir/ir/irgraph.h b/ir/ir/irgraph.h index e5318a689..a2d769bc1 100644 --- a/ir/ir/irgraph.h +++ b/ir/ir/irgraph.h @@ -1,24 +1,30 @@ /* - * Project: libFIRM - * File name: ir/ir/irgraph.c - * Purpose: Entry point to the representation of procedure code. - * 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. + * 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.h - * - * ir graph construction. - * - * @author Martin Trapp, Christian Schaefer + * @file + * @brief Entry point to the representation of procedure code. + * @author Martin Trapp, Christian Schaefer, Goetz Lindenmaier + * @version $Id$ */ -#ifndef _FIRM_IR_IRGRAPH_H_ -#define _FIRM_IR_IRGRAPH_H_ +#ifndef FIRM_IR_IRGRAPH_H +#define FIRM_IR_IRGRAPH_H #include @@ -103,7 +109,7 @@ * - Phi_in_stack; a stack needed for automatic Phi construction, needed only * during ir construction. * - * - isited A int used as flag to traverse the ir_graph. + * - visited A int used as flag to traverse the ir_graph. * * - block_visited A int used as a flag to traverse block nodes in the graph. */ @@ -478,6 +484,33 @@ void inc_irg_block_visited (ir_graph *irg); unsigned long get_irg_block_visited (const ir_graph *irg); void set_irg_block_visited (ir_graph *irg, unsigned long i); +/** + * Debug helpers: You can indicate wether you are currently using visited or + * block_visited flags. If NDEBUG is not defined, then the compiler will abort + * if 2 parties try to use the flags. + */ +#ifndef NDEBUG +void set_using_block_visited(ir_graph *irg); +void clear_using_block_visited(ir_graph *irg); +int using_block_visited(const ir_graph *irg); +void set_using_visited(ir_graph *irg); +void clear_using_visited(ir_graph *irg); +int using_visited(const ir_graph *irg); +void set_using_irn_link(ir_graph *irg); +void clear_using_irn_link(ir_graph *irg); +int using_irn_link(const ir_graph *irg); +#else +static INLINE void set_using_block_visited(ir_graph *irg) { (void) irg; } +static INLINE void clear_using_block_visited(ir_graph *irg) { (void) irg; } +static INLINE int using_block_visited(const ir_graph *irg) { (void) irg; return 0; } +static INLINE void set_using_visited(ir_graph *irg) { (void) irg; } +static INLINE void clear_using_visited(ir_graph *irg) { (void) irg; } +static INLINE int using_visited(const ir_graph *irg) { (void) irg; return 0; } +static INLINE void set_using_irn_link(ir_graph *irg) { (void) irg; } +static INLINE void clear_using_irn_link(ir_graph *irg) { (void) irg; } +static INLINE int using_irn_link(const ir_graph *irg) { (void) irg; return 0; } +#endif + /** move Proj nodes into the same block as its predecessors */ void normalize_proj_nodes(ir_graph *irg); @@ -531,4 +564,4 @@ void set_irg_fp_model(ir_graph *irg, unsigned model); */ size_t register_additional_graph_data(size_t size); -#endif /* _FIRM_IR_IRGRAPH_H_ */ +#endif