LLVM: lib/Target/PowerPC/PPCSubtarget.h Source File (original) (raw)

1

2

3

4

5

6

7

8

9

10

11

12

13#ifndef LLVM_LIB_TARGET_POWERPC_PPCSUBTARGET_H

14#define LLVM_LIB_TARGET_POWERPC_PPCSUBTARGET_H

15

26

27#define GET_SUBTARGETINFO_HEADER

28#include "PPCGenSubtargetInfo.inc"

29

30

31#undef PPC

32

33namespace llvm {

34class SelectionDAGTargetInfo;

35class StringRef;

36

37namespace PPC {

38

39enum {

66};

67}

68

69class GlobalValue;

70

72public:

78

79protected:

80

81

83

84

86

87

88#define GET_SUBTARGETINFO_MACRO(ATTRIBUTE, DEFAULT, GETTER) \

89 bool ATTRIBUTE = DEFAULT;

90#include "PPCGenSubtargetInfo.inc"

91

92

94

96

98

103

104

105 std::unique_ptr TSInfo;

106

107

112

113public:

114

115

116

119

121

122

123

125

126

127

128

130

131

132

134

135

136

140

148

150

155

156

157

158

162

163private:

164 void initializeEnvironment();

166

167public:

168

170 if (isAIXABI() && !HasHardFloat)

172 return !HasHardFloat;

173 }

174

175

177

178

179#define GET_SUBTARGETINFO_MACRO(ATTRIBUTE, DEFAULT, GETTER) \

180 bool GETTER() const { return ATTRIBUTE; }

181#include "PPCGenSubtargetInfo.inc"

182

184 return Align(16);

185 }

186

188 if (isPPC64())

189

190 return 288;

191

192

193

195 }

196

200

202

203 bool isTargetELF() const { return getTargetTriple().isOSBinFormatELF(); }

204 bool isTargetMachO() const { return getTargetTriple().isOSBinFormatMachO(); }

205 bool isTargetLinux() const { return getTargetTriple().isOSLinux(); }

206

207 bool isAIXABI() const { return getTargetTriple().isOSAIX(); }

210

214

215

216

218

219

221

223

225

228 void getCriticalPathRCs(RegClassVector &CriticalPathRCs) const override;

229

232

233 bool useAA() const override;

234

236

238

239

241

243

244

247

248

254

257 "Should only be called when the target uses descriptors.");

258 return IsPPC64 ? 8 : 4;

259 }

260

263 "Should only be called when the target uses descriptors.");

264 return IsPPC64 ? 16 : 8;

265 }

266

269 "Should only be called when the target uses descriptors.");

270 return IsPPC64 ? PPC::X11 : PPC::R11;

271 }

272

275 "Should only be called when the target is a TOC based ABI.");

276 return IsPPC64 ? PPC::X2 : PPC::R2;

277 }

278

281 "Should only be called for targets with a thread pointer register.");

282 return IsPPC64 ? PPC::X13 : PPC::R13;

283 }

284

286 return IsPPC64 ? PPC::X1 : PPC::R1;

287 }

288

290

292 return PredictableSelectIsExpensive;

293 }

294

295

296

299 return 1;

301 return 2;

302 return 0;

303 }

304

305

310};

311}

312

313#endif

assert(UImm &&(UImm !=~static_cast< T >(0)) &&"Invalid immediate!")

This file describes how to lower LLVM calls to machine code calls.

Interface for Targets to specify which operations they can successfully select and how the others sho...

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

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

const PPCRegisterInfo & getRegisterInfo() const

getRegisterInfo - TargetInstrInfo is a superset of MRegister info.

Definition PPCSubtarget.h:71

bool IsLittleEndian

Definition PPCSubtarget.h:95

std::unique_ptr< InstructionSelector > InstSelector

Definition PPCSubtarget.h:111

bool enableMachinePipeliner() const override

Pipeliner customization.

bool useDFAforSMS() const override

Machine Pipeliner customization.

bool is32BitELFABI() const

Definition PPCSubtarget.h:212

std::unique_ptr< LegalizerInfo > Legalizer

Definition PPCSubtarget.h:109

PPCTargetLowering TLInfo

