LLVM 20.0.0git
MachineDominanceFrontier.h
Go to the documentation of this file.
1//===- llvm/CodeGen/MachineDominanceFrontier.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#ifndef LLVM_CODEGEN_MACHINEDOMINANCEFRONTIER_H
10#define LLVM_CODEGEN_MACHINEDOMINANCEFRONTIER_H
11
17
18namespace llvm {
19
22
23public:
30
33
34 static char ID;
35
37
39
41 return Base.getRoots();
42 }
43
45 return Base.getRoot();
46 }
47
48 bool isPostDominator() const {
49 return Base.isPostDominator();
50 }
51
53 return Base.begin();
54 }
55
57 return Base.begin();
58 }
59
61 return Base.end();
62 }
63
65 return Base.end();
66 }
67
69 return Base.find(B);
70 }
71
73 return Base.find(B);
74 }
75
77 return Base.addBasicBlock(BB, frontier);
78 }
79
81 return Base.removeBlock(BB);
82 }
83
85 return Base.addToFrontier(I, Node);
86 }
87
89 return Base.removeFromFrontier(I, Node);
90 }
91
92 bool compareDomSet(DomSetType &DS1, const DomSetType &DS2) const {
93 return Base.compareDomSet(DS1, DS2);
94 }
95
97 return Base.compare(Other);
98 }
99
100 bool runOnMachineFunction(MachineFunction &F) override;
101
102 void releaseMemory() override;
103
104 void getAnalysisUsage(AnalysisUsage &AU) const override;
105};
106
107} // end namespace llvm
108
109#endif // LLVM_CODEGEN_MACHINEDOMINANCEFRONTIER_H
static GCRegistry::Add< OcamlGC > B("ocaml", "ocaml 3.10-compatible GC")
This file defines a set of templates that efficiently compute a dominator tree over a generic graph.
#define F(x, y, z)
Definition: MD5.cpp:55
#define I(x, y, z)
Definition: MD5.cpp:58
Represent the analysis usage information of a pass.
Base class for the actual dominator tree node.
DominanceFrontierBase - Common base class for computing forward and inverse dominance frontiers for a...
typename DomSetMapType::iterator iterator
typename DomSetMapType::const_iterator const_iterator
Core dominator tree base class.
DominanceFrontier Class - Concrete subclass of DominanceFrontierBase that is used to compute a forwar...
void getAnalysisUsage(AnalysisUsage &AU) const override
getAnalysisUsage - This function should be overriden by passes that need analysis information to do t...
MachineBasicBlock * getRoot() const
const_iterator find(MachineBasicBlock *B) const
iterator addBasicBlock(MachineBasicBlock *BB, const DomSetType &frontier)
bool compare(DominanceFrontierBase< MachineBasicBlock, false > &Other) const
DominanceFrontierBase< MachineBasicBlock, false >::iterator iterator
void removeBlock(MachineBasicBlock *BB)
void addToFrontier(iterator I, MachineBasicBlock *Node)
const SmallVectorImpl< MachineBasicBlock * > & getRoots() const
iterator find(MachineBasicBlock *B)
bool runOnMachineFunction(MachineFunction &F) override
runOnMachineFunction - This method must be overloaded to perform the desired machine code transformat...
ForwardDominanceFrontierBase< MachineBasicBlock > & getBase()
MachineDominanceFrontier(const MachineDominanceFrontier &)=delete
void releaseMemory() override
releaseMemory() - This member can be implemented by a pass if it wants to be able to release its memo...
void removeFromFrontier(iterator I, MachineBasicBlock *Node)
bool compareDomSet(DomSetType &DS1, const DomSetType &DS2) const
DominanceFrontierBase< MachineBasicBlock, false >::const_iterator const_iterator
MachineDominanceFrontier & operator=(const MachineDominanceFrontier &)=delete
MachineFunctionPass - This class adapts the FunctionPass interface to allow convenient creation of pa...
A vector that has set insertion semantics.
Definition: SetVector.h:57
This class consists of common code factored out of the SmallVector class to reduce code duplication b...
Definition: SmallVector.h:586
This is an optimization pass for GlobalISel generic memory operations.
Definition: AddressRanges.h:18
@ Other
Any other memory.