LLVM: lib/MCA/CustomBehaviour.cpp Source File (original) (raw)

1

2

3

4

5

6

7

8

9

10

11

12

13

16

17namespace llvm {

18namespace mca {

19

21

27

28std::vector<std::unique_ptr>

31 return std::vector<std::unique_ptr>();

32}

33

34std::vector<std::unique_ptr>

37 return std::vector<std::unique_ptr>();

38}

39

40std::vector<std::unique_ptr>

43 return std::vector<std::unique_ptr>();

44}

45

47

51

53 for (const auto I : IVec) {

57 }

58 }

59 return false;

60}

61

64 for (const auto I : IVec) {

67 if (LatInst->hasValue()) {

68 unsigned Latency = LatInst->getLatency();

69

70 for (auto &W : ID.Writes)

73 }

74 }

75 }

76}

77

82 return std::make_unique(Data);

83 }

84 return std::make_unique(Desc, Data);

85}

86

91

97

98}

99}

This file defines the base class CustomBehaviour which can be inherited from by specific targets (ex.

Legalize the Machine IR a function s Machine IR

This file defines abstractions used by the Pipeline to model register reads, register writes and inst...

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

This is an instance of a target assembly language printer that converts an MCInst to valid target ass...

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

unsigned getOpcode() const

Interface to description of machine instruction set.

This is a 'vector' (really, a variable-sized array), optimized for the case when the array is small.

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

The instances of the Type class are immutable: once they are created, they are never changed.

virtual std::vector< std::unique_ptr< View > > getEndViews(llvm::MCInstPrinter &IP, llvm::ArrayRef< llvm::MCInst > Insts)

Return a vector of Views that will be added after all other Views.

Definition CustomBehaviour.cpp:41

virtual unsigned checkCustomHazard(ArrayRef< InstRef > IssuedInst, const InstRef &IR)

Before the llvm-mca pipeline dispatches an instruction, it first checks for any register or resource ...

Definition CustomBehaviour.cpp:22

virtual ~CustomBehaviour()

virtual std::vector< std::unique_ptr< View > > getPostInstrInfoViews(llvm::MCInstPrinter &IP, llvm::ArrayRef< llvm::MCInst > Insts)

Return a vector of Views that will be added after the InstructionInfoView.

Definition CustomBehaviour.cpp:35

virtual std::vector< std::unique_ptr< View > > getStartViews(llvm::MCInstPrinter &IP, llvm::ArrayRef< llvm::MCInst > Insts)

Return a vector of Views that will be added before all other Views.

Definition CustomBehaviour.cpp:29

An InstRef contains both a SourceMgr index and Instruction pair.

virtual bool canCustomize(const ArrayRef< Instrument * > IVec) const

Definition CustomBehaviour.cpp:52

virtual unsigned getSchedClassID(const MCInstrInfo &MCII, const MCInst &MCI, const SmallVector< Instrument * > &IVec) const

Given an MCInst and a vector of Instrument, a target can return a SchedClassID.

Definition CustomBehaviour.cpp:92

virtual UniqueInstrument createInstrument(StringRef Desc, StringRef Data)

Allocate an Instrument, and return a unique pointer to it.

Definition CustomBehaviour.cpp:78

virtual SmallVector< UniqueInstrument > createInstruments(const MCInst &Inst)

Return a list of unique pointers to Instruments, where each Instrument is allocated by this function.

Definition CustomBehaviour.cpp:88

virtual bool supportsInstrumentType(StringRef Type) const

Definition CustomBehaviour.cpp:48

virtual void customize(const ArrayRef< Instrument * > IVec, llvm::mca::InstrDesc &Desc) const

Definition CustomBehaviour.cpp:62

static const StringRef DESC_NAME

std::unique_ptr< Instrument > UniqueInstrument

char InstructionError< T >::ID

This is an optimization pass for GlobalISel generic memory operations.

class LLVM_GSL_OWNER SmallVector

Forward declaration of SmallVector so that calculateSmallVectorDefaultInlinedElements can reference s...

FunctionAddr VTableAddr uintptr_t uintptr_t Data

An instruction descriptor.