-
Notifications
You must be signed in to change notification settings - Fork 10
/
liveness.h
55 lines (45 loc) · 1.17 KB
/
liveness.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
#ifndef LIVENESS_H
#define LIVENESS_H
/*
typedef struct Live_moveList_ *Live_moveList;
struct Live_moveList_ {
G_node src, dst;
Live_moveList tail;
};
Live_moveList Live_MoveList(G_node src, G_node dst, Live_moveList tail);
*/
typedef struct Live_move_ *Live_move;
struct Live_move_ {
G_node src;
G_node dst;
AS_instr as;
};
Live_move Live_Move(G_node src, G_node dst, AS_instr as);
typedef struct Live_moveList_ *Live_moveList;
struct Live_moveList_ {
Live_move head;
Live_moveList tail;
};
Live_moveList Live_MoveList(Live_move move, Live_moveList tail);
bool Live_inMoveList(Live_move one, Live_moveList list);
Live_moveList Live_removeOne(Live_move one, Live_moveList list);
typedef struct Live_additionalInfo_ *Live_additionalInfo;
struct Live_additionalInfo_ {
int index;
G_nodeList adjList;
int degree;
G_node alias;
Temp_temp color;
Live_moveList moveList;
};
Live_additionalInfo Live_getAdditionalInfo(G_table table, G_node n);
struct Live_graph {
G_graph graph;
Live_moveList moves;
bool **adjSet;
G_table table;
};
Temp_temp Live_gtemp(G_node n);
void addEdge(bool **adjSet, G_node u, G_node v, G_table table);
struct Live_graph Live_liveness(G_graph flow);
#endif