LLVM: include/llvm/IR/ModuleSlotTracker.h Source File (original) (raw)

1

2

3

4

5

6

7

8

9#ifndef LLVM_IR_MODULESLOTTRACKER_H

10#define LLVM_IR_MODULESLOTTRACKER_H

11

12#include

13#include

14#include

15#include

16

17namespace llvm {

18

21class SlotTracker;

23class MDNode;

24

25

27public:

29

31

34};

35

36

37

38

39

40

41

42

43

45

46 std::unique_ptr MachineStorage;

47 bool ShouldCreateStorage = false;

48 bool ShouldInitializeAllMetadata = false;

49

50 const Module *M = nullptr;

53

55 ProcessModuleHookFn;

57 ProcessFunctionHookFn;

58

59public:

60

63

64

65

66

67

68

69

70

72 bool ShouldInitializeAllMetadata = true);

73

74

76

77

79

82

83

84

85

86

88

89

90

91

92

93

95

100

102 std::vector<std::pair<unsigned, const MDNode *>>;

103

105};

106

107}

108

109#endif

COFF::MachineTypes Machine

Machine Check Debug Module

Abstract interface of slot tracker storage.

virtual unsigned getNextMetadataSlot()=0

virtual int getMetadataSlot(const MDNode *)=0

virtual ~AbstractSlotTrackerStorage()

virtual void createMetadataSlot(const MDNode *)=0

Manage lifetime of a slot tracker for printing IR.

std::vector< std::pair< unsigned, const MDNode * > > MachineMDNodeListType

const Module * getModule() const

virtual ~ModuleSlotTracker()

Destructor to clean up storage.

int getLocalSlot(const Value *V)

Return the slot number of the specified local value.

void collectMDNodes(MachineMDNodeListType &L, unsigned LB, unsigned UB) const

SlotTracker * getMachine()

Lazily creates a slot tracker.

const Function * getCurrentFunction() const

void setProcessHook(std::function< void(AbstractSlotTrackerStorage *, const Module *, bool)>)

void incorporateFunction(const Function &F)

Incorporate the given function.

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

This class provides computation of slot numbers for LLVM Assembly writing.

LLVM Value Representation.

This is an optimization pass for GlobalISel generic memory operations.