opt_osr.h added
[libfirm] / ir / common / firm_common.h
1 /*
2  * Project:     libFIRM
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
7  * Created:
8  * CVS-ID:      $Id$
9  * Copyright:   (c) 1998-2003 Universität Karlsruhe
10  * Licence:     This file protected by GPL -  GNU GENERAL PUBLIC LICENSE.
11  */
12
13 /**
14  * @file firm_common.h
15  *
16  * common firm declarations
17  *
18  * @author Martin Trapp, Christian Schaefer & Goetz Lindenmaier
19  */
20
21 # ifndef _FIRM_COMMON_H_
22 # define _FIRM_COMMON_H_
23
24 /** a list of firm kinds
25  @@@ not all datatypes are tagged yet. */
26 typedef enum {
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. */
40 } firm_kind;
41
42 /**
43  * Returns the kind of a thing.
44  *
45  * @param firm_thing  pointer representing a firm object
46  */
47 firm_kind get_kind(const void *firm_thing);
48
49 /** Returns the kind of a thing as a string. */
50 const char* print_firm_kind(void *firm_thing);
51
52 /** Print an identification of a firm thing. */
53 void firm_identify_thing(void *X);
54
55 # endif /*_FIRM_COMMON_H_ */