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