LLVM: lib/Target/SPIRV/Analysis/SPIRVConvergenceRegionAnalysis.h Source File (original) (raw)

1

2

3

4

5

6

7

8

9

10

11

12

13

14

15#ifndef LLVM_LIB_TARGET_SPIRV_SPIRVCONVERGENCEREGIONANALYSIS_H

16#define LLVM_LIB_TARGET_SPIRV_SPIRVCONVERGENCEREGIONANALYSIS_H

17

23#include

24#include

25#include <unordered_set>

26

27namespace llvm {

28class SPIRVSubtarget;

29class MachineFunction;

30class MachineModuleInfo;

31

33

34

36std::optional<const IntrinsicInst *> getConvergenceToken(const BasicBlock *BB);

37

38

39

40

41

45

46public:

47

49

51

53

55

57

59

60

62

63

64

69

76

78

79

80

82

84

85

86

87 void dump(const unsigned IndentSize = 0) const;

88};

89

90

92

94

95public:

97

98

99

101 : TopLevelRegion(TopLevelRegion) {}

102

104

106 : TopLevelRegion(LHS.TopLevelRegion) {

107 if (TopLevelRegion != LHS.TopLevelRegion) {

109 TopLevelRegion = LHS.TopLevelRegion;

110 }

111 LHS.TopLevelRegion = nullptr;

112 }

113

115 if (TopLevelRegion != LHS.TopLevelRegion) {

117 TopLevelRegion = LHS.TopLevelRegion;

118 }

119 LHS.TopLevelRegion = nullptr;

120 return *this;

121 }

122

124 if (TopLevelRegion == nullptr)

125 return;

126

128 delete TopLevelRegion;

129 TopLevelRegion = nullptr;

130 }

131

134 return TopLevelRegion;

135 }

136};

137

138}

139

140

143

144public:

146

148

153 };

154

156

159};

160

161

166

167public:

169

171};

172

176}

177

178}

179#endif

This file defines the SmallPtrSet class.

A container for analyses that lazily runs them and caches their results.

Represent the analysis usage information of a pass.

AnalysisUsage & addRequired()

void setPreservesAll()

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

LLVM Basic Block Representation.

Legacy analysis pass which computes a DominatorTree.

Concrete subclass of DominatorTreeBase that is used to compute a normal dominator tree.

FunctionPass class - This class is used to implement most global optimizations.

The legacy pass manager's analysis pass to compute loop information.

SPIRV::ConvergenceRegionInfo & getRegionInfo()

void getAnalysisUsage(AnalysisUsage &AU) const override

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

bool runOnFunction(Function &F) override

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

const SPIRV::ConvergenceRegionInfo & getRegionInfo() const

SPIRVConvergenceRegionAnalysisWrapperPass()

Result run(Function &F, FunctionAnalysisManager &AM)

ConvergenceRegionInfo(ConvergenceRegionInfo &&LHS)

ConvergenceRegion * getWritableTopLevelRegion() const

const ConvergenceRegion * getTopLevelRegion() const

ConvergenceRegionInfo & operator=(ConvergenceRegionInfo &&LHS)

ConvergenceRegionInfo(ConvergenceRegion *TopLevelRegion)

SmallVector< ConvergenceRegion * > Children

bool contains(const BasicBlock *BB) const

ConvergenceRegion(const ConvergenceRegion &other)=delete

SmallPtrSet< BasicBlock *, 2 > Exits

std::optional< IntrinsicInst * > ConvergenceToken

ConvergenceRegion * Parent

ConvergenceRegion(ConvergenceRegion &&CR)

void dump(const unsigned IndentSize=0) const

SmallPtrSet< BasicBlock *, 8 > Blocks

SmallPtrSet - This class implements a set which is optimized for holding SmallSize or less elements.

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

ConvergenceRegionInfo getConvergenceRegions(Function &F, DominatorTree &DT, LoopInfo &LI)

std::optional< IntrinsicInst * > getConvergenceToken(BasicBlock *BB)

This is an optimization pass for GlobalISel generic memory operations.

OutputIt move(R &&Range, OutputIt Out)

Provide wrappers to std::move which take ranges instead of having to pass begin/end explicitly.

Implement std::hash so that hash_code can be used in STL containers.

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...