acb9a3082f4f0eee98e672bf6a57b9a4a97281d9
[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
16 /* optimize_in_place (n) may change the contents of the ir_node itself,
17    [e.g. by making it a Id-node], but does not change its identity.
18    So it is safe to be called on already referenced nodes.
19
20    optimize_in_place (n) returns a pointer to a node equivalent to `n'
21    which should be used instead of `n'.
22
23    optimize (n) may deallocate `n' and everything allocated after `n'! */
24
25 tarval *computed_value (ir_node *n);
26
27 ir_node *optimize (ir_node *n);
28 ir_node *optimize_in_place (ir_node *n);
29
30 # endif /* _IROPT_H_ */