forked from SEL4PROJ/chronos4.2
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathscp_address.h
64 lines (56 loc) · 1.85 KB
/
scp_address.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
56
57
58
59
60
61
62
63
#ifndef REG_ADDRESS_H
#define REG_ADDRESS_H
#include "cache.h"
#include "stdlib.h"
#include "infeasible.h"
#include "tcfg.h"
#include "loops.h"
#include "isa.h"
#include "common.h"
#include "symexec.h"
/*** TEMPORAL SCOPE DATA STRUCTURE ***/
struct temporal_scope {
int loop_id;
int lw;
int up;
int flag;
};
typedef struct temporal_scope ts_s;
typedef struct temporal_scope* ts_p;
#define EQUAL_TS 0
#define OLAP_TS 1
#define SEP_TS -1
int cmpTS(ts_p ts1, ts_p ts2);
int cmpTSset(worklist_p tsSet1, worklist_p tsSet2, int lpId);
void cpyTS(ts_p src, ts_p dst);
void printTS(FILE *fp, ts_p as);
void printTSset(FILE *fp, worklist_p tsSet);
int eqTSset(worklist_p tsSet1,worklist_p tsSet2, int lpId);
int mergeTSset(worklist_p dstSet, worklist_p srcSet, int lpId);
/*estimate execution counts of lp given temporal scope*/
int estScopeSize(worklist_p tsSet, int lpId);
/*** SCOPED MEMORY BLOCK DATA STRUCTURE ***/
#define SELF_CONFLICT 1
#define RENEWABLE 1
#define UNKNOWN_ADDR -1
void printSAddr(FILE *fp, saddr_p memblk, int full); //print one scoped mem
void printSAddrSet(FILE *fp, worklist_p sAddrSet,int full);//print set scpmem
void cpySAddr(saddr_p dst, saddr_p src);
saddr_p createSAddr(int addrBlk, int instAddr, int flag, worklist_p orgTSset);
worklist_p findBlkAddr(int addrBlk, worklist_p SAddrSet);
void rearrangeTS(saddr_p smem);
int cmpSAddr(saddr_p smem1, saddr_p smem2, int lpId);
void setAddrDebugFile(FILE *fp);
int estScopeSizeOld(worklist_p tsSet, int lpId);
/*** SCOPE-AWARE ADDRESS ANALYSIS ***/
FILE *dbgAddr;
struct size_cons {
char name[256];
int size;
struct size_cons *next;
};
typedef struct size_cons size_cons_s;
typedef struct size_cons* size_cons_p;
/*** general calling function ***/
void classified_address_analysis(char *bin_fname);
#endif