Definition PPCSubtarget.h:102

POPCNTDKind

Definition PPCSubtarget.h:73

@ POPCNTD_Fast

Definition PPCSubtarget.h:76

@ POPCNTD_Slow

Definition PPCSubtarget.h:75

@ POPCNTD_Unavailable

Definition PPCSubtarget.h:74

unsigned descriptorTOCAnchorOffset() const

Definition PPCSubtarget.h:255

bool isTargetMachO() const

Definition PPCSubtarget.h:204

MVT getScalarIntVT() const

Definition PPCSubtarget.h:242

PPCFrameLowering FrameLowering

Definition PPCSubtarget.h:100

bool isAIXABI() const

Definition PPCSubtarget.h:207

const CallLowering * getCallLowering() const override

const LegalizerInfo * getLegalizerInfo() const override

unsigned getGPRAllocationOrderIdx() const

Definition PPCSubtarget.h:297

bool useSoftFloat() const

Definition PPCSubtarget.h:169

std::unique_ptr< RegisterBankInfo > RegBankInfo

Definition PPCSubtarget.h:110

bool isXRaySupported() const override

Definition PPCSubtarget.h:289

POPCNTDKind HasPOPCNTD

Definition PPCSubtarget.h:97

InstrItineraryData InstrItins

Selected instruction itineraries (one entry per itinerary class.)

Definition PPCSubtarget.h:85

Align StackAlignment

stackAlignment - The minimum alignment known to hold of the stack frame on entry to the function and ...

Definition PPCSubtarget.h:82

const PPCFrameLowering * getFrameLowering() const override

Definition PPCSubtarget.h:141

bool needsSwapsForVSXMemOps() const

Definition PPCSubtarget.h:197

PPCInstrInfo InstrInfo

Definition PPCSubtarget.h:101

void getCriticalPathRCs(RegClassVector &CriticalPathRCs) const override

bool isUsingPCRelativeCalls() const

bool enableSubRegLiveness() const override

bool usesFunctionDescriptors() const

True if the ABI is descriptor based.

Definition PPCSubtarget.h:249

const PPCTargetLowering * getTargetLowering() const override

Definition PPCSubtarget.h:145

const InstrItineraryData * getInstrItineraryData() const override

getInstrItins - Return the instruction itineraries based on subtarget selection.

Definition PPCSubtarget.h:137

InstructionSelector * getInstructionSelector() const override

bool enableEarlyIfConversion() const override

Originally, this function return hasISEL().

Definition PPCSubtarget.h:217

MCRegister getEnvironmentPointerRegister() const

Definition PPCSubtarget.h:267

unsigned CPUDirective

Which cpu directive was used.

Definition PPCSubtarget.h:93

const PPCInstrInfo * getInstrInfo() const override

Definition PPCSubtarget.h:144

unsigned getRedZoneSize() const

Definition PPCSubtarget.h:187

AntiDepBreakMode getAntiDepBreakMode() const override

MCRegister getThreadPointerRegister() const

Definition PPCSubtarget.h:279

bool isSVR4ABI() const

Definition PPCSubtarget.h:208

unsigned getCPUDirective() const

getCPUDirective - Returns the -m directive specified for the cpu.

Definition PPCSubtarget.h:133

bool enableSpillageCopyElimination() const override

Definition PPCSubtarget.h:237

POPCNTDKind hasPOPCNTD() const

Definition PPCSubtarget.h:201

bool isLittleEndian() const

Definition PPCSubtarget.h:176

bool isTargetLinux() const

Definition PPCSubtarget.h:205

MCRegister getTOCPointerRegister() const

Definition PPCSubtarget.h:273

bool isTargetELF() const

Definition PPCSubtarget.h:203

MCRegister getStackPointerRegister() const

Definition PPCSubtarget.h:285

const SelectionDAGTargetInfo * getSelectionDAGInfo() const override

bool useAA() const override

Align getStackAlignment() const

getStackAlignment - Returns the minimum alignment known to hold of the stack frame on entry to the fu...

Definition PPCSubtarget.h:129

PPCSubtarget & initializeSubtargetDependencies(StringRef CPU, StringRef TuneCPU, StringRef FS)

