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-2003 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
21 # ifndef _FIRM_COMMON_H_
22 # define _FIRM_COMMON_H_
24 /** a list of firm kinds
25 @@@ not all datatypes are tagged yet. */
27 k_BAD = 0, /**< an invalid firm node */
28 k_entity, /**< an entity */
29 k_type, /**< a type */
30 k_ir_graph, /**< an ir graph */
31 k_ir_node, /**< an ir node */
32 k_ir_mode, /**< an ir mode */
33 k_ir_op, /**< an ir opcode */
34 k_tarval, /**< a tarval */
35 k_ir_loop, /**< a loop */
36 k_ir_compound_graph_path, /**< a compound graph path, see entity.h */
37 k_ir_extblk, /**< an extended block */
38 k_ir_prog, /**< a program representation (irp) */
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_ */