sparc: Do not force the object file format to ELF.
[libfirm] / ir / be / beloopana.h
1 /*
2  * Copyright (C) 1995-2008 University of Karlsruhe.  All right reserved.
3  *
4  * This file is part of libFirm.
5  *
6  * This file may be distributed and/or modified under the terms of the
7  * GNU General Public License version 2 as published by the Free Software
8  * Foundation and appearing in the file LICENSE.GPL included in the
9  * packaging of this file.
10  *
11  * Licensees holding valid libFirm Professional Edition licenses may use
12  * this file in accordance with the libFirm Commercial License.
13  * Agreement provided with the Software.
14  *
15  * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
16  * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR
17  * PURPOSE.
18  */
19
20 /**
21  * @file
22  * @brief       Compute register pressure in loops.
23  * @author      Christian Wuerdig
24  * @date        20.02.2007
25  */
26 #ifndef FIRM_BE_BELOOPANA_H
27 #define FIRM_BE_BELOOPANA_H
28
29 #include "irloop.h"
30
31 #include "bearch.h"
32
33 typedef struct be_loopana_t be_loopana_t;
34
35 /**
36  * Compute the register pressure for a class of all loops in the irg.
37  * @param irg   The graph
38  * @param cls   The register class to compute the pressure for
39  * @return The loop analysis object.
40  */
41 be_loopana_t *be_new_loop_pressure_cls(ir_graph *irg,
42                                        const arch_register_class_t *cls);
43
44 /**
45  * Compute the register pressure of all loops in the irg.
46  * @param irg   The graph
47  * @param cls   register class to compute loop pressure for,
48  *              if NULL computes for all classes
49  * @return The loop analysis object.
50  */
51 be_loopana_t *be_new_loop_pressure(ir_graph *irg,
52                                    const arch_register_class_t *cls);
53
54 /**
55  * Returns the computed register pressure for the given class and loop.
56  * @return The pressure or INT_MAX if not found
57  */
58 unsigned be_get_loop_pressure(be_loopana_t *loop_ana,
59                               const arch_register_class_t *cls, ir_loop *loop);
60
61 /**
62  * Frees loop analysis object.
63  */
64 void be_free_loop_pressure(be_loopana_t *loop_ana);
65
66 #endif