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

1

2

3

4

5

6

7

8

9

10

11

12

13#ifndef LLVM_CODEGEN_TARGETSUBTARGETINFO_H

14#define LLVM_CODEGEN_TARGETSUBTARGETINFO_H

15

25#include

26#include

27

28namespace llvm {

29

30class APInt;

31class MachineFunction;

32class ScheduleDAGMutation;

33class CallLowering;

34class GlobalValue;

35class InlineAsmLowering;

36class InstrItineraryData;

37struct InstrStage;

38class InstructionSelector;

39class LegalizerInfo;

40class MachineInstr;

41struct MachineSchedPolicy;

42struct MCReadAdvanceEntry;

43struct MCWriteLatencyEntry;

44struct MCWriteProcResEntry;

45class RegisterBankInfo;

46class SDep;

47class SelectionDAGTargetInfo;

48class SUnit;

49class TargetFrameLowering;

50class TargetInstrInfo;

51class TargetLowering;

52class TargetRegisterClass;

53class TargetRegisterInfo;

54class TargetSchedModel;

55class Triple;

56

57

58

59

60

61

62

64protected:

72 const unsigned *OC, const unsigned *FP);

73

74public:

75

76

77 using AntiDepBreakMode = enum { ANTIDEP_NONE, ANTIDEP_CRITICAL, ANTIDEP_ALL };

79

84

86

87

88

89

90

91

92

93

94

95

96

99 return nullptr;

100 }

103 return nullptr;

104 }

106

108 return nullptr;

109 }

110

111

112

113

114

116 return nullptr;

117 }

118

119

122 return nullptr;

123 }

124

126

127

128

130

131

132

134

135

136

138 return nullptr;

139 }

140

141

142

143

144

148 return 0;

149 }

150

151

152

153

154

155

156

157

158

159

161 return false;

162 }

163

164

165

166

167

168

169

170

173 }

174

175

176

177

178

179

180

181

182

183

185 return false;

186 }

187

188

189

190

191

192

193

195

196

197

199

200

202

203

205

206

207

208

209

211

212

213

214

215

217

218

219

221

222

224

225

227

228

229

230

231

232

234 unsigned NumRegionInstrs) const {}

235

236

237

238

239

240

241

242

244 unsigned NumRegionInstrs) const {}

245

246

247

248

249

250

252 int UseOpIdx, SDep &Dep,

254 }

255

256

257

259

260

261

262

264 return CriticalPathRCs.clear();

265 }

266

267

268

270 std::vector<std::unique_ptr> &Mutations) const {

271 }

272

273

274

276 std::vector<std::unique_ptr> &Mutations) const {

277 }

278

279

280

282

283

284

287 }

288

289

290

291

292

294

295

296

297 virtual bool useAA() const;

298

299

300

303 }

304

305

307

308

309

310

312 return nullptr;

313 }

314

315

316

317

319

320

322

323

324

325

328 return false;

329 }

330

331

332

333

334 virtual unsigned char

336 return 0;

337 }

338

339

340

341

343

344

345 virtual std::vector getMacroFusions() const { return {}; };

346

347

348

350

351 return true;

352 }

353

355};

356}

357

358#endif

SI optimize exec mask operations pre RA

This file defines the SmallVector class.

Class for arbitrary precision integers.

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

Itinerary data supplied by a subtarget to be used by a target.

Wrapper class representing physical registers. Should be passed by value.

Generic base class for all target subtargets.

Representation of each machine instruction.

Holds all the information related to register banks.

ScheduleDAGSDNodes *(*)(SelectionDAGISel *, CodeGenOptLevel) FunctionPassCtor

Wrapper class representing virtual and physical registers.

Scheduling unit. This is a node in the scheduling DAG.

Targets can subclass this to parameterize the SelectionDAG lowering and instruction selection process...

This class consists of common code factored out of the SmallVector class to reduce code duplication b...

StringRef - Represent a constant reference to a string, i.e.

Information about stack frame layout on the target.

TargetInstrInfo - Interface to description of machine instruction set.

This class defines information used to lower LLVM code to legal SelectionDAG operators that the targe...

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

Provide an instruction scheduling machine model to CodeGen passes.

TargetSubtargetInfo - Generic base class for all target subtargets.

virtual unsigned char classifyGlobalFunctionReference(const GlobalValue *GV) const

Classify a global function reference.

virtual bool requiresDisjointEarlyClobberAndUndef() const

Whether the target has instructions where an early-clobber result operand cannot overlap with an unde...

virtual bool enableJoinGlobalCopies() const

True if the subtarget should enable joining global copies.

~TargetSubtargetInfo() override

virtual bool enableIndirectBrExpand() const

True if the subtarget should run the indirectbr expansion pass.

enum { ANTIDEP_NONE, ANTIDEP_CRITICAL, ANTIDEP_ALL } AntiDepBreakMode

virtual std::vector< MacroFusionPredTy > getMacroFusions() const

Get the list of MacroFusion predicates.

virtual bool enableRALocalReassignment(CodeGenOptLevel OptLevel) const

True if the subtarget should run the local reassignment heuristic of the register allocator.

virtual const SelectionDAGTargetInfo * getSelectionDAGInfo() const

