3 * File name: ir/common/firm_common.c
4 * Purpose: Stuff common to all firm modules.
5 * Author: Martin Trapp, Christian Schaefer
6 * Modified by: Goetz Lindenmaier
9 * Copyright: (c) 1998-2007 Universität Karlsruhe
10 * Licence: This file protected by GPL - GNU GENERAL PUBLIC LICENSE.
16 * common firm declarations
18 * @author Martin Trapp, Christian Schaefer & Goetz Lindenmaier
20 #ifndef _FIRM_COMMON_H_
21 #define _FIRM_COMMON_H_
23 /** a list of firm kinds
24 @@@ not all datatypes are tagged yet. */
26 k_BAD = 0, /**< An invalid firm node. */
27 k_entity, /**< An entity. */
28 k_type, /**< A type. */
29 k_ir_graph, /**< An IR graph. */
30 k_ir_node, /**< An IR node. */
31 k_ir_mode, /**< An IR mode. */
32 k_ir_op, /**< An IR opcode. */
33 k_tarval, /**< A tarval. */
34 k_ir_loop, /**< A loop. */
35 k_ir_compound_graph_path, /**< A compound graph path, see entity.h. */
36 k_ir_extblk, /**< An extended basic block. */
37 k_ir_prog, /**< A program representation (irp). */
38 k_ir_region, /**< A region. */
39 k_ir_max /**< maximum value -- illegal for firm nodes. */
43 * Returns the kind of a thing.
45 * @param firm_thing pointer representing a firm object
47 firm_kind get_kind(const void *firm_thing);
49 /** Returns the kind of a thing as a string. */
50 const char *print_firm_kind(void *firm_thing);
52 /** Print an identification of a firm thing. */
53 void firm_identify_thing(void *X);
55 #endif /*_FIRM_COMMON_H_ */