initializeSubtargetDependencies - Initializes using a CPU, a TuneCPU, and feature string so that we c...

bool is64BitELFABI() const

Definition PPCSubtarget.h:211

CodeModel::Model getCodeModel(const TargetMachine &TM, const GlobalValue *GV) const

Calculates the effective code model for argument GV.

PPCSubtarget(const Triple &TT, StringRef CPU, StringRef TuneCPU, StringRef FS, const PPCTargetMachine &TM)

This constructor initializes the data members to match that of the specified triple.

Align getPlatformStackAlignment() const

Definition PPCSubtarget.h:183

const PPCTargetMachine & getTargetMachine() const

Definition PPCSubtarget.h:154

const PPCTargetMachine & TM

Definition PPCSubtarget.h:99

bool isPredictableSelectIsExpensive() const

Definition PPCSubtarget.h:291

std::unique_ptr< const SelectionDAGTargetInfo > TSInfo

Definition PPCSubtarget.h:105

bool enableMachineScheduler() const override

Scheduling customization.

void overrideSchedPolicy(MachineSchedPolicy &Policy, const SchedRegion &Region) const override

const RegisterBankInfo * getRegBankInfo() const override

const PPCRegisterInfo * getRegisterInfo() const override

Definition PPCSubtarget.h:151

bool isGVIndirectSymbol(const GlobalValue *GV) const

True if the GV will be accessed via an indirect symbol.

unsigned descriptorEnvironmentPointerOffset() const

Definition PPCSubtarget.h:261

std::unique_ptr< CallLowering > CallLoweringInfo

GlobalISel related APIs.

Definition PPCSubtarget.h:108

bool enablePostRAScheduler() const override

This overrides the PostRAScheduler bit in the SchedModel for each CPU.

void ParseSubtargetFeatures(StringRef CPU, StringRef TuneCPU, StringRef FS)

ParseSubtargetFeatures - Parses features string setting specified subtarget options.

Common code between 32-bit and 64-bit PowerPC targets.

Holds all the information related to register banks.

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

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

Primary interface to the complete machine description for the target machine.

Triple - Helper class for working with autoconf configuration names.

@ DIR_64

Definition PPCSubtarget.h:65

@ DIR_E500mc

Definition PPCSubtarget.h:51

@ DIR_PWR9

Definition PPCSubtarget.h:61

@ DIR_PWR7

Definition PPCSubtarget.h:59

@ DIR_PWR10

Definition PPCSubtarget.h:62

@ DIR_PWR4

Definition PPCSubtarget.h:54

@ DIR_603

Definition PPCSubtarget.h:45

@ DIR_PWR5X

Definition PPCSubtarget.h:56

@ DIR_970

Definition PPCSubtarget.h:48

@ DIR_602

Definition PPCSubtarget.h:44

@ DIR_PWR6X

Definition PPCSubtarget.h:58

@ DIR_PWR5

Definition PPCSubtarget.h:55

@ DIR_7400

Definition PPCSubtarget.h:46

@ DIR_440

Definition PPCSubtarget.h:42

@ DIR_PWR3

Definition PPCSubtarget.h:53

@ DIR_PWR6

Definition PPCSubtarget.h:57

@ DIR_E500

Definition PPCSubtarget.h:50

@ DIR_PWR8

Definition PPCSubtarget.h:60

@ DIR_750

Definition PPCSubtarget.h:47

@ DIR_A2

Definition PPCSubtarget.h:49

@ DIR_32

Definition PPCSubtarget.h:41

@ DIR_NONE

Definition PPCSubtarget.h:40

@ DIR_PWR_FUTURE

Definition PPCSubtarget.h:64

@ DIR_E5500

Definition PPCSubtarget.h:52

@ DIR_PWR11

Definition PPCSubtarget.h:63

@ DIR_601

Definition PPCSubtarget.h:43

This is an optimization pass for GlobalISel generic memory operations.

LLVM_ABI void report_fatal_error(Error Err, bool gen_crash_diag=true)

This struct is a compact representation of a valid (non-zero power of two) alignment.

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

A region of an MBB for scheduling.