virtual const InlineAsmLowering * getInlineAsmLowering() const

virtual const TargetRegisterInfo * getRegisterInfo() const

getRegisterInfo - If register information is available, return it.

virtual bool isRegisterReservedByUser(Register R) const

virtual std::unique_ptr< PBQPRAConstraint > getCustomPBQPConstraints() const

Return PBQPConstraint(s) for the target.

virtual void getCriticalPathRCs(RegClassVector &CriticalPathRCs) const

virtual bool enableMachineScheduler() const

True if the subtarget should run MachineScheduler after aggressive coalescing.

virtual CodeGenOptLevel getOptLevelToEnablePostRAScheduler() const

virtual RegisterScheduler::FunctionPassCtor getDAGScheduler(CodeGenOptLevel) const

Target can subclass this hook to select a different DAG scheduler.

virtual bool enableSpillageCopyElimination() const

Enable spillage copy elimination in MachineCopyPropagation pass.

virtual bool isDependencyBreaking(const MachineInstr *MI, APInt &Mask) const

Returns true if MI is a dependency breaking instruction for the subtarget.

virtual const CallLowering * getCallLowering() const

virtual bool isXRaySupported() const

virtual void overridePostRASchedPolicy(MachineSchedPolicy &Policy, unsigned NumRegionInstrs) const

Override generic post-ra scheduling policy within a region.

virtual const RegisterBankInfo * getRegBankInfo() const

If the information for the register banks is available, return it.

virtual bool useAA() const

Enable use of alias analysis during code generation (during MI scheduling, DAGCombine,...

virtual void overrideSchedPolicy(MachineSchedPolicy &Policy, unsigned NumRegionInstrs) const

Override generic scheduling policy within a region.

TargetSubtargetInfo(const TargetSubtargetInfo &)=delete

virtual void mirFileLoaded(MachineFunction &MF) const

This is called after a .mir file was loaded.

virtual InstructionSelector * getInstructionSelector() const

virtual AntiDepBreakMode getAntiDepBreakMode() const

virtual bool enableWindowScheduler() const

True if the subtarget should run WindowScheduler.

virtual void getPostRAMutations(std::vector< std::unique_ptr< ScheduleDAGMutation > > &Mutations) const

virtual void getSMSMutations(std::vector< std::unique_ptr< ScheduleDAGMutation > > &Mutations) const

virtual bool ignoreCSRForAllocationOrder(const MachineFunction &MF, MCRegister PhysReg) const

True if the register allocator should use the allocation orders exactly as written in the tablegen de...

virtual bool enablePostRAMachineScheduler() const

True if the subtarget should run a machine scheduler after register allocation.

virtual bool enableAtomicExpand() const

True if the subtarget should run the atomic expansion pass.

virtual bool enableMachinePipeliner() const

True if the subtarget should run MachinePipeliner.

virtual const LegalizerInfo * getLegalizerInfo() const

virtual bool useDFAforSMS() const

Default to DFA for resource management, return false when target will use ProcResource in InstrSchedM...

virtual void adjustSchedDependency(SUnit *Def, int DefOpIdx, SUnit *Use, int UseOpIdx, SDep &Dep, const TargetSchedModel *SchedModel) const

virtual const TargetFrameLowering * getFrameLowering() const

virtual bool isOptimizableRegisterMove(const MachineInstr *MI) const

Returns true if MI is a candidate for move elimination.

virtual const TargetInstrInfo * getInstrInfo() const

virtual bool isZeroIdiom(const MachineInstr *MI, APInt &Mask) const

Returns true if MI is a dependency breaking zero-idiom instruction for the subtarget.

virtual bool enableMachineSchedDefaultSched() const

True if the machine scheduler should disable the TLI preference for preRA scheduling with the source ...

virtual bool enablePostRAScheduler() const

True if the subtarget should run a scheduler after register allocation.

virtual bool enableSubRegLiveness() const

Enable tracking of subregister liveness in register allocator.

virtual const TargetLowering * getTargetLowering() const

virtual bool addrSinkUsingGEPs() const

Sink addresses into blocks using GEP instructions rather than pointer casts and arithmetic.

virtual const InstrItineraryData * getInstrItineraryData() const

getInstrItineraryData - Returns instruction itinerary data for the target or specific subtarget.

virtual unsigned resolveSchedClass(unsigned SchedClass, const MachineInstr *MI, const TargetSchedModel *SchedModel) const

Resolve a SchedClass at runtime, where SchedClass identifies an MCSchedClassDesc with the isVariant p...

TargetSubtargetInfo()=delete

TargetSubtargetInfo & operator=(const TargetSubtargetInfo &)=delete

virtual bool enableEarlyIfConversion() const

Enable the use of the early if conversion pass.

Triple - Helper class for working with autoconf configuration names.

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

This is an optimization pass for GlobalISel generic memory operations.

CodeGenOptLevel

Code generation optimization level.

These values represent a non-pipelined step in the execution of an instruction.

Specify the number of cycles allowed after instruction issue before a particular use operand reads it...

Specify the latency in cpu cycles for a particular scheduling class and def index.

Identify one of the processor resource kinds consumed by a particular scheduling class for the specif...

Define a generic scheduling policy for targets that don't provide their own MachineSchedStrategy.