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
7 * Created: 22. June 2005
9 * Copyright: (c) 2005 Universität Karlsruhe
10 * Licence: This file protected by GPL - GNU GENERAL PUBLIC LICENSE.
15 * @file ext/grs/analyze.c
16 * @brief provides an interface for incremental and from scratch
17 * analyses collecting information for a search planer
21 #include "analyze_t.h"
24 /** perform a from scratch analysis of a given ir graph */
25 void ext_grs_analyze(ext_grs_analyzer_t *alz, ir_graph *irg)
27 ext_grs_irg_private_t *pr_g = _ext_grs_get_irg_private(irg);
28 if (pr_g->matching_enabled) alz->analyze(alz, irg);
31 void ext_grs_free_ana_result(ext_grs_analyzer_t *alz, ir_graph *irg)
33 alz->free_ana_result(alz, irg);
37 /** enable incremantal analysis for the given ir graph */
38 void ext_grs_enable_incr_ana(ext_grs_analyzer_t *alz, ir_graph *irg)
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);
44 /** disable incremantal analysis for the given ir graph */
45 void ext_grs_disable_incr_ana(ext_grs_analyzer_t *alz, ir_graph *irg)
47 alz->disable_incr_ana(alz, irg);
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)
53 alz->dump_ana_result(alz, irg);
60 /** from scratch analysis of all ir graphs building a global data set */
61 void ext_grs_analyze_global(ext_grs_analyzer_t *alz)
63 alz->analyze_global(alz);
66 /** enable global incremantal analysis building a global data set */
67 void ext_grs_enable_global_incr_ana(ext_grs_analyzer_t *alz)
69 alz->enable_global_incr_ana(alz);
72 /** disable global incremantal analysis building a global data set */
73 void ext_grs_disable_global_incr_ana(ext_grs_analyzer_t *alz)
75 alz->disable_global_incr_ana(alz);
78 /** dump the current global analysis result */
79 void ext_grs_dump_global_ana_result(ext_grs_analyzer_t *alz)
81 alz->dump_global_ana_result(alz);