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

1

2

3

4

5

6

7

8

9

10

11

12

13

14#ifndef LLVM_CODEGEN_MACHINEDOMINATORS_H

15#define LLVM_CODEGEN_MACHINEDOMINATORS_H

16

25#include

26#include

27#include

28

29namespace llvm {

30class AnalysisUsage;

31class MachineFunction;

33class raw_ostream;

34

35template <>

38 this->Roots.push_back(MBB);

39}

40

43

45

46namespace DomTreeBuilder {

50

51extern template void Calculate(MBBDomTree &DT);

52extern template void CalculateWithUpdates(MBBDomTree &DT,

54

55extern template void InsertEdge(MBBDomTree &DT,

58

59extern template void DeleteEdge(MBBDomTree &DT,

62

63extern template void ApplyUpdates(MBBDomTree &DT,

66

67extern template bool Verify(const MBBDomTree &DT,

69}

70

71

72

73

74

76

77public:

79

82

83

86

87 using Base::dominates;

88

89

90

93 if (BBA != BBB)

94 return Base::dominates(BBA, BBB);

95

96

98 for (; &*I != A && &*I != B; ++I)

99 ;

100

101 return &*I == A;

102 }

103};

104

105

109

111

112public:

114

116};

117

118

122

123public:

128};

129

130

132

133

134 std::optional DT;

135

136public:

138

140

143

145

146 void verifyAnalysis() const override;

147

151 }

152

153 void releaseMemory() override;

154

156};

157

158

159

160

161

162

163template <class Node, class ChildIterator>

167

171};

172

173template struct GraphTraits;

174

175template <>

179};

180

181template <>

185};

186

191 }

192};

193

194}

195

196#endif

BlockVerifier::State From

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

static GCRegistry::Add< ErlangGC > A("erlang", "erlang-compatible garbage collector")

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

Machine Check Debug Module

This file defines the SmallSet class.

This file defines the SmallVector class.

API to communicate dependencies between analyses during invalidation.

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

Represent the analysis usage information of a pass.

void setPreservesAll()

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

ArrayRef - Represent a constant reference to an array (0 or more elements consecutively in memory),...

Base class for the actual dominator tree node.

typename SmallVector< DomTreeNodeBase *, 4 >::const_iterator const_iterator

Core dominator tree base class.

DomTreeNodeBase< NodeT > * getRootNode()

getRootNode - This returns the entry node for the CFG of the function.

Analysis pass which computes a MachineDominatorTree.

Machine function pass which print MachineDominatorTree.

MachineDominatorTreePrinterPass(raw_ostream &OS)

Analysis pass which computes a MachineDominatorTree.

void getAnalysisUsage(AnalysisUsage &AU) const override

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

const MachineDominatorTree & getDomTree() const

MachineDominatorTreeWrapperPass()

MachineDominatorTree & getDomTree()

DominatorTree Class - Concrete subclass of DominatorTreeBase that is used to compute a normal dominat...

bool dominates(const MachineInstr *A, const MachineInstr *B) const

MachineDominatorTree()=default

MachineDominatorTree(MachineFunction &MF)

MachineFunctionPass - This class adapts the FunctionPass interface to allow convenient creation of pa...

void getAnalysisUsage(AnalysisUsage &AU) const override

getAnalysisUsage - Subclasses that override getAnalysisUsage must call this.

Representation of each machine instruction.

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.

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.

Printable print(const GCNRegPressure &RP, const GCNSubtarget *ST=nullptr)

DomTreeNodeBase< MachineBasicBlock > MachineDomTreeNode

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

static NodeRef getEntryNode(MachineDominatorTree *DT)

DominatorTree GraphTraits specialization so the DominatorTree can be iterable by generic graph iterat...

ChildIterator ChildIteratorType

static ChildIteratorType child_end(NodeRef N)

static NodeRef getEntryNode(NodeRef N)

static ChildIteratorType child_begin(NodeRef N)

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