-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrematerialize.h
More file actions
40 lines (32 loc) · 1022 Bytes
/
Copy pathrematerialize.h
File metadata and controls
40 lines (32 loc) · 1022 Bytes
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
/* contains functions and data for implementing rematerialization in
* the chow allocator.
*/
#ifndef __GUARD_REMATERIALIZE_H
#define __GUARD_REMATERIALIZE_H
/*----------------------------INCLUDES----------------------------*/
#include <Shared.h>
#include <vector>
#include "types.h"
#include "debug.h"
#include "union_find.h"
namespace Remat {
/*---------------------------TYPES-----------------------------*/
enum LatticeVal {TOP = 0, CONST = -1, BOTTOM = -2};
struct LatticeElem
{
LatticeVal val;
Operation* op;
};
typedef std::vector<std::pair<Variable,Variable> > SplitList;
/*-------------------------VARIABLES---------------------------*/
extern std::vector<LatticeElem> tags;
extern UFSet** remat_sets;
/*-------------------------FUNCTIONS---------------------------*/
void ComputeTags();
void DumpTags();
void AddSplit(Variable parent_ssa_name, Variable child_ssa_name);
const SplitList& GetSplits(void);
bool TagsAllEqual(Variable v1, Variable v2);
void SplitRematerializableLiveRanges();
}
#endif