Movatterモバイル変換


[0]ホーム

URL:


LLVM 20.0.0git
GenericDomTreeUpdaterImpl.h
Go to the documentation of this file.
1//===- GenericDomTreeUpdaterImpl.h ------------------------------*- C++ -*-===//
2//
3// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4// See https://llvm.org/LICENSE.txt for license information.
5// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6//
7//===----------------------------------------------------------------------===//
8//
9// This file implements the GenericDomTreeUpdater class. This file should only
10// be included by files that implement a specialization of the relevant
11// templates. Currently these are:
12// - llvm/lib/Analysis/DomTreeUpdater.cpp
13// - llvm/lib/CodeGen/MachineDomTreeUpdater.cpp
14//
15//===----------------------------------------------------------------------===//
16#ifndef LLVM_ANALYSIS_GENERICDOMTREEUPDATERIMPL_H
17#define LLVM_ANALYSIS_GENERICDOMTREEUPDATERIMPL_H
18
19#include "llvm/ADT/SmallBitVector.h"
20#include "llvm/Analysis/GenericDomTreeUpdater.h"
21#include "llvm/Support/Debug.h"
22#include "llvm/Support/raw_ostream.h"
23
24namespacellvm {
25
26template <typename DerivedT,typename DomTreeT,typename PostDomTreeT>
27template <typename FuncT>
28voidGenericDomTreeUpdater<DerivedT, DomTreeT, PostDomTreeT>::recalculate(
29 FuncT &F) {
30if (Strategy == UpdateStrategy::Eager) {
31if (DT)
32 DT->recalculate(F);
33if (PDT)
34 PDT->recalculate(F);
35return;
36 }
37
38// There is little performance gain if we pend the recalculation under
39// Lazy UpdateStrategy so we recalculate available trees immediately.
40
41// Prevent forceFlushDeletedBB() from erasing DomTree or PostDomTree nodes.
42 IsRecalculatingDomTree = IsRecalculatingPostDomTree =true;
43
44// Because all trees are going to be up-to-date after recalculation,
45// flush awaiting deleted BasicBlocks.
46 derived().forceFlushDeletedBB();
47if (DT)
48 DT->recalculate(F);
49if (PDT)
50 PDT->recalculate(F);
51
52// Resume forceFlushDeletedBB() to erase DomTree or PostDomTree nodes.
53 IsRecalculatingDomTree = IsRecalculatingPostDomTree =false;
54 PendDTUpdateIndex = PendPDTUpdateIndex = PendUpdates.size();
55 dropOutOfDateUpdates();
56}
57
58template <typename DerivedT,typename DomTreeT,typename PostDomTreeT>
59voidGenericDomTreeUpdater<DerivedT, DomTreeT, PostDomTreeT>::applyUpdates(
60ArrayRef<UpdateT> Updates) {
61if (!DT && !PDT)
62return;
63
64if (Strategy == UpdateStrategy::Lazy) {
65 PendUpdates.reserve(PendUpdates.size() + Updates.size());
66for (constauto &U : Updates)
67if (!isSelfDominance(U))
68 PendUpdates.push_back(U);
69
70return;
71 }
72
73if (DT)
74 DT->applyUpdates(Updates);
75if (PDT)
76 PDT->applyUpdates(Updates);
77}
78
79template <typename DerivedT,typename DomTreeT,typename PostDomTreeT>
80voidGenericDomTreeUpdater<DerivedT, DomTreeT, PostDomTreeT>::
81 applyUpdatesPermissive(ArrayRef<UpdateT> Updates) {
82if (!DT && !PDT)
83return;
84
85SmallSet<std::pair<BasicBlockT *, BasicBlockT *>, 8> Seen;
86SmallVector<UpdateT, 8> DeduplicatedUpdates;
87for (constauto &U : Updates) {
88auto Edge = std::make_pair(U.getFrom(), U.getTo());
89// Because it is illegal to submit updates that have already been applied
90// and updates to an edge need to be strictly ordered,
91// it is safe to infer the existence of an edge from the first update
92// to this edge.
93// If the first update to an edge is "Delete", it means that the edge
94// existed before. If the first update to an edge is "Insert", it means
95// that the edge didn't exist before.
96//
97// For example, if the user submits {{Delete, A, B}, {Insert, A, B}},
98// because
99// 1. it is illegal to submit updates that have already been applied,
100// i.e., user cannot delete an nonexistent edge,
101// 2. updates to an edge need to be strictly ordered,
102// So, initially edge A -> B existed.
103// We can then safely ignore future updates to this edge and directly
104// inspect the current CFG:
105// a. If the edge still exists, because the user cannot insert an existent
106// edge, so both {Delete, A, B}, {Insert, A, B} actually happened and
107// resulted in a no-op. DTU won't submit any update in this case.
108// b. If the edge doesn't exist, we can then infer that {Delete, A, B}
109// actually happened but {Insert, A, B} was an invalid update which never
110// happened. DTU will submit {Delete, A, B} in this case.
111if (!isSelfDominance(U) && Seen.insert(Edge).second) {
112// If the update doesn't appear in the CFG, it means that
113// either the change isn't made or relevant operations
114// result in a no-op.
115if (isUpdateValid(U)) {
116if (isLazy())
117 PendUpdates.push_back(U);
118else
119 DeduplicatedUpdates.push_back(U);
120 }
121 }
122 }
123
124if (Strategy == UpdateStrategy::Lazy)
125return;
126
127if (DT)
128 DT->applyUpdates(DeduplicatedUpdates);
129if (PDT)
130 PDT->applyUpdates(DeduplicatedUpdates);
131}
132
133template <typename DerivedT,typename DomTreeT,typename PostDomTreeT>
134voidGenericDomTreeUpdater<DerivedT, DomTreeT, PostDomTreeT>::splitCriticalEdge(
135BasicBlockT *FromBB,BasicBlockT *ToBB,BasicBlockT *NewBB) {
136if (!DT && !PDT)
137return;
138
139CriticalEdgeE = {FromBB, ToBB, NewBB};
140if (Strategy == UpdateStrategy::Lazy) {
141 PendUpdates.push_back(E);
142return;
143 }
144
145if (DT)
146 splitDTCriticalEdges(E);
147if (PDT)
148 splitPDTCriticalEdges(E);
149}
150
151template <typename DerivedT,typename DomTreeT,typename PostDomTreeT>
152DomTreeT &
153GenericDomTreeUpdater<DerivedT, DomTreeT, PostDomTreeT>::getDomTree() {
154assert(DT &&"Invalid acquisition of a null DomTree");
155 applyDomTreeUpdates();
156 dropOutOfDateUpdates();
157return *DT;
158}
159
160template <typename DerivedT,typename DomTreeT,typename PostDomTreeT>
161PostDomTreeT &
162GenericDomTreeUpdater<DerivedT, DomTreeT, PostDomTreeT>::getPostDomTree() {
163assert(PDT &&"Invalid acquisition of a null PostDomTree");
164 applyPostDomTreeUpdates();
165 dropOutOfDateUpdates();
166return *PDT;
167}
168
169template <typename DerivedT,typename DomTreeT,typename PostDomTreeT>
170LLVM_DUMP_METHODvoid
171GenericDomTreeUpdater<DerivedT, DomTreeT, PostDomTreeT>::dump() const{
172#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
173raw_ostream &OS =llvm::dbgs();
174
175OS <<"Available Trees: ";
176if (DT || PDT) {
177if (DT)
178OS <<"DomTree ";
179if (PDT)
180OS <<"PostDomTree ";
181OS <<"\n";
182 }else
183OS <<"None\n";
184
185OS <<"UpdateStrategy: ";
186if (Strategy == UpdateStrategy::Eager) {
187OS <<"Eager\n";
188return;
189 }else
190OS <<"Lazy\n";
191intIndex = 0;
192
193auto printBlockInfo = [&](BasicBlockT *BB,StringRef Ending) {
194if (BB) {
195auto S = BB->getName();
196if (!BB->hasName())
197 S ="(no name)";
198OS << S <<"(" << BB <<")" << Ending;
199 }else {
200OS <<"(badref)" << Ending;
201 }
202 };
203
204auto printUpdates =
205 [&](typenameArrayRef<DomTreeUpdate>::const_iteratorbegin,
206typenameArrayRef<DomTreeUpdate>::const_iteratorend) {
207if (begin == end)
208OS <<" None\n";
209Index = 0;
210for (auto It = begin, ItEnd = end; It != ItEnd; ++It) {
211if (!It->IsCriticalEdgeSplit) {
212auto U = It->Update;
213OS <<" " <<Index <<" : ";
214 ++Index;
215if (U.getKind() == DomTreeT::Insert)
216OS <<"Insert, ";
217else
218OS <<"Delete, ";
219 printBlockInfo(U.getFrom(),", ");
220 printBlockInfo(U.getTo(),"\n");
221 }else {
222constauto &Edge = It->EdgeSplit;
223OS <<" " <<Index++ <<" : Split critical edge, ";
224 printBlockInfo(Edge.FromBB,", ");
225 printBlockInfo(Edge.ToBB,", ");
226 printBlockInfo(Edge.NewBB,"\n");
227 }
228 }
229 };
230
231if (DT) {
232constautoI = PendUpdates.begin() + PendDTUpdateIndex;
233assert(PendUpdates.begin() <=I &&I <= PendUpdates.end() &&
234"Iterator out of range.");
235OS <<"Applied but not cleared DomTreeUpdates:\n";
236 printUpdates(PendUpdates.begin(),I);
237OS <<"Pending DomTreeUpdates:\n";
238 printUpdates(I, PendUpdates.end());
239 }
240
241if (PDT) {
242constautoI = PendUpdates.begin() + PendPDTUpdateIndex;
243assert(PendUpdates.begin() <=I &&I <= PendUpdates.end() &&
244"Iterator out of range.");
245OS <<"Applied but not cleared PostDomTreeUpdates:\n";
246 printUpdates(PendUpdates.begin(),I);
247OS <<"Pending PostDomTreeUpdates:\n";
248 printUpdates(I, PendUpdates.end());
249 }
250
251OS <<"Pending DeletedBBs:\n";
252Index = 0;
253for (constauto *BB : DeletedBBs) {
254OS <<" " <<Index <<" : ";
255 ++Index;
256if (BB->hasName())
257OS << BB->getName() <<"(";
258else
259OS <<"(no name)(";
260OS << BB <<")\n";
261 }
262#endif
263}
264
265template <typename DerivedT,typename DomTreeT,typename PostDomTreeT>
266template <bool IsForward>
267voidGenericDomTreeUpdater<DerivedT, DomTreeT,
268 PostDomTreeT>::applyUpdatesImpl() {
269auto *DomTree = [&]() {
270ifconstexpr (IsForward)
271return DT;
272else
273return PDT;
274 }();
275// No pending DomTreeUpdates.
276if (Strategy != UpdateStrategy::Lazy || !DomTree)
277return;
278size_t &PendUpdateIndex = IsForward ? PendDTUpdateIndex : PendPDTUpdateIndex;
279
280// Only apply updates not are applied by (Post)DomTree.
281while (IsForward ? hasPendingDomTreeUpdates()
282 : hasPendingPostDomTreeUpdates()) {
283autoI = PendUpdates.begin() + PendUpdateIndex;
284constautoE = PendUpdates.end();
285assert(I <E &&"Iterator range invalid; there should be DomTree updates.");
286if (!I->IsCriticalEdgeSplit) {
287SmallVector<UpdateT, 32> NormalUpdates;
288for (;I !=E && !I->IsCriticalEdgeSplit; ++I)
289 NormalUpdates.push_back(I->Update);
290 DomTree->applyUpdates(NormalUpdates);
291 PendUpdateIndex += NormalUpdates.size();
292 }else {
293 SmallVector<CriticalEdge> CriticalEdges;
294for (;I !=E &&I->IsCriticalEdgeSplit; ++I)
295 CriticalEdges.push_back(I->EdgeSplit);
296 IsForward ? splitDTCriticalEdges(CriticalEdges)
297 : splitPDTCriticalEdges(CriticalEdges);
298 PendUpdateIndex += CriticalEdges.size();
299 }
300 }
301}
302
303template <typename DerivedT,typename DomTreeT,typename PostDomTreeT>
304boolGenericDomTreeUpdater<DerivedT, DomTreeT, PostDomTreeT>::isUpdateValid(
305UpdateT Update) const{
306constauto *From = Update.getFrom();
307constauto *To = Update.getTo();
308constauto Kind = Update.getKind();
309
310// Discard updates by inspecting the current state of successors of From.
311// Since isUpdateValid() must be called *after* the Terminator of From is
312// altered we can determine if the update is unnecessary for batch updates
313// or invalid for a single update.
314constbool HasEdge =llvm::is_contained(successors(From), To);
315
316// If the IR does not match the update,
317// 1. In batch updates, this update is unnecessary.
318// 2. When called by insertEdge*()/deleteEdge*(), this update is invalid.
319// Edge does not exist in IR.
320if (Kind == DomTreeT::Insert && !HasEdge)
321returnfalse;
322
323// Edge exists in IR.
324if (Kind == DomTreeT::Delete && HasEdge)
325returnfalse;
326
327returntrue;
328}
329
330template <typename DerivedT,typename DomTreeT,typename PostDomTreeT>
331voidGenericDomTreeUpdater<DerivedT, DomTreeT, PostDomTreeT>::eraseDelBBNode(
332BasicBlockT *DelBB) {
333if (DT && !IsRecalculatingDomTree)
334if (DT->getNode(DelBB))
335 DT->eraseNode(DelBB);
336
337if (PDT && !IsRecalculatingPostDomTree)
338if (PDT->getNode(DelBB))
339 PDT->eraseNode(DelBB);
340}
341
342template <typename DerivedT,typename DomTreeT,typename PostDomTreeT>
343voidGenericDomTreeUpdater<DerivedT, DomTreeT,
344 PostDomTreeT>::tryFlushDeletedBB() {
345if (!hasPendingUpdates())
346 derived().forceFlushDeletedBB();
347}
348
349template <typename DerivedT,typename DomTreeT,typename PostDomTreeT>
350voidGenericDomTreeUpdater<DerivedT, DomTreeT,
351 PostDomTreeT>::dropOutOfDateUpdates() {
352if (Strategy == UpdateStrategy::Eager)
353return;
354
355 tryFlushDeletedBB();
356
357// Drop all updates applied by both trees.
358if (!DT)
359 PendDTUpdateIndex = PendUpdates.size();
360if (!PDT)
361 PendPDTUpdateIndex = PendUpdates.size();
362
363constsize_t dropIndex = std::min(PendDTUpdateIndex, PendPDTUpdateIndex);
364constautoB = PendUpdates.begin();
365constautoE = PendUpdates.begin() + dropIndex;
366assert(B <=E &&"Iterator out of range.");
367 PendUpdates.erase(B,E);
368// Calculate current index.
369 PendDTUpdateIndex -= dropIndex;
370 PendPDTUpdateIndex -= dropIndex;
371}
372
373template <typename DerivedT,typename DomTreeT,typename PostDomTreeT>
374voidGenericDomTreeUpdater<DerivedT, DomTreeT, PostDomTreeT>::
375 splitDTCriticalEdges(ArrayRef<CriticalEdge> Edges) {
376// Bail out early if there is nothing to do.
377if (!DT || Edges.empty())
378return;
379
380// Remember all the basic blocks that are inserted during
381// edge splitting.
382// Invariant: NewBBs == all the basic blocks contained in the NewBB
383// field of all the elements of Edges.
384// I.e., forall elt in Edges, it exists BB in NewBBs
385// such as BB == elt.NewBB.
386SmallSet<BasicBlockT *, 32> NewBBs;
387for (auto &Edge : Edges)
388 NewBBs.insert(Edge.NewBB);
389// For each element in Edges, remember whether or not element
390// is the new immediate domminator of its successor. The mapping is done by
391// index, i.e., the information for the ith element of Edges is
392// the ith element of IsNewIDom.
393SmallBitVector IsNewIDom(Edges.size(),true);
394
395// Collect all the dominance properties info, before invalidating
396// the underlying DT.
397for (constauto &[Idx, Edge] :enumerate(Edges)) {
398// Update dominator information.
399 BasicBlockT *Succ = Edge.ToBB;
400auto *SuccDTNode = DT->getNode(Succ);
401
402for (BasicBlockT *PredBB :predecessors(Succ)) {
403if (PredBB == Edge.NewBB)
404continue;
405// If we are in this situation:
406// FromBB1 FromBB2
407// + +
408// + + + +
409// + + + +
410// ... Split1 Split2 ...
411// + +
412// + +
413// +
414// Succ
415// Instead of checking the domiance property with Split2, we check it
416// with FromBB2 since Split2 is still unknown of the underlying DT
417// structure.
418if (NewBBs.contains(PredBB)) {
419assert(pred_size(PredBB) == 1 &&"A basic block resulting from a "
420"critical edge split has more "
421"than one predecessor!");
422 PredBB = *pred_begin(PredBB);
423 }
424if (!DT->dominates(SuccDTNode, DT->getNode(PredBB))) {
425 IsNewIDom[Idx] =false;
426break;
427 }
428 }
429 }
430
431// Now, update DT with the collected dominance properties info.
432for (constauto &[Idx, Edge] :enumerate(Edges)) {
433// We know FromBB dominates NewBB.
434auto *NewDTNode = DT->addNewBlock(Edge.NewBB, Edge.FromBB);
435
436// If all the other predecessors of "Succ" are dominated by "Succ" itself
437// then the new block is the new immediate dominator of "Succ". Otherwise,
438// the new block doesn't dominate anything.
439if (IsNewIDom[Idx])
440 DT->changeImmediateDominator(DT->getNode(Edge.ToBB), NewDTNode);
441 }
442}
443
444// Post dominator tree is different, the new basic block in critical edge
445// may become the new root.
446template <typename DerivedT,typename DomTreeT,typename PostDomTreeT>
447void GenericDomTreeUpdater<DerivedT, DomTreeT, PostDomTreeT>::
448 splitPDTCriticalEdges(ArrayRef<CriticalEdge> Edges) {
449// Bail out early if there is nothing to do.
450if (!PDT || Edges.empty())
451return;
452
453 std::vector<UpdateT> Updates;
454for (constauto &Edge : Edges) {
455 Updates.push_back({PostDomTreeT::Insert, Edge.FromBB, Edge.NewBB});
456 Updates.push_back({PostDomTreeT::Insert, Edge.NewBB, Edge.ToBB});
457if (!llvm::is_contained(successors(Edge.FromBB), Edge.ToBB))
458 Updates.push_back({PostDomTreeT::Delete, Edge.FromBB, Edge.ToBB});
459 }
460 PDT->applyUpdates(Updates);
461}
462
463}// namespace llvm
464
465#endif// LLVM_ANALYSIS_GENERICDOMTREEUPDATERIMPL_H
From
BlockVerifier::State From
Definition:BlockVerifier.cpp:57
B
static GCRegistry::Add< OcamlGC > B("ocaml", "ocaml 3.10-compatible GC")
E
static GCRegistry::Add< CoreCLRGC > E("coreclr", "CoreCLR-compatible GC")
LLVM_DUMP_METHOD
#define LLVM_DUMP_METHOD
Mark debug helper function definitions like dump() that should not be stripped from debug builds.
Definition:Compiler.h:622
Idx
Returns the sub type a function will return at a given Idx Should correspond to the result type of an ExtractValue instruction executed with just that one unsigned Idx
Definition:DeadArgumentElimination.cpp:353
Debug.h
Index
uint32_t Index
Definition:ELFObjHandler.cpp:83
GenericDomTreeUpdater.h
F
#define F(x, y, z)
Definition:MD5.cpp:55
I
#define I(x, y, z)
Definition:MD5.cpp:58
assert
assert(ImpDefSCC.getReg()==AMDGPU::SCC &&ImpDefSCC.isDef())
OS
raw_pwrite_stream & OS
Definition:SampleProfWriter.cpp:51
SmallBitVector.h
This file implements the SmallBitVector class.
llvm::ArrayRef
ArrayRef - Represent a constant reference to an array (0 or more elements consecutively in memory),...
Definition:ArrayRef.h:41
llvm::ArrayRef::const_iterator
const_pointer const_iterator
Definition:ArrayRef.h:49
llvm::ArrayRef::size
size_t size() const
size - Get the array size.
Definition:ArrayRef.h:168
llvm::ArrayRef::empty
bool empty() const
empty - Check if the array is empty.
Definition:ArrayRef.h:163
llvm::DominatorTreeBase::changeImmediateDominator
void changeImmediateDominator(DomTreeNodeBase< NodeT > *N, DomTreeNodeBase< NodeT > *NewIDom)
changeImmediateDominator - This method is used to update the dominator tree information when a node's...
Definition:GenericDomTree.h:723
llvm::DominatorTreeBase::addNewBlock
DomTreeNodeBase< NodeT > * addNewBlock(NodeT *BB, NodeT *DomBB)
Add a new node to the dominator tree information.
Definition:GenericDomTree.h:687
llvm::DominatorTreeBase::applyUpdates
void applyUpdates(ArrayRef< UpdateType > Updates)
Inform the dominator tree about a sequence of CFG edge insertions and deletions and perform a batch u...
Definition:GenericDomTree.h:612
llvm::DominatorTreeBase::recalculate
void recalculate(ParentType &Func)
recalculate - compute a dominator tree for the given function
Definition:GenericDomTree.h:859
llvm::DominatorTreeBase::eraseNode
void eraseNode(NodeT *BB)
eraseNode - Removes a node from the dominator tree.
Definition:GenericDomTree.h:737
llvm::DominatorTreeBase::getNode
DomTreeNodeBase< NodeT > * getNode(const NodeT *BB) const
getNode - return the (Post)DominatorTree node for the specified basic block.
Definition:GenericDomTree.h:401
llvm::DominatorTree::dominates
bool dominates(const BasicBlock *BB, const Use &U) const
Return true if the (end of the) basic block BB dominates the use U.
Definition:Dominators.cpp:122
llvm::GenericDomTreeUpdater
Definition:GenericDomTreeUpdater.h:24
llvm::GenericDomTreeUpdater::getDomTree
DomTreeT & getDomTree()
Flush DomTree updates and return DomTree.
Definition:GenericDomTreeUpdaterImpl.h:153
llvm::GenericDomTreeUpdater::getPostDomTree
PostDomTreeT & getPostDomTree()
Flush PostDomTree updates and return PostDomTree.
Definition:GenericDomTreeUpdaterImpl.h:162
llvm::GenericDomTreeUpdater::applyUpdatesPermissive
void applyUpdatesPermissive(ArrayRef< UpdateT > Updates)
Submit updates to all available trees.
Definition:GenericDomTreeUpdaterImpl.h:81
llvm::GenericDomTreeUpdater::applyUpdates
void applyUpdates(ArrayRef< UpdateT > Updates)
Submit updates to all available trees.
Definition:GenericDomTreeUpdaterImpl.h:59
llvm::GenericDomTreeUpdater::eraseDelBBNode
void eraseDelBBNode(BasicBlockT *DelBB)
Erase Basic Block node before it is unlinked from Function in the DomTree and PostDomTree.
Definition:GenericDomTreeUpdaterImpl.h:331
llvm::GenericDomTreeUpdater::UpdateT
typename DomTreeT::UpdateType UpdateT
Definition:GenericDomTreeUpdater.h:33
llvm::GenericDomTreeUpdater::BasicBlockT
typename DomTreeT::NodeType BasicBlockT
Definition:GenericDomTreeUpdater.h:32
llvm::GenericDomTreeUpdater::recalculate
void recalculate(FuncT &F)
Notify DTU that the entry block was replaced.
Definition:GenericDomTreeUpdaterImpl.h:28
llvm::GenericDomTreeUpdater::splitCriticalEdge
void splitCriticalEdge(BasicBlockT *FromBB, BasicBlockT *ToBB, BasicBlockT *NewBB)
Apply updates that the critical edge (FromBB, ToBB) has been split with NewBB.
Definition:GenericDomTreeUpdaterImpl.h:134
llvm::GenericDomTreeUpdater::isUpdateValid
bool isUpdateValid(UpdateT Update) const
Returns true if the update appears in the LLVM IR.
Definition:GenericDomTreeUpdaterImpl.h:304
llvm::GenericDomTreeUpdater::dump
LLVM_DUMP_METHOD void dump() const
Debug method to help view the internal state of this class.
Definition:GenericDomTreeUpdaterImpl.h:171
llvm::SmallBitVector
This is a 'bitvector' (really, a variable-sized bit array), optimized for the case when the array is ...
Definition:SmallBitVector.h:35
llvm::SmallSet
SmallSet - This maintains a set of unique values, optimizing for the case when the set is small (less...
Definition:SmallSet.h:132
llvm::SmallSet::contains
bool contains(const T &V) const
Check if the SmallSet contains the given element.
Definition:SmallSet.h:222
llvm::SmallSet::insert
std::pair< const_iterator, bool > insert(const T &V)
insert - Insert an element into the set if it isn't already there.
Definition:SmallSet.h:181
llvm::SmallVectorBase::size
size_t size() const
Definition:SmallVector.h:78
llvm::SmallVectorTemplateBase::push_back
void push_back(const T &Elt)
Definition:SmallVector.h:413
llvm::SmallVector
This is a 'vector' (really, a variable-sized array), optimized for the case when the array is small.
Definition:SmallVector.h:1196
llvm::StringRef
StringRef - Represent a constant reference to a string, i.e.
Definition:StringRef.h:51
llvm::raw_ostream
This class implements an extremely fast bulk output stream that can only output to a stream.
Definition:raw_ostream.h:52
llvm::sys::path::begin
const_iterator begin(StringRef path LLVM_LIFETIME_BOUND, Style style=Style::native)
Get begin iterator over path.
Definition:Path.cpp:226
llvm::sys::path::end
const_iterator end(StringRef path LLVM_LIFETIME_BOUND)
Get end iterator over path.
Definition:Path.cpp:235
llvm
This is an optimization pass for GlobalISel generic memory operations.
Definition:AddressRanges.h:18
llvm::enumerate
auto enumerate(FirstRange &&First, RestRanges &&...Rest)
Given two or more input ranges, returns a new range whose values are tuples (A, B,...
Definition:STLExtras.h:2448
llvm::successors
auto successors(const MachineBasicBlock *BB)
Definition:MachineBasicBlock.h:1376
llvm::pred_size
auto pred_size(const MachineBasicBlock *BB)
Definition:MachineBasicBlock.h:1381
llvm::dbgs
raw_ostream & dbgs()
dbgs() - This returns a reference to a raw_ostream for debugging messages.
Definition:Debug.cpp:163
llvm::pred_begin
auto pred_begin(const MachineBasicBlock *BB)
Definition:MachineBasicBlock.h:1383
llvm::predecessors
auto predecessors(const MachineBasicBlock *BB)
Definition:MachineBasicBlock.h:1377
llvm::is_contained
bool is_contained(R &&Range, const E &Element)
Returns true if Element is found in Range.
Definition:STLExtras.h:1903
raw_ostream.h
llvm::GenericDomTreeUpdater::CriticalEdge
Helper structure used to hold all the basic blocks involved in the split of a critical edge.
Definition:GenericDomTreeUpdater.h:216

Generated on Thu Jul 17 2025 08:31:01 for LLVM by doxygen 1.9.6
[8]ページ先頭

©2009-2025 Movatter.jp