Initial revision
[libfirm] / ir / ir / iropt.h
1 /* Copyright (C) 1998 - 2000 by Universitaet Karlsruhe
2 ** All rights reserved.
3 **
4 ** Authors: Martin Trapp, Christian Schaefer
5 **
6 ** Declarations for optimizations intertwined with IR construction.
7 */
8
9 # ifndef _IROPT_H_
10 # define _IROPT_H_
11
12 # include "irnode.h"
13 # include "irgraph.h"
14 # include "irflag.h"
15 # include "pset.h"
16 # include "tune.h"
17
18 /* optimize_in_place (n) may change the contents of the ir_node itself,
19    [e.g. by making it a Id-node], but does not change its identity.
20    So it is safe to be called on already referenced nodes.
21
22    optimize_in_place (n) returns a pointer to a node equivalent to `n'
23    which should be used instead of `n'.
24
25    optimize (n) may deallocate `n' and everything allocated after `n'! */
26
27 tarval *computed_value (ir_node *n);
28
29 pset *new_identities (void);
30 void del_identities (pset *value_table);
31
32 ir_node *optimize (ir_node *n);
33 ir_node *optimize_in_place (ir_node *n);
34
35
36 void optimize_graph (ir_graph *irg);
37
38
39 # endif /* _IROPT_H_ */