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

1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

16

17#ifndef LLVM_ANALYSIS_DOMINANCEFRONTIER_H

18#define LLVM_ANALYSIS_DOMINANCEFRONTIER_H

19

26#include

27

28namespace llvm {

29

33

34

35

36

37

38template <class BlockT, bool IsPostDom>

40public:

41

42

45

46protected:

48

50

53

54public:

56

57

58

59

61

63 assert(Roots.size() == 1 && "Should always have entry node!");

65 }

66

67

71

75

76

79

86

87

88

90

91

92#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)

94#endif

95};

96

97

98

99

100

101template

104private:

106

107public:

111

114 "Only one entry block for forward domfronts!");

117 }

118

120};

121

123public:

130

131

133 FunctionAnalysisManager::Invalidator &);

134};

135

138

139public:

140 static char ID;

141

143

146

148

150

152

154

155 void dump() const;

156};

157

158extern template class DominanceFrontierBase<BasicBlock, false>;

159extern template class DominanceFrontierBase<BasicBlock, true>;

160extern template class ForwardDominanceFrontierBase;

161

162

166

168

169public:

170

172

173

175};

176

177

181

182public:

184

186

188};

189

190}

191

192#endif

assert(UImm &&(UImm !=~static_cast< T >(0)) &&"Invalid immediate!")

static GCRegistry::Add< OcamlGC > B("ocaml", "ocaml 3.10-compatible GC")

This file defines the DenseMap class.

This file defines a set of templates that efficiently compute a dominator tree over a generic graph.

This file defines the little GraphTraits template class that should be specialized by classes that...

This header defines various interfaces for pass management in LLVM.

This file implements a set that has insertion order iteration characteristics.

Represent the analysis usage information of a pass.

LLVM Basic Block Representation.

DenseMapIterator< KeyT, ValueT, KeyInfoT, BucketT > iterator

DenseMapIterator< KeyT, ValueT, KeyInfoT, BucketT, true > const_iterator

Base class for the actual dominator tree node.

Analysis pass which computes a DominanceFrontier.

Definition DominanceFrontier.h:164

DominanceFrontier Result

Provide the result type for this analysis pass.

Definition DominanceFrontier.h:171

DominanceFrontier run(Function &F, FunctionAnalysisManager &AM)

Run the analysis pass over a function and produce a dominator tree.

BlockT * getRoot() const

Definition DominanceFrontier.h:62

void print(raw_ostream &OS) const

print - Convert to human readable form

void releaseMemory()

Definition DominanceFrontier.h:72

const_iterator find(BlockT *B) const

Definition DominanceFrontier.h:85

GraphTraits< BlockT * > BlockTraits

Definition DominanceFrontier.h:47

typename DomSetMapType::iterator iterator

Definition DominanceFrontier.h:77

SmallVector< BasicBlock *, IsPostDom ? 4 :1 > Roots

Definition DominanceFrontier.h:51

const_iterator end() const

Definition DominanceFrontier.h:83

const SmallVectorImpl< BlockT * > & getRoots() const

getRoots - Return the root blocks of the current CFG.

Definition DominanceFrontier.h:60

static constexpr bool IsPostDominators

Definition DominanceFrontier.h:52

void dump() const

dump - Dump the dominance frontier to dbgs().

bool isPostDominator() const

isPostDominator - Returns true if analysis based of postdoms

Definition DominanceFrontier.h:68

DenseMap< BlockT *, DomSetType > DomSetMapType

Definition DominanceFrontier.h:44

SetVector< BlockT * > DomSetType

Definition DominanceFrontier.h:43

typename DomSetMapType::const_iterator const_iterator

Definition DominanceFrontier.h:78

iterator begin()

Definition DominanceFrontier.h:80

iterator end()

Definition DominanceFrontier.h:82

iterator find(BlockT *B)

Definition DominanceFrontier.h:84

DomSetMapType Frontiers

Definition DominanceFrontier.h:49

const_iterator begin() const

Definition DominanceFrontier.h:81

DominanceFrontierBase()=default

DominanceFrontierPrinterPass(raw_ostream &OS)

PreservedAnalyses run(Function &F, FunctionAnalysisManager &AM)

static bool isRequired()

Definition DominanceFrontier.h:187

static char ID

Definition DominanceFrontier.h:140

const DominanceFrontier & getDominanceFrontier() const

Definition DominanceFrontier.h:145

DominanceFrontierWrapperPass()

bool runOnFunction(Function &) override

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

void print(raw_ostream &OS, const Module *=nullptr) const override

print - Print out the internal state of the pass.

void releaseMemory() override

releaseMemory() - This member can be implemented by a pass if it wants to be able to release its memo...

void getAnalysisUsage(AnalysisUsage &AU) const override

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

DominanceFrontier & getDominanceFrontier()

Definition DominanceFrontier.h:144

bool invalidate(Function &F, const PreservedAnalyses &PA, FunctionAnalysisManager::Invalidator &)

Handle invalidation explicitly.

DomTreeNodeBase< BasicBlock > DomTreeNodeT

Definition DominanceFrontier.h:125

DomTreeBase< BasicBlock > DomTreeT

Definition DominanceFrontier.h:124

DominanceFrontierBase< BasicBlock, false >::iterator iterator

Definition DominanceFrontier.h:127

DominanceFrontierBase< BasicBlock, false >::const_iterator const_iterator

Definition DominanceFrontier.h:128

DominanceFrontierBase< BasicBlock, false >::DomSetType DomSetType

Definition DominanceFrontier.h:126

DominanceFrontier Class - Concrete subclass of DominanceFrontierBase that is used to compute a forwar...

Definition DominanceFrontier.h:103

const DomSetType & calculate(const DomTreeT &DT, const DomTreeNodeT *Node)

void analyze(DomTreeT &DT)

Definition DominanceFrontier.h:112

typename DominanceFrontierBase< BlockT, false >::DomSetType DomSetType

Definition DominanceFrontier.h:110

DomTreeBase< BlockT > DomTreeT

Definition DominanceFrontier.h:108

DomTreeNodeBase< BlockT > DomTreeNodeT

Definition DominanceFrontier.h:109

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.

A vector that has set insertion semantics.

This class consists of common code factored out of the SmallVector class to reduce code duplication b...

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.

This is an optimization pass for GlobalISel generic memory operations.

DominatorTreeBase< T, false > DomTreeBase

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.