LLVM: include/llvm/Transforms/Instrumentation/MemProfUse.h Source File (original) (raw)

1

2

3

4

5

6

7

8

9

10

11

12#ifndef LLVM_TRANSFORMS_INSTRUMENTATION_MEMPROFUSE_H

13#define LLVM_TRANSFORMS_INSTRUMENTATION_MEMPROFUSE_H

14

20

21#include <unordered_map>

22

23namespace llvm {

27

28namespace vfs {

30}

31

33public:

35 std::string MemoryProfileFile,

38

39private:

40

41

42 bool

43 annotateGlobalVariables(Module &M,

45 std::string MemoryProfileFileName;

47};

48

50

51

52

56 return true;

57 });

58

61 return Loc.getHashCode();

62 }

63};

64

66 std::unordered_map<LineLocation, LineLocation, LineLocationHash>;

67

68

69

73

74}

75}

76

77#endif

This header defines various interfaces for pass management in LLVM.

This file defines the RefCountedBase, ThreadSafeRefCountedBase, and IntrusiveRefCntPtr classes.

Reader for the indexed binary instrprof format.

A smart pointer to a reference-counted object that inherits from RefCountedBase or ThreadSafeRefCount...

LLVM_ABI PreservedAnalyses run(Module &M, ModuleAnalysisManager &AM)

LLVM_ABI MemProfUsePass(std::string MemoryProfileFile, IntrusiveRefCntPtr< vfs::FileSystem > FS=nullptr)

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

A set of analyses that are preserved following a run of a transformation pass.

Provides information about what library functions are available for the current target.

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

Encapsulates the data access profile data and the methods to operate on it.

The virtual file system interface.

LLVM_ABI DenseMap< uint64_t, LocToLocMap > computeUndriftMap(Module &M, IndexedInstrProfReader *MemProfReader, const TargetLibraryInfo &TLI)

std::unordered_map< LineLocation, LineLocation, LineLocationHash > LocToLocMap

Definition MemProfUse.h:65

LLVM_ABI DenseMap< uint64_t, SmallVector< CallEdgeTy, 0 > > extractCallsFromIR(Module &M, const TargetLibraryInfo &TLI, function_ref< bool(uint64_t)> IsPresentInProfile=[](uint64_t) { return true;})

This is an optimization pass for GlobalISel generic memory operations.

AnalysisManager< Module > ModuleAnalysisManager

Convenience typedef for the Module analysis manager.

A CRTP mix-in to automatically provide informational APIs needed for passes.

Definition MemProfUse.h:59

uint64_t operator()(const LineLocation &Loc) const

Definition MemProfUse.h:60