LLVM: include/llvm/CodeGen/LiveRangeCalc.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

23#ifndef LLVM_CODEGEN_LIVERANGECALC_H

24#define LLVM_CODEGEN_LIVERANGECALC_H

25

35#include

36

37namespace llvm {

38

43

45

52

53

54

55 using LiveOutPair = std::pair<VNInfo *, MachineDomTreeNode *>;

56

57

59

60

61

62

63

65

66

67

68

69

70

71

72

73

74

75

76

78 EntryInfoMap EntryInfos;

79

80

81

82

83

84

85

86

87

88

89

90

91

92

93

94

95

96

97 LiveOutMap Map;

98

99

100

101 struct LiveInBlock {

102

103

105

106

107

109

110

111

112

114

115

117

119 : LR(LR), DomNode(node), Kill(kill) {}

120 };

121

122

123

124

125

127

128

129

133

134

135

136

137

138

139

140

141

142

143

144

145

146

147

148

149

152

153

154

155

156

157

158 void updateSSA();

159

160

161

162 void updateFromLiveIns();

163

164protected:

165

166

172

173

175

176public:

178

179

180

181

182

183

184

185

186

187

188

189

190

193

194

195

196

197

198

199

200

201

202

203

204

205

206

207

210

211

212

213

214

215

216

217

218

219

220

221

222

223

224

225

226

227

228

229

231 Seen.set(MBB->getNumber());

232 Map[MBB] = LiveOutPair(VNI, nullptr);

233 }

234

235

236

237

238

239

240

241

242

243

246 LiveIn.push_back(LiveInBlock(LR, DomNode, Kill));

247 }

248

249

250

251

252

253

254

255

257

258

259

260

261

262 [[maybe_unused]] LLVM_ABI static bool

265};

266

267}

268

269#endif

This file implements the BitVector class.

This file defines the DenseMap class.

This file implements an indexed map.

This file defines the SmallVector class.

ArrayRef - Represent a constant reference to an array (0 or more elements consecutively in memory),...

Base class for the actual dominator tree node.

SlotIndexes * getIndexes()

Definition LiveRangeCalc.h:169

static LLVM_ABI bool isJointlyDominated(const MachineBasicBlock *MBB, ArrayRef< SlotIndex > Defs, const SlotIndexes &Indexes)

A diagnostic function to check if the end of the block MBB is jointly dominated by the blocks corresp...

MachineDominatorTree * getDomTree()

Definition LiveRangeCalc.h:170

void addLiveInBlock(LiveRange &LR, MachineDomTreeNode *DomNode, SlotIndex Kill=SlotIndex())

addLiveInBlock - Add a block with an unknown live-in value.

Definition LiveRangeCalc.h:244

LLVM_ABI void resetLiveOutMap()

Reset Map and Seen fields.

VNInfo::Allocator * getVNAlloc()

Definition LiveRangeCalc.h:171

LLVM_ABI void reset(const MachineFunction *mf, SlotIndexes *SI, MachineDominatorTree *MDT, VNInfo::Allocator *VNIA)

reset - Prepare caches for a new set of non-overlapping live ranges.

const MachineFunction * getMachineFunction()

Some getters to expose in a read-only way some private fields to subclasses.

Definition LiveRangeCalc.h:167

LLVM_ABI void extend(LiveRange &LR, SlotIndex Use, Register PhysReg, ArrayRef< SlotIndex > Undefs)

Extend the live range of LR to reach Use.

const MachineRegisterInfo * getRegInfo() const

Definition LiveRangeCalc.h:168

LLVM_ABI void calculateValues()

calculateValues - Calculate the value that will be live-in to each block added with addLiveInBlock.

void setLiveOutValue(MachineBasicBlock *MBB, VNInfo *VNI)

setLiveOutValue - Indicate that VNI is live out from MBB.

Definition LiveRangeCalc.h:230

This class represents the liveness of a register, stack slot, etc.

DominatorTree Class - Concrete subclass of DominatorTreeBase that is used to compute a normal dominat...

MachineRegisterInfo - Keep track of information for virtual and physical registers,...

Wrapper class representing virtual and physical registers.

SlotIndex - An opaque wrapper around machine indexes.

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

A Use represents the edge between a Value definition and its users.

VNInfo - Value Number Information.

BumpPtrAllocator Allocator

LLVM Value Representation.

This is an optimization pass for GlobalISel generic memory operations.

DomTreeNodeBase< MachineBasicBlock > MachineDomTreeNode