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

1

2

3

4

5

6

7

8

9#ifndef LLVM_CODEGEN_ASSIGNMENTTRACKINGANALYSIS_H

10#define LLVM_CODEGEN_ASSIGNMENTTRACKINGANALYSIS_H

11

17

18namespace llvm {

21}

23

24namespace llvm {

25

27

34

35

36

37

39

41

42

43

45

46

47 unsigned SingleVarLocEnd = 0;

48

50 VarLocsBeforeInst;

51

52public:

53

54

59

63

65 return Variables[static_cast<unsigned>(ID)];

66 }

67

68

69

70

72

74 const auto *It = VarLocRecords.begin();

75 std::advance(It, SingleVarLocEnd);

76 return It;

77 }

78

80 auto Span = VarLocsBeforeInst.lookup(Before);

81 const auto *It = VarLocRecords.begin();

82 std::advance(It, Span.first);

83 return It;

84 }

85

86

88 auto Span = VarLocsBeforeInst.lookup(Before);

89 const auto *It = VarLocRecords.begin();

90 std::advance(It, Span.second);

91 return It;

92 }

93

94

96

97

98

99

102

103};

104

114

116 : public PassInfoMixin {

118

119public:

122};

123

125 std::unique_ptr Results;

126

127public:

129

131

133

135

139

141};

142

143}

144#endif

This header defines various interfaces for pass management in LLVM.

FunctionAnalysisManager FAM

Helper class to build FunctionVarLocs, since that class isn't easy to modify.

Represent the analysis usage information of a pass.

void setPreservesAll()

Set by analyses that do not transform their input at all.

static bool isRequired()

Definition AssignmentTrackingAnalysis.h:134

void getAnalysisUsage(AnalysisUsage &AU) const override

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

Definition AssignmentTrackingAnalysis.h:136

AssignmentTrackingAnalysis()

const FunctionVarLocs * getResults()

Definition AssignmentTrackingAnalysis.h:140

bool runOnFunction(Function &F) override

runOnFunction - Virtual method overriden by subclasses to do the per-function processing of the pass.

static char ID

Definition AssignmentTrackingAnalysis.h:128

Result run(Function &F, FunctionAnalysisManager &FAM)

FunctionVarLocs Result

Definition AssignmentTrackingAnalysis.h:111

DebugAssignmentTrackingPrinterPass(raw_ostream &OS)

Definition AssignmentTrackingAnalysis.h:120

PreservedAnalyses run(Function &F, FunctionAnalysisManager &FAM)

Identifies a unique instance of a variable.

const DILocalVariable * getVariable() const

Data structure describing the variable locations in a function.

Definition AssignmentTrackingAnalysis.h:38

void print(raw_ostream &OS, const Function &Fn) const

const VarLocInfo * locs_begin(const Instruction *Before) const

First variable location definition that comes before Before.

Definition AssignmentTrackingAnalysis.h:79

const VarLocInfo * single_locs_begin() const

Definition AssignmentTrackingAnalysis.h:71

DILocalVariable * getDILocalVariable(const VarLocInfo *Loc) const

Return the DILocalVariable for the location definition represented by ID.

Definition AssignmentTrackingAnalysis.h:55

DILocalVariable * getDILocalVariable(VariableID ID) const

Return the DILocalVariable of the variable represented by ID.

Definition AssignmentTrackingAnalysis.h:60

const DebugVariable & getVariable(VariableID ID) const

Return the DebugVariable represented by ID.

Definition AssignmentTrackingAnalysis.h:64

const VarLocInfo * locs_end(const Instruction *Before) const

One past the last variable location definition that comes before Before.

Definition AssignmentTrackingAnalysis.h:87

const VarLocInfo * single_locs_end() const

One past the last single-location variable location definition.

Definition AssignmentTrackingAnalysis.h:73

void init(FunctionVarLocsBuilder &Builder)

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

Lightweight class that wraps the location operand metadata of a debug intrinsic.

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

This class implements an extremely fast bulk output stream that can only output to a stream.

unsigned ID

LLVM IR allows to use arbitrary numbers as calling convention identifiers.

This is an optimization pass for GlobalISel generic memory operations.

std::tuple< const DIScope *, const DIScope *, const DILocalVariable * > VarID

A unique key that represents a debug variable.

VariableID

Type wrapper for integer ID for Variables. 0 is reserved.

Definition AssignmentTrackingAnalysis.h:26

@ Reserved

Definition AssignmentTrackingAnalysis.h:26

AnalysisManager< Function > FunctionAnalysisManager

Convenience typedef for the Function analysis manager.

A CRTP mix-in that provides informational APIs needed for analysis passes.

A special type used by analysis passes to provide an address that identifies that particular analysis...

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

Variable location definition used by FunctionVarLocs.

Definition AssignmentTrackingAnalysis.h:28

DIExpression * Expr

Definition AssignmentTrackingAnalysis.h:30

RawLocationWrapper Values

Definition AssignmentTrackingAnalysis.h:32

DebugLoc DL

Definition AssignmentTrackingAnalysis.h:31

llvm::VariableID VariableID

Definition AssignmentTrackingAnalysis.h:29