moved firmext code into the backend dir
[libfirm] / ir / be / grgen / analyze.c
1 /*
2  * Project:     libFIRM/extension module/graph rewriting system
3  * File name:   ext/grs/analyze.c
4  * Purpose:     provides interfaces for incremental and from scratch
5  *                              analysis collection information for a search planer
6  * Author:      Veit Batz
7  * Created:             22. June 2005
8  * CVS-ID:      $Id$
9  * Copyright:   (c) 2005 Universität Karlsruhe
10  * Licence:     This file protected by GPL -  GNU GENERAL PUBLIC LICENSE.
11  */
12
13
14  /**
15   * @file ext/grs/analyze.c
16   * @brief      provides an interface for incremental and from scratch
17   *                     analyses collecting information for a search planer
18   * */
19
20 #include "base_t.h"
21 #include "analyze_t.h"
22
23
24 /** perform a from scratch analysis of a given ir graph */
25 void ext_grs_analyze(ext_grs_analyzer_t *alz, ir_graph *irg)
26 {
27         ext_grs_irg_private_t *pr_g = _ext_grs_get_irg_private(irg);
28         if (pr_g->matching_enabled) alz->analyze(alz, irg);
29 }
30
31 void ext_grs_free_ana_result(ext_grs_analyzer_t *alz, ir_graph *irg)
32 {
33         alz->free_ana_result(alz, irg);
34 }
35
36
37 /** enable incremantal analysis for the given ir graph */
38 void ext_grs_enable_incr_ana(ext_grs_analyzer_t *alz, ir_graph *irg)
39 {
40         ext_grs_irg_private_t *pr_g = _ext_grs_get_irg_private(irg);
41         if (pr_g->matching_enabled) alz->enable_incr_ana(alz, irg);
42 }
43
44 /** disable incremantal analysis for the given ir graph */
45 void ext_grs_disable_incr_ana(ext_grs_analyzer_t *alz, ir_graph *irg)
46 {
47         alz->disable_incr_ana(alz, irg);
48 }
49
50 /** dump the current analysis result for a given ir graph */
51 void ext_grs_dump_ana_result(ext_grs_analyzer_t *alz, ir_graph *irg)
52 {
53         alz->dump_ana_result(alz, irg);
54 }
55
56
57
58
59
60 /** from scratch analysis of all ir graphs building a global data set */
61 void ext_grs_analyze_global(ext_grs_analyzer_t *alz)
62 {
63         alz->analyze_global(alz);
64 }
65
66 /** enable global incremantal analysis building a global data set */
67 void ext_grs_enable_global_incr_ana(ext_grs_analyzer_t *alz)
68 {
69         alz->enable_global_incr_ana(alz);
70 }
71
72 /** disable global incremantal analysis building a global data set */
73 void ext_grs_disable_global_incr_ana(ext_grs_analyzer_t *alz)
74 {
75         alz->disable_global_incr_ana(alz);
76 }
77
78 /** dump the current global analysis result */
79 void ext_grs_dump_global_ana_result(ext_grs_analyzer_t *alz)
80 {
81         alz->dump_global_ana_result(alz);
82 }