LLVM: lib/Target/WebAssembly/WebAssemblyAsmPrinter.h Source File (original) (raw)

1

2

3

4

5

6

7

8

9#ifndef LLVM_LIB_TARGET_WEBASSEMBLY_WEBASSEMBLYASMPRINTER_H

10#define LLVM_LIB_TARGET_WEBASSEMBLY_WEBASSEMBLYASMPRINTER_H

11

17

18namespace llvm {

20

22public:

23 static char ID;

24

25private:

29 bool signaturesEmitted = false;

30

31public:

33 std::unique_ptr Streamer)

35 MRI(nullptr), MFI(nullptr) {}

36

38 return "WebAssembly Assembly Printer";

39 }

40

42

43

44

45

46

49 MRI = &MF.getRegInfo();

52 }

53

54

55

56

57

58 void emitEndOfAsmFile(Module &M) override;

59 void EmitProducerInfo(Module &M);

60 void EmitTargetFeatures(Module &M);

61 void EmitFunctionAttributes(Module &M);

63 void emitGlobalVariable(const GlobalVariable *GV) override;

64 void emitJumpTableInfo() override;

66 void emitFunctionBodyStart() override;

67 void emitInstruction(const MachineInstr *MI) override;

68 bool PrintAsmOperand(const MachineInstr *MI, unsigned OpNo,

69 const char *ExtraCode, raw_ostream &OS) override;

70 bool PrintAsmMemoryOperand(const MachineInstr *MI, unsigned OpNo,

71 const char *ExtraCode, raw_ostream &OS) override;

72

73 MVT getRegType(unsigned RegNo) const;

78 bool &InvokeDetected);

80 void emitDecls(const Module &M);

81};

82

83}

84

85#endif

#define LLVM_LIBRARY_VISIBILITY

static void emitConstantPool(MCStreamer &Streamer, MCSection *Section, ConstantPool &CP)

static yaml::StringValue regToString(Register Reg, const TargetRegisterInfo &TRI)

This file declares WebAssembly-specific per-machine-function information.

This file declares the WebAssembly-specific subclass of TargetSubtarget.

TargetMachine & TM

Target machine description.

MachineFunction * MF

The current machine function.

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

bool runOnMachineFunction(MachineFunction &MF) override

Emit the specified function out to the OutStreamer.

MCSymbol - Instances of this class represent a symbol name in the MC file, and MCSymbols are created ...

Representation of each machine instruction.

MachineOperand class - Representation of each machine instruction operand.

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

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

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

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

StringRef getPassName() const override

getPassName - Return a nice clean name for a pass.

Definition WebAssemblyAsmPrinter.h:37

const WebAssemblySubtarget & getSubtarget() const

Definition WebAssemblyAsmPrinter.h:41

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

Definition WebAssemblyAsmPrinter.h:32

bool runOnMachineFunction(MachineFunction &MF) override

Emit the specified function out to the OutStreamer.

Definition WebAssemblyAsmPrinter.h:47

static char ID

Definition WebAssemblyAsmPrinter.h:23

This class is derived from MachineFunctionInfo and contains private WebAssembly-specific information ...

WebAssembly-specific streamer interface, to implement support WebAssembly-specific assembly directive...

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.

OutputIt move(R &&Range, OutputIt Out)

Provide wrappers to std::move which take ranges instead of having to pass begin/end explicitly.

Implement std::hash so that hash_code can be used in STL containers.