*** empty log message ***
[libfirm] / ir / be / bespillloc.c
1 #include "obst.h"
2 #include "set.h"
3 #include "pset.h"
4 #include "irprintf_t.h"
5 #include "irgraph.h"
6 #include "irnode.h"
7 #include "irmode.h"
8 #include "irgwalk.h"
9 #include "iredges_t.h"
10 #include "ircons_t.h"
11 #include "irprintf.h"
12
13 #include "obst.h"
14 #include <stdio.h>
15 #include <stdlib.h>
16 #include "bitset.h"
17
18 #include "irprog.h"
19 #include "irgopt.h"
20 #include "irdump.h"
21 #include "phiclass.h"
22 #include "irdom_t.h"
23 #include "iredges_t.h"
24 #include "irloop_t.h"
25 #include "irtools.h"
26 #include "return.h"
27
28 #include "bearch.h"
29 #include "firm/bearch_firm.h"
30 #include "ia32/bearch_ia32.h"
31 #include "arm/bearch_arm.h"
32 #include "ppc32/bearch_ppc32.h"
33 #include "mips/bearch_mips.h"
34
35 #include "be_t.h"
36 #include "benumb_t.h"
37 #include "beutil.h"
38 #include "benode_t.h"
39 #include "beirgmod.h"
40 #include "besched_t.h"
41 #include "belistsched.h"
42 #include "belive_t.h"
43 #include "bespillilp.h"
44 #include "bespillbelady.h"
45 #include "bera.h"
46 #include "beraextern.h"
47 #include "bechordal_t.h"
48 #include "beifg.h"
49 #include "beifg_impl.h"
50 #include "becopyopt.h"
51 #include "becopystat.h"
52 #include "bessadestr.h"
53 #include "beabi.h"
54 #include "belower.h"
55 #include "bestat.h"
56
57 #include "typewalk.h"
58
59
60 typedef struct _spilloc_env_t{
61
62         struct obstack ob;
63         ir_graph *irg;
64
65         pset *adjlst;
66         spill_env_t *senv;
67
68 } spilloc_env_t;
69
70
71 typedef struct Edge {
72         int nodenumber;
73         struct Edge *next;
74 } edge;
75
76 typedef struct {
77         int count;
78         int nodenumber;
79         entity *ent;
80         edge *link;
81 } vertex;
82
83 typedef struct {int wt_vif; int wt_cif;} wheights;
84
85
86 void get_ents_all()
87 {
88         // create new elements in graph representing data structure
89         //block_info_t *res = obstack_alloc(ob, sizeof(*res));
90         //obstack_grow(&spi.ob, &loc, sizeof(loc));
91 }
92
93 void be_spill_loc(const be_chordal_env_t *chordal_env)
94 {
95
96         spilloc_env_t spi;
97
98         obstack_init(&spi.ob);
99
100         //obstack_grow(&spi.ob, &loc, sizeof(loc));
101
102         // create initial in graph representing data structure
103
104         walk_types_entities(get_irg_frame_type(chordal_env->irg), &get_ents_all , &spi);
105
106         get_irg_entity(chordal_env->irg);
107         get_irg_frame_type(chordal_env->irg);
108
109         obstack_free(&spi.ob, NULL);
110 }