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

Go to the documentation of this file.

1

2

3

4

5

6

7

8

9

10

11

12

13#ifndef LLVM_CODEGEN_BASIC_BLOCK_AND_INFERENCE_H

14#define LLVM_CODEGEN_BASIC_BLOCK_AND_INFERENCE_H

15

19

20namespace llvm {

21

23private:

24 using Edge = std::pair<const MachineBasicBlock *, const MachineBasicBlock *>;

29

30 struct WeightInfo {

31

32 BlockWeightMap BlockWeights;

33

34 EdgeWeightMap EdgeWeights;

35 };

36

37public:

38 static char ID;

40

42 return "Basic Block Matching and Inference";

43 }

44

46

48

50

51private:

53

55

57 WeightInfo &MatchWeight);

58};

59

60}

61

62#endif

This file provides the interface for the profile inference algorithm, profi.

Represent the analysis usage information of a pass.

std::optional< WeightInfo > getWeightInfo(StringRef FuncName) const

static char ID

Definition BasicBlockMatchingAndInference.h:38

StringRef getPassName() const override

getPassName - Return a nice clean name for a pass.

Definition BasicBlockMatchingAndInference.h:41

bool runOnMachineFunction(MachineFunction &F) override

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

BasicBlockMatchingAndInference()

void getAnalysisUsage(AnalysisUsage &AU) const override

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

MachineFunctionPass(char &ID)

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

StringMap - This is an unconventional map that is specialized for handling keys that are "strings",...

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

This is an optimization pass for GlobalISel generic memory operations.