fixed output
[libfirm] / ir / opt / tailrec.h
1 /*
2  * Project:     libFIRM
3  * File name:   ir/opt/tailrec.h
4  * Purpose:     Tail-recursion call optimization.
5  * Author:      Michael Beck
6  * Created:     08.06.2004
7  * CVS-ID:      $Id$
8  * Copyright:   (c) 1998-2004 Universität Karlsruhe
9  * Licence:     This file protected by GPL -  GNU GENERAL PUBLIC LICENSE.
10  */
11
12 /**
13  * @file tailrec.h
14  *
15  * Tail-recursion call optimization.
16  *
17  * @author Michael Beck
18  */
19
20 # ifndef _TAILREC_H_
21 # define _TAILREC_H_
22
23 # include "irgraph.h"
24
25 /**
26  * Optimizes simple tail-recursion calls by
27  * converting them into loops. Depends on the flag opt_tail_recursion.
28  *
29  * Does not work for Calls that use the exception stuff.
30  *
31  * @param irg   the graph to be optimized
32  *
33  * @return non-zero if the optimization could be applied, 0 else
34  */
35 int opt_tail_rec_irg(ir_graph *irg);
36
37 /*
38  * Optimize tail-recursion calls for all IR-Graphs.
39  */
40 void opt_tail_recursion(void);
41
42 # endif /* _TAILREC_H_ */