LLVM: include/llvm/CodeGen/ExecutionDomainFix.h Source File (original) (raw)

1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

16

17

18

19

20

21

22#ifndef LLVM_CODEGEN_EXECUTIONDOMAINFIX_H

23#define LLVM_CODEGEN_EXECUTIONDOMAINFIX_H

24

30

31namespace llvm {

32

33class MachineInstr;

34class TargetInstrInfo;

35

36

37

38

39

40

41

42

43

44

45

46

47

48

49

50

52

54

55

56

57

59

60

61

62

64

65

67

69

70

71

73

74

77 static_cast<unsigned>(std::numeric_limits::digits) &&

78 "undefined behavior");

80 }

81

82

85 static_cast<unsigned>(std::numeric_limits::digits) &&

86 "undefined behavior");

88 }

89

90

93 static_cast<unsigned>(std::numeric_limits::digits) &&

94 "undefined behavior");

96 }

97

98

101 }

102

103

106 }

107

108

111 Next = nullptr;

113 }

114};

115

119

124 std::vector<SmallVector<int, 1>> AliasMap;

125 const unsigned NumRegs;

126

127

128 using LiveRegsDVInfo = std::vector<DomainValue *>;

129 LiveRegsDVInfo LiveRegs;

130

131

132

135

137

138public:

141

146 }

147

149

153 }

154

155private:

156

157

159 regIndices(unsigned Reg) const;

160

161

163

164

166 if (DV)

168 return DV;

169 }

170

171

172

173 void release(DomainValue *);

174

175

176

177 DomainValue *resolve(DomainValue *&);

178

179

180 void setLiveReg(int rx, DomainValue *DV);

181

182

183 void kill(int rx);

184

185

186 void force(int rx, unsigned domain);

187

188

189

190 void collapse(DomainValue *dv, unsigned domain);

191

192

193 bool merge(DomainValue *A, DomainValue *B);

194

195

196 void enterBasicBlock(const LoopTraversal::TraversedMBBInfo &TraversedMBB);

197

198

199 void leaveBasicBlock(const LoopTraversal::TraversedMBBInfo &TraversedMBB);

200

201

202 void processBasicBlock(const LoopTraversal::TraversedMBBInfo &TraversedMBB);

203

204

205 bool visitInstr(MachineInstr *);

206

207

208

209 void processDefs(MachineInstr *, bool Kill);

210

211

212 void visitSoftInstr(MachineInstr *, unsigned mask);

213

214

215

216 void visitHardInstr(MachineInstr *, unsigned domain);

217};

218

219}

220

221#endif

static GCRegistry::Add< OcamlGC > B("ocaml", "ocaml 3.10-compatible GC")

static GCRegistry::Add< ErlangGC > A("erlang", "erlang-compatible garbage collector")

assert(ImpDefSCC.getReg()==AMDGPU::SCC &&ImpDefSCC.isDef())

This file defines the SmallVector class.

Represent the analysis usage information of a pass.

AnalysisUsage & addRequired()

void setPreservesAll()

Set by analyses that do not transform their input at all.

void getAnalysisUsage(AnalysisUsage &AU) const override

getAnalysisUsage - This function should be overriden by passes that need analysis information to do t...

ExecutionDomainFix(char &PassID, const TargetRegisterClass &RC)

MachineFunctionProperties getRequiredProperties() const override

bool runOnMachineFunction(MachineFunction &MF) override

runOnMachineFunction - This method must be overloaded to perform the desired machine code transformat...

MachineFunctionPass - This class adapts the FunctionPass interface to allow convenient creation of pa...

void getAnalysisUsage(AnalysisUsage &AU) const override

getAnalysisUsage - Subclasses that override getAnalysisUsage must call this.

Properties which a MachineFunction may have at a given point in time.

MachineFunctionProperties & set(Property P)

This class provides the reaching def analysis.

This is a 'vector' (really, a variable-sized array), optimized for the case when the array is small.

A BumpPtrAllocator that allows only elements of a specific type to be allocated.

TargetInstrInfo - Interface to description of machine instruction set.

TargetRegisterInfo base class - We assume that the target defines a static array of TargetRegisterDes...

A range adaptor for a pair of iterators.

This is an optimization pass for GlobalISel generic memory operations.

int countr_zero(T Val)

Count number of 0's from the least significant bit to the most stopping at the first 1.

A DomainValue is a bit like LiveIntervals' ValNo, but it also keeps track of execution domains.

unsigned getCommonDomains(unsigned mask) const

Return bitmask of domains that are available and in mask.

void clear()

Clear this DomainValue and point to next which has all its data.

SmallVector< MachineInstr *, 8 > Instrs

Twiddleable instructions using or defining these registers.

void setSingleDomain(unsigned domain)

bool isCollapsed() const

A collapsed DomainValue has no instructions to twiddle - it simply keeps track of the domains where t...

DomainValue * Next

Pointer to the next DomainValue in a chain.

void addDomain(unsigned domain)

Mark domain as available.

unsigned AvailableDomains

Bitmask of available domains.

unsigned Refs

Basic reference counting.

unsigned getFirstDomain() const

First domain available.

bool hasDomain(unsigned domain) const

Is domain available?