LLVM: include/llvm/Analysis/Utils/ImportedFunctionsInliningStatistics.h Source File (original) (raw)

1

2

3

4

5

6

7

8

9

10

11

12#ifndef LLVM_ANALYSIS_UTILS_IMPORTEDFUNCTIONSINLININGSTATISTICS_H

13#define LLVM_ANALYSIS_UTILS_IMPORTEDFUNCTIONSINLININGSTATISTICS_H

14

19#include

20#include

21

22namespace llvm {

25

26

27

28

29

30

31

32

33

34

35

36

37

38

39

40

41

42

43

44

46private:

47

48 struct InlineGraphNode {

49

50 InlineGraphNode() = default;

51 InlineGraphNode(InlineGraphNode &&) = default;

52 InlineGraphNode &operator=(InlineGraphNode &&) = default;

53

55

56 int32_t NumberOfInlines = 0;

57

58

59 int32_t NumberOfRealInlines = 0;

60 bool Imported = false;

61 bool Visited = false;

62 };

63

64public:

68

69

71

73

74

75

77

78private:

79

80 InlineGraphNode &createInlineGraphNode(const Function &);

81 void calculateRealInlines();

82 void dfs(InlineGraphNode &GraphNode);

83

84 using NodesMapTy =

86 using SortedNodesTy =

87 std::vector<const NodesMapTy::MapEntryTy*>;

88

89

90 SortedNodesTy getSortedNodes();

91

92private:

93

94

95

96

97 NodesMapTy NodesMap;

98

99 std::vector NonImportedCallers;

100 int AllFunctions = 0;

101 int ImportedFunctions = 0;

103};

104

110

111}

112

113#endif

This file defines the StringMap class.

This file defines the SmallVector class.

LLVM_ABI void setModuleInfo(const Module &M)

Set information like AllFunctions, ImportedFunctions, ModuleName.

ImportedFunctionsInliningStatistics()=default

LLVM_ABI void dump(bool Verbose)

Dump stats computed with InlinerStatistics class.

ImportedFunctionsInliningStatistics(const ImportedFunctionsInliningStatistics &)=delete

LLVM_ABI void recordInline(const Function &Caller, const Function &Callee)

Record inline of.

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

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.

InlinerFunctionImportStatsOpts

Definition ImportedFunctionsInliningStatistics.h:105