15#ifndef LLVM_LIB_TARGET_SPIRV_SPIRVCONVERGENCEREGIONANALYSIS_H
16#define LLVM_LIB_TARGET_SPIRV_SPIRVCONVERGENCEREGIONANALYSIS_H
25#include <unordered_set>
30class MachineModuleInfo;
87 void dump(
const unsigned IndentSize = 0)
const;
101 : TopLevelRegion(TopLevelRegion) {}
106 : TopLevelRegion(
LHS.TopLevelRegion) {
107 if (TopLevelRegion !=
LHS.TopLevelRegion) {
109 TopLevelRegion =
LHS.TopLevelRegion;
111 LHS.TopLevelRegion =
nullptr;
115 if (TopLevelRegion !=
LHS.TopLevelRegion) {
117 TopLevelRegion =
LHS.TopLevelRegion;
119 LHS.TopLevelRegion =
nullptr;
124 if (TopLevelRegion ==
nullptr)
128 delete TopLevelRegion;
129 TopLevelRegion =
nullptr;
134 return TopLevelRegion;
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...