LLVM: lib/Target/AMDGPU/AMDGPUAsmPrinter.h Source File (original) (raw)

1

2

3

4

5

6

7

8

9

10

11

12

13

14#ifndef LLVM_LIB_TARGET_AMDGPU_AMDGPUASMPRINTER_H

15#define LLVM_LIB_TARGET_AMDGPU_AMDGPUASMPRINTER_H

16

20

21namespace llvm {

22

29

35}

36}

37

39public:

40 static char ID;

41

42private:

43 unsigned CodeObjectVersion;

44 void initializeTargetID(const Module &M);

45

47 *ResourceUsage;

48

50

52

53 std::unique_ptrAMDGPU::HSAMD::MetadataStreamer HSAMetadataStream;

54

56

57

59

64

65

66

72 void emitCommonFunctionComments(const MCExpr *NumVGPR, const MCExpr *NumAGPR,

73 const MCExpr *TotalNumVGPR,

74 const MCExpr *NumSGPR,

79 bool isModuleEntryFunction, bool hasMAIInsts);

80

82

86

87 void initTargetStreamer(Module &M);

88

90

91

92

93

94 void validateMCResourceInfo(Function &F);

95

96public:

98 std::unique_ptr Streamer);

99

101

103

105

109

110

111

113

114

115

116

119

120

121

123

124

126

128

130

132

134

136

138

140

142

144 const char *ExtraCode, raw_ostream &O) override;

145

146protected:

148

152};

153

154}

155

156#endif

MC infrastructure to propagate the function level resource usage info.

Defines struct to track resource usage and hardware flags for kernels and entry functions.

static char ID

Definition AMDGPUAsmPrinter.h:40

void emitFunctionEntryLabel() override

EmitFunctionEntryLabel - Emit the label that is the entrypoint for the function.

const MCSubtargetInfo * getGlobalSTI() const

void emitImplicitDef(const MachineInstr *MI) const override

Targets can override this to customize the output of IMPLICIT_DEF instructions in verbose mode.

std::vector< std::string > DisasmLines

Definition AMDGPUAsmPrinter.h:149

void emitStartOfAsmFile(Module &M) override

This virtual method can be overridden by targets that want to emit something at the start of their fi...

StringRef getPassName() const override

getPassName - Return a nice clean name for a pass.

std::vector< std::string > HexLines

Definition AMDGPUAsmPrinter.h:149

bool IsTargetStreamerInitialized

Definition AMDGPUAsmPrinter.h:151

void emitGlobalVariable(const GlobalVariable *GV) override

Emit the specified global variable to the .s file.

size_t DisasmLineMaxLen

Definition AMDGPUAsmPrinter.h:150

bool lowerOperand(const MachineOperand &MO, MCOperand &MCOp) const

Wrapper for MCInstLowering.lowerOperand() for the tblgen'erated pseudo lowering.

bool lowerPseudoInstExpansion(const MachineInstr *MI, MCInst &Inst)

tblgen'erated driver function for lowering simple MI->MC pseudo instructions.

void getAnalysisUsage(AnalysisUsage &AU) const override

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

bool PrintAsmOperand(const MachineInstr *MI, unsigned OpNo, const char *ExtraCode, raw_ostream &O) override

Print the specified operand of MI, an INLINEASM instruction, using the specified assembler variant.

bool runOnMachineFunction(MachineFunction &MF) override

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

void emitFunctionBodyEnd() override

Targets can override this to emit stuff after the last basic block in the function.

bool doFinalization(Module &M) override

doFinalization - Virtual method overriden by subclasses to do any necessary clean up after all passes...

void emitEndOfAsmFile(Module &M) override

This virtual method can be overridden by targets that want to emit something at the end of their file...

AMDGPUAsmPrinter(TargetMachine &TM, std::unique_ptr< MCStreamer > Streamer)

bool doInitialization(Module &M) override

doInitialization - Virtual method overridden by subclasses to do any necessary initialization before ...

void emitFunctionBodyStart() override

Targets can override this to emit stuff before the first basic block in the function.

const MCExpr * lowerConstant(const Constant *CV, const Constant *BaseCV, uint64_t Offset) override

Lower the specified LLVM Constant to an MCExpr.

void emitBasicBlockStart(const MachineBasicBlock &MBB) override

Targets can override this to emit stuff at the start of a basic block.

void emitInstruction(const MachineInstr *MI) override

Implemented in AMDGPUMCInstLower.cpp.

AMDGPUTargetStreamer * getTargetStreamer() const

Represent the analysis usage information of a pass.

TargetMachine & TM

Target machine description.

MachineFunction * MF

The current machine function.

AsmPrinter(TargetMachine &TM, std::unique_ptr< MCStreamer > Streamer, char &ID=AsmPrinter::ID)

This is an important base class in LLVM.

MCCodeEmitter - Generic instruction encoding interface.

Base class for the full range of assembler expressions which are needed for parsing.

Instances of this class represent a single low-level machine instruction.

Instances of this class represent operands of the MCInst class.

Generic base class for all target subtargets.

Representation of each machine instruction.

MachineOperand class - Representation of each machine instruction operand.

A Module instance is used to store all the information related to an LLVM module.

SmallString - A SmallString is just a SmallVector with methods and accessors that make it work better...

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

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

LLVM Value Representation.

This class implements an extremely fast bulk output stream that can only output to a stream.

This is an optimization pass for GlobalISel generic memory operations.

AMDGPUResourceUsageAnalysisImpl::SIFunctionResourceInfo FunctionResourceInfo

Track resource usage for kernels / entry functions.