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

1

2

3

4

5

6

7

8

9

10

11

12

13#ifndef LLVM_CODEGEN_MIRFORMATTER_H

14#define LLVM_CODEGEN_MIRFORMATTER_H

15

20#include

21#include

22

23namespace llvm {

24

31

32

34public:

37

40

41

42

43

45 std::optional OpIdx, int64_t Imm) const {

46 OS << Imm;

47 }

48

49

50

54 llvm_unreachable("target did not implement parsing MIR immediate mnemonic");

55 }

56

57

58

59

60 virtual void

63 PSV.printCustom(OS);

64 }

65

66

71 "target did not implement parsing MIR custom pseudo source value");

72 }

73

74

75

76

79

80

81

82

87};

88

89}

90

91#endif

function_ref< bool(StringRef::iterator Loc, const Twine &)> ErrorCallbackType

MachineInstr unsigned OpIdx

virtual bool parseImmMnemonic(const unsigned OpCode, const unsigned OpIdx, StringRef Src, int64_t &Imm, ErrorCallbackType ErrorCallback) const

Implement target specific parsing of immediate mnemonics.

Definition MIRFormatter.h:51

function_ref< bool(StringRef::iterator Loc, const Twine &)> ErrorCallbackType

Definition MIRFormatter.h:36

static LLVM_ABI bool parseIRValue(StringRef Src, MachineFunction &MF, PerFunctionMIParsingState &PFS, const Value *&V, ErrorCallbackType ErrorCallback)

Helper functions to parse IR value from MIR serialization format which will be useful for target spec...

virtual ~MIRFormatter()=default

virtual void printImm(raw_ostream &OS, const MachineInstr &MI, std::optional< unsigned > OpIdx, int64_t Imm) const

Implement target specific printing for machine operand immediate value, so that we can have more mean...

Definition MIRFormatter.h:44

virtual void printCustomPseudoSourceValue(raw_ostream &OS, ModuleSlotTracker &MST, const PseudoSourceValue &PSV) const

Implement target specific printing of target custom pseudo source value.

Definition MIRFormatter.h:61

virtual bool parseCustomPseudoSourceValue(StringRef Src, MachineFunction &MF, PerFunctionMIParsingState &PFS, const PseudoSourceValue *&PSV, ErrorCallbackType ErrorCallback) const

Implement target specific parsing of target custom pseudo source value.

Definition MIRFormatter.h:67

static LLVM_ABI void printIRValue(raw_ostream &OS, const Value &V, ModuleSlotTracker &MST)

Helper functions to print IR value as MIR serialization format which will be useful for target specif...

Representation of each machine instruction.

Manage lifetime of a slot tracker for printing IR.

Special value supplied for machine level alias analysis.

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

Twine - A lightweight data structure for efficiently representing the concatenation of temporary valu...

LLVM Value Representation.

An efficient, type-erasing, non-owning reference to a callable.

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

#define llvm_unreachable(msg)

Marks that the current location is not supposed to be reachable.

This is an optimization pass for GlobalISel generic memory operations.