moved firmext code into the backend dir
[libfirm] / ir / be / grgen / matchplan.h
1 #ifndef _EXT_GRS_MATCHPLAN_H_
2 #define _EXT_GRS_MATCHPLAN_H_
3
4 /*
5  * Project:     libFIRM/extension module/GRS-matcher
6  * File name:   ext/grs/plan.h
7  * Purpose:     provides an interface for search planers planing
8  *                              the matching process with respect to information
9  *                              provided by appropriate analyzers
10  * Author:      Veit Batz
11  * Modified by: Andreas Schoesser
12  * Created:             6. August 2005
13  * CVS-ID:      $Id$
14  * Copyright:   (c) 2005 Universität Karlsruhe
15  * Licence:     This file protected by GPL -  GNU GENERAL PUBLIC LICENSE.
16  */
17
18
19 #include "action.h"
20 #include "analyze.h"
21
22
23
24 /** a plan the matching process will follow */
25 typedef struct _ext_grs_match_plan_t ext_grs_match_plan_t;
26
27 /** a planer for the creation of matching plans */
28 typedef struct _ext_grs_planer_t ext_grs_planer_t;
29
30 typedef struct {
31         int n_nodes;
32         ext_grs_node_t **pat_nodes;
33         ir_node **host_nodes;
34         int n_edges;
35         ext_grs_edge_t **pat_edges;
36         ir_edge_t **host_edges;
37 } ext_grs_graph_fragment_t;
38
39
40
41
42
43
44 /** initialize a planer */
45 void ext_grs_init_planer(ext_grs_planer_t *planer, ext_grs_analyzer_t *alz);
46
47 /** compute a match plan */
48 ext_grs_match_plan_t *ext_grs_compute_plan(
49         ext_grs_planer_t *planer, ir_graph *irg, ext_grs_action_t *act);
50
51 /** compute a match plan according to analysis data of all ir graphs */
52 ext_grs_match_plan_t *ext_grs_compute_plan_global(
53         ext_grs_planer_t *planer, ext_grs_action_t *act);
54
55 /**dump a search plans to stdout */
56 void ext_grs_dump_match_plan(ext_grs_match_plan_t *);
57
58
59
60 ext_grs_match_plan_t *ext_grs_compute_plan_pivot(ext_grs_planer_t *planer,
61         ir_graph *irg, ext_grs_action_t *act, ext_grs_graph_fragment_t *bound);
62 ext_grs_match_plan_t *ext_grs_compute_plan_global_pivot(ext_grs_planer_t *planer,
63         ext_grs_action_t *act, ext_grs_graph_fragment_t *bound);
64
65
66
67
68
69 #endif /*_EXT_GRS_MATCHPLAN_H_*/