added routines to free memory
[libfirm] / ir / ir / irop_t.h
1 /*
2  * Project:     libFIRM
3  * File name:   ir/ir/irop_t.h
4  * Purpose:     Representation of opcode of intermediate operation -- private header.
5  * Author:      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 # ifndef _IROP_T_H_
15 # define _IROP_T_H_
16
17 # include "irop.h"
18
19 /** the type of an ir_op */
20 struct ir_op {
21   opcode code;
22   ident *name;
23   size_t attr_size;       /**< Space needed in memory for private attributes */
24   int labeled;            /**< Output edge labels on in-edges in vcg graph */
25   int pinned;             /**< How to deal with the node in cse, pre. */
26   int reqires_fexible_in; /**< The node must always have a flexible array as in. */
27                           /** @@@@ Change constructors for ir_op, and new_ir_node!!!
28                               new_ir_node not only checks the arity, but also the op!!! @@@ */
29 };
30
31 /**
32  * Create a new ir operation.
33  *
34  * @param code     the opcode, one of type \c opcode
35  * @param name     the printable name of this opcode
36  * @param p        wheater operations of this opcode are pinned or floating
37  * @param labeled  if set, output edge labels on in-edges in vcg graph wil be generated
38  *
39  * @return The genenerated ir operation.
40  */
41 ir_op * new_ir_op (opcode code, const char *name, op_pinned p,
42                    int labeled, size_t attr_size);
43
44 /** initialize the irop module */
45 void init_op (void);
46
47 /* free memory used by irop module. */
48 void finish_op(void);
49
50 #endif /* _IROP_T_H_ */