/external/llvm/unittests/IR/ |
D | DominatorTreeTest.cpp | 30 DominatorTree *DT = in runOnFunction() local 61 EXPECT_TRUE(DT->isReachableFromEntry(BB0)); in runOnFunction() 62 EXPECT_TRUE(DT->isReachableFromEntry(BB1)); in runOnFunction() 63 EXPECT_TRUE(DT->isReachableFromEntry(BB2)); in runOnFunction() 64 EXPECT_FALSE(DT->isReachableFromEntry(BB3)); in runOnFunction() 65 EXPECT_TRUE(DT->isReachableFromEntry(BB4)); in runOnFunction() 68 EXPECT_TRUE(DT->dominates(BB0, BB0)); in runOnFunction() 69 EXPECT_TRUE(DT->dominates(BB0, BB1)); in runOnFunction() 70 EXPECT_TRUE(DT->dominates(BB0, BB2)); in runOnFunction() 71 EXPECT_TRUE(DT->dominates(BB0, BB3)); in runOnFunction() [all …]
|
/external/llvm-project/llvm/unittests/IR/ |
D | DominatorTreeTest.cpp | 28 function_ref<void(Function &F, DominatorTree *DT, PostDominatorTree *PDT)> in runWithDomTree() argument 33 DominatorTree DT(*F); in runWithDomTree() local 35 Test(*F, &DT, &PDT); in runWithDomTree() 63 [&](Function &F, DominatorTree *DT, PostDominatorTree *PDT) { in TEST() argument 72 EXPECT_TRUE(DT->dominates(PhiA, PhiB)); in TEST() 73 EXPECT_TRUE(DT->dominates(PhiB, PhiA)); in TEST() 107 *M, "f", [&](Function &F, DominatorTree *DT, PostDominatorTree *PDT) { in TEST() argument 135 EXPECT_TRUE(DT->isReachableFromEntry(BB0)); in TEST() 136 EXPECT_TRUE(DT->isReachableFromEntry(BB1)); in TEST() 137 EXPECT_TRUE(DT->isReachableFromEntry(BB2)); in TEST() [all …]
|
D | DominatorTreeBatchUpdatesTest.cpp | 97 DominatorTree DT(*Holder.F); in TEST() local 98 EXPECT_TRUE(DT.verify()); in TEST() 108 DT.applyUpdates(Updates); in TEST() 109 EXPECT_TRUE(DT.verify()); in TEST() 119 DominatorTree DT(*Holder.F); in TEST() local 120 EXPECT_TRUE(DT.verify()); in TEST() 130 DT.applyUpdates(Updates); in TEST() 131 EXPECT_TRUE(DT.verify()); in TEST() 145 DominatorTree DT(*Holder.F); in TEST() local 146 EXPECT_TRUE(DT.verify()); in TEST() [all …]
|
/external/llvm/include/llvm/Support/ |
D | GenericDomTreeConstruction.h | 33 unsigned DFSPass(DominatorTreeBase<typename GraphT::NodeType>& DT, in DFSPass() argument 39 InfoRec &VInfo = DT.Info[DT.Roots[i]]; in DFSPass() 46 InfoRec &SuccVInfo = DT.Info[*SI]; in DFSPass() 49 N = DTDFSPass(DT, *SI, N); in DFSPass() 63 DT.Info[BB]; in DFSPass() 70 DT.Vertex.push_back(BB); // Vertex[n] = V; in DFSPass() 95 DT.Info[Succ]; in DFSPass() 107 Eval(DominatorTreeBase<typename GraphT::NodeType> &DT, in Eval() argument 110 DT.Info[VIn]; in Eval() 123 DT.Info[V]; in Eval() [all …]
|
/external/llvm-project/llvm/unittests/Transforms/Utils/ |
D | CodeMoverUtilsTest.cpp | 34 function_ref<void(Function &F, DominatorTree &DT, in run() argument 38 DominatorTree DT(*F); in run() local 44 LoopInfo LI(DT); in run() 45 ScalarEvolution SE(*F, TLI, AC, DT, LI); in run() 47 Test(*F, DT, PDT, DI); in run() 97 [&](Function &F, DominatorTree &DT, PostDominatorTree &PDT, in TEST() 101 isControlFlowEquivalent(*FirstIfBody, *FirstIfBody, DT, PDT)); in TEST() 104 isControlFlowEquivalent(*FirstIfBody, *SecondIfBody, DT, PDT)); in TEST() 108 isControlFlowEquivalent(*FirstIfBody, *ThirdIfBody, DT, PDT)); in TEST() 110 isControlFlowEquivalent(*SecondIfBody, *ThirdIfBody, DT, PDT)); in TEST() [all …]
|
D | BasicBlockUtilsTest.cpp | 51 DominatorTree DT(*F); in TEST() local 52 DomTreeUpdater DTU(DT, DomTreeUpdater::UpdateStrategy::Eager); in TEST() 58 EXPECT_TRUE(DT.verify()); in TEST() 79 DominatorTree DT(*F); in TEST() local 80 DomTreeUpdater DTU(DT, DomTreeUpdater::UpdateStrategy::Eager); in TEST() 86 EXPECT_TRUE(DT.verify()); in TEST() 107 DominatorTree DT(*F); in TEST() local 111 SplitBlockPredecessors(&F->getEntryBlock(), {}, "split.entry", &DT); in TEST() 112 EXPECT_TRUE(DT.verify()); in TEST() 134 DominatorTree DT(*F); in TEST() local [all …]
|
/external/llvm-project/llvm/include/llvm/Support/ |
D | GenericDomTreeConstruction.h | 133 TreeNodePtr getNodeForBlock(NodePtr BB, DomTreeT &DT) { in getNodeForBlock() 134 if (TreeNodePtr Node = DT.getNode(BB)) return Node; in getNodeForBlock() 140 assert(IDom || DT.DomTreeNodes[nullptr]); in getNodeForBlock() 141 TreeNodePtr IDomNode = getNodeForBlock(IDom, DT); in getNodeForBlock() 145 return DT.createChild(BB, IDomNode); in getNodeForBlock() 271 void runSemiNCA(DomTreeT &DT, const unsigned MinLevel = 0) { 292 const TreeNodePtr TN = DT.getNode(N); 342 static NodePtr GetEntryNode(const DomTreeT &DT) { in GetEntryNode() 343 assert(DT.Parent && "Parent not set"); in GetEntryNode() 344 return GraphTraits<typename DomTreeT::ParentPtr>::getEntryNode(DT.Parent); in GetEntryNode() [all …]
|
/external/swiftshader/third_party/llvm-10.0/llvm/include/llvm/Support/ |
D | GenericDomTreeConstruction.h | 176 TreeNodePtr getNodeForBlock(NodePtr BB, DomTreeT &DT) { in getNodeForBlock() 177 if (TreeNodePtr Node = DT.getNode(BB)) return Node; in getNodeForBlock() 183 assert(IDom || DT.DomTreeNodes[nullptr]); in getNodeForBlock() 184 TreeNodePtr IDomNode = getNodeForBlock(IDom, DT); in getNodeForBlock() 188 return (DT.DomTreeNodes[BB] = IDomNode->addChild( in getNodeForBlock() 304 void runSemiNCA(DomTreeT &DT, const unsigned MinLevel = 0) { 325 const TreeNodePtr TN = DT.getNode(N); 375 static NodePtr GetEntryNode(const DomTreeT &DT) { in GetEntryNode() 376 assert(DT.Parent && "Parent not set"); in GetEntryNode() 377 return GraphTraits<typename DomTreeT::ParentPtr>::getEntryNode(DT.Parent); in GetEntryNode() [all …]
|
/external/llvm/include/llvm/CodeGen/ |
D | MachineDominators.h | 71 DominatorTreeBase<MachineBasicBlock>* DT; variable 79 return *DT; in getBase() 90 return DT->getRoots(); in getRoots() 95 return DT->getRoot(); in getRoot() 100 return DT->getRootNode(); in getRootNode() 108 return DT->dominates(A, B); in dominates() 114 return DT->dominates(A, B); in dominates() 122 if (BBA != BBB) return DT->dominates(BBA, BBB); in dominates() 141 return DT->properlyDominates(A, B); in properlyDominates() 147 return DT->properlyDominates(A, B); in properlyDominates() [all …]
|
D | MachinePostDominators.h | 29 DominatorTreeBase<MachineBasicBlock> *DT; 41 return DT->getRoots(); in getRoots() 45 return DT->getRootNode(); in getRootNode() 49 return DT->getNode(BB); 53 return DT->getNode(BB); in getNode() 58 return DT->dominates(A, B); in dominates() 62 return DT->dominates(A, B); in dominates() 67 return DT->properlyDominates(A, B); in properlyDominates() 72 return DT->properlyDominates(A, B); in properlyDominates() 77 return DT->findNearestCommonDominator(A, B); in findNearestCommonDominator()
|
/external/clang/include/clang/Analysis/Analyses/ |
D | Dominators.h | 41 llvm::DominatorTreeBase<CFGBlock>* DT; 44 DT = new llvm::DominatorTreeBase<CFGBlock>(false); in DominatorTree() 47 ~DominatorTree() override { delete DT; } in ~DominatorTree() local 49 llvm::DominatorTreeBase<CFGBlock>& getBase() { return *DT; } in getBase() 54 return DT->getRoot(); in getRoot() 60 return DT->getRootNode(); in getRootNode() 74 if (DT->compare(Other.getBase())) in compare() 85 DT->recalculate(*cfg); in buildDominatorTree() 95 if(DT->getNode(*I)->getIDom()) in dump() 98 << DT->getNode(*I)->getIDom()->getBlock()->getBlockID() in dump() [all …]
|
/external/llvm-project/llvm/include/llvm/CodeGen/ |
D | MachineDominators.h | 70 std::unique_ptr<DomTreeT> DT; variable 88 if (!DT) DT.reset(new DomTreeT()); in getBase() 90 return *DT; in getBase() 97 return DT->getRoot(); in getRoot() 102 return DT->getRootNode(); in getRootNode() 112 return DT->dominates(A, B); in dominates() 117 return DT->dominates(A, B); in dominates() 125 if (BBA != BBB) return DT->dominates(BBA, BBB); in dominates() 138 return DT->properlyDominates(A, B); in properlyDominates() 144 return DT->properlyDominates(A, B); in properlyDominates() [all …]
|
/external/swiftshader/third_party/llvm-10.0/llvm/include/llvm/CodeGen/ |
D | MachineDominators.h | 71 std::unique_ptr<DomTreeT> DT; variable 89 if (!DT) DT.reset(new DomTreeT()); in getBase() 91 return *DT; in getBase() 102 return DT->getRoots(); in getRoots() 107 return DT->getRoot(); in getRoot() 112 return DT->getRootNode(); in getRootNode() 122 return DT->dominates(A, B); in dominates() 127 return DT->dominates(A, B); in dominates() 135 if (BBA != BBB) return DT->dominates(BBA, BBB); in dominates() 148 return DT->properlyDominates(A, B); in properlyDominates() [all …]
|
/external/llvm/include/llvm/Analysis/ |
D | InstructionSimplify.h | 54 const DominatorTree *DT = nullptr, 63 const DominatorTree *DT = nullptr, 72 const DominatorTree *DT = nullptr, 81 const DominatorTree *DT = nullptr, 90 const DominatorTree *DT = nullptr, 98 const DominatorTree *DT = nullptr, 106 const DominatorTree *DT = nullptr, 114 const DominatorTree *DT = nullptr, 123 const DominatorTree *DT = nullptr, 131 const DominatorTree *DT = nullptr, [all …]
|
/external/swiftshader/third_party/llvm-10.0/llvm/lib/Analysis/ |
D | DomTreeUpdater.cpp | 60 if (Strategy != UpdateStrategy::Lazy || !DT) in applyDomTreeUpdates() 68 DT->applyUpdates(ArrayRef<DominatorTree::UpdateType>(I, E)); in applyDomTreeUpdates() 124 if (DT) in recalculate() 125 DT->recalculate(F); in recalculate() 140 if (DT) in recalculate() 141 DT->recalculate(F); in recalculate() 156 if (!DT) in hasPendingDomTreeUpdates() 206 if (DT && !IsRecalculatingDomTree) in eraseDelBBNode() 207 if (DT->getNode(DelBB)) in eraseDelBBNode() 208 DT->eraseNode(DelBB); in eraseDelBBNode() [all …]
|
/external/llvm-project/llvm/lib/Analysis/ |
D | DomTreeUpdater.cpp | 59 if (Strategy != UpdateStrategy::Lazy || !DT) in applyDomTreeUpdates() 67 DT->applyUpdates(ArrayRef<DominatorTree::UpdateType>(I, E)); in applyDomTreeUpdates() 123 if (DT) in recalculate() 124 DT->recalculate(F); in recalculate() 139 if (DT) in recalculate() 140 DT->recalculate(F); in recalculate() 155 if (!DT) in hasPendingDomTreeUpdates() 205 if (DT && !IsRecalculatingDomTree) in eraseDelBBNode() 206 if (DT->getNode(DelBB)) in eraseDelBBNode() 207 DT->eraseNode(DelBB); in eraseDelBBNode() [all …]
|
/external/swiftshader/third_party/llvm-10.0/llvm/lib/CodeGen/ |
D | MachineDominators.cpp | 60 DT.reset(new DomTreeBase<MachineBasicBlock>()); in calculate() 61 DT->recalculate(F); in calculate() 71 DT.reset(nullptr); in releaseMemory() 75 if (DT && VerifyMachineDomInfo) in verifyAnalysis() 76 if (!DT->verify(DomTreeT::VerificationLevel::Basic)) { in verifyAnalysis() 83 if (DT) in print() 84 DT->print(OS); in print() 104 MachineDomTreeNode *SuccDTNode = DT->getNode(Succ); in applySplitCriticalEdges() 127 if (!DT->dominates(SuccDTNode, DT->getNode(PredBB))) { in applySplitCriticalEdges() 139 MachineDomTreeNode *NewDTNode = DT->addNewBlock(Edge.NewBB, Edge.FromBB); in applySplitCriticalEdges() [all …]
|
/external/llvm-project/llvm/lib/CodeGen/ |
D | MachineDominators.cpp | 60 DT.reset(new DomTreeBase<MachineBasicBlock>()); in calculate() 61 DT->recalculate(F); in calculate() 71 DT.reset(nullptr); in releaseMemory() 75 if (DT && VerifyMachineDomInfo) in verifyAnalysis() 76 if (!DT->verify(DomTreeT::VerificationLevel::Basic)) { in verifyAnalysis() 83 if (DT) in print() 84 DT->print(OS); in print() 104 MachineDomTreeNode *SuccDTNode = DT->getNode(Succ); in applySplitCriticalEdges() 127 if (!DT->dominates(SuccDTNode, DT->getNode(PredBB))) { in applySplitCriticalEdges() 139 MachineDomTreeNode *NewDTNode = DT->addNewBlock(Edge.NewBB, Edge.FromBB); in applySplitCriticalEdges() [all …]
|
/external/llvm-project/llvm/lib/Transforms/Utils/ |
D | CodeMoverUtils.cpp | 65 const DominatorTree &DT, 96 static bool domTreeLevelBefore(DominatorTree *DT, const Instruction *InstA, in domTreeLevelBefore() argument 103 DomTreeNode *DA = DT->getNode(InstA->getParent()); in domTreeLevelBefore() 104 DomTreeNode *DB = DT->getNode(InstB->getParent()); in domTreeLevelBefore() 109 const BasicBlock &BB, const BasicBlock &Dominator, const DominatorTree &DT, in collectControlConditions() argument 111 assert(DT.dominates(&Dominator, &BB) && "Expecting Dominator to dominate BB"); in collectControlConditions() 124 assert(DT.getNode(CurBlock) && "Expecting a valid DT node for CurBlock"); in collectControlConditions() 125 BasicBlock *IDom = DT.getNode(CurBlock)->getIDom()->getBlock(); in collectControlConditions() 126 assert(DT.dominates(&Dominator, IDom) && in collectControlConditions() 230 const DominatorTree &DT, in isControlFlowEquivalent() argument [all …]
|
/external/llvm/lib/Transforms/Utils/ |
D | LCSSA.cpp | 63 static bool processInstruction(Loop &L, Instruction &Inst, DominatorTree &DT, in processInstruction() argument 101 DomTreeNode *DomNode = DT.getNode(DomBB); in processInstruction() 112 if (!DT.dominates(DomNode, DT.getNode(ExitBB))) in processInstruction() 193 processInstruction(*OtherLoop, *I, DT, EBs, PredCache, LI); in processInstruction() 208 DominatorTree &DT, in blockDominatesAnExit() argument 210 DomTreeNode *DomNode = DT.getNode(BB); in blockDominatesAnExit() 212 return DT.dominates(DomNode, DT.getNode(EB)); in blockDominatesAnExit() 216 bool llvm::formLCSSA(Loop &L, DominatorTree &DT, LoopInfo *LI, in formLCSSA() argument 235 if (!blockDominatesAnExit(BB, DT, ExitBlocks)) in formLCSSA() 246 Changed |= processInstruction(L, I, DT, ExitBlocks, PredCache, LI); in formLCSSA() [all …]
|
/external/llvm-project/llvm/test/Analysis/MemorySSA/ |
D | invalidate.ll | 6 ; RUN: | FileCheck %s --check-prefix=CHECK-DT-INVALIDATE 19 ; CHECK-DT-INVALIDATE: Running analysis: MemorySSAAnalysis 20 ; CHECK-DT-INVALIDATE: Running analysis: DominatorTreeAnalysis 21 ; CHECK-DT-INVALIDATE: Running analysis: AAManager 22 ; CHECK-DT-INVALIDATE: Running analysis: BasicAA 23 ; CHECK-DT-INVALIDATE: Running pass: InvalidateAnalysisPass<{{.*}}DominatorTreeAnalysis 24 ; CHECK-DT-INVALIDATE: Invalidating analysis: DominatorTreeAnalysis 25 ; CHECK-DT-INVALIDATE: Invalidating analysis: BasicAA 26 ; CHECK-DT-INVALIDATE: Invalidating analysis: AAManager 27 ; CHECK-DT-INVALIDATE: Invalidating analysis: MemorySSAAnalysis [all …]
|
/external/llvm/lib/CodeGen/ |
D | MachineDominators.cpp | 52 DT->recalculate(F); in runOnMachineFunction() 60 DT = new DominatorTreeBase<MachineBasicBlock>(false); in MachineDominatorTree() 64 delete DT; in ~MachineDominatorTree() 68 DT->releaseMemory(); in releaseMemory() 77 DT->print(OS); in print() 97 MachineDomTreeNode *SuccDTNode = DT->getNode(Succ); in applySplitCriticalEdges() 120 if (!DT->dominates(SuccDTNode, DT->getNode(PredBB))) { in applySplitCriticalEdges() 132 MachineDomTreeNode *NewDTNode = DT->addNewBlock(Edge.NewBB, Edge.FromBB); in applySplitCriticalEdges() 138 DT->changeImmediateDominator(DT->getNode(Edge.ToBB), NewDTNode); in applySplitCriticalEdges() 149 OtherDT.DT->recalculate(F); in verifyDomTree()
|
/external/llvm/lib/Transforms/Scalar/ |
D | Sink.cpp | 38 DominatorTree &DT) { in AllUsesDominatedByBlock() argument 54 if (!DT.dominates(BB, UseBlock)) in AllUsesDominatedByBlock() 96 DominatorTree &DT, LoopInfo &LI) { in IsAcceptableTarget() argument 122 if (!DT.dominates(Inst->getParent(), SuccToSinkTo)) in IsAcceptableTarget() 134 return AllUsesDominatedByBlock(Inst, SuccToSinkTo, DT); in IsAcceptableTarget() 141 DominatorTree &DT, LoopInfo &LI, AAResults &AA) { in SinkInstruction() argument 168 DomTreeNode *DTN = DT.getNode(Inst->getParent()); in SinkInstruction() 173 IsAcceptableTarget(Inst, Candidate, DT, LI)) in SinkInstruction() 181 if (IsAcceptableTarget(Inst, *I, DT, LI)) in SinkInstruction() 200 static bool ProcessBlock(BasicBlock &BB, DominatorTree &DT, LoopInfo &LI, in ProcessBlock() argument [all …]
|
/external/swiftshader/third_party/llvm-10.0/llvm/lib/Transforms/Scalar/ |
D | Sink.cpp | 38 DominatorTree &DT) { in AllUsesDominatedByBlock() argument 54 if (!DT.dominates(BB, UseBlock)) in AllUsesDominatedByBlock() 96 DominatorTree &DT, LoopInfo &LI) { in IsAcceptableTarget() argument 122 if (!DT.dominates(Inst->getParent(), SuccToSinkTo)) in IsAcceptableTarget() 134 return AllUsesDominatedByBlock(Inst, SuccToSinkTo, DT); in IsAcceptableTarget() 141 DominatorTree &DT, LoopInfo &LI, AAResults &AA) { in SinkInstruction() argument 168 DomTreeNode *DTN = DT.getNode(Inst->getParent()); in SinkInstruction() 174 if (IsAcceptableTarget(Inst, Candidate, DT, LI)) in SinkInstruction() 182 if (IsAcceptableTarget(Inst, *I, DT, LI)) in SinkInstruction() 199 static bool ProcessBlock(BasicBlock &BB, DominatorTree &DT, LoopInfo &LI, in ProcessBlock() argument [all …]
|
/external/llvm-project/llvm/lib/Transforms/Scalar/ |
D | Sink.cpp | 71 DominatorTree &DT, LoopInfo &LI) { in IsAcceptableTarget() argument 92 if (!DT.dominates(Inst->getParent(), SuccToSinkTo)) in IsAcceptableTarget() 109 DominatorTree &DT, LoopInfo &LI, AAResults &AA) { in SinkInstruction() argument 139 if (!DT.isReachableFromEntry(UseBlock)) in SinkInstruction() 148 SuccToSinkTo = DT.findNearestCommonDominator(SuccToSinkTo, UseBlock); in SinkInstruction() 152 if (!DT.dominates(BB, SuccToSinkTo)) in SinkInstruction() 160 !IsAcceptableTarget(Inst, SuccToSinkTo, DT, LI)) in SinkInstruction() 161 SuccToSinkTo = DT.getNode(SuccToSinkTo)->getIDom()->getBlock(); in SinkInstruction() 179 static bool ProcessBlock(BasicBlock &BB, DominatorTree &DT, LoopInfo &LI, in ProcessBlock() argument 187 if (!DT.isReachableFromEntry(&BB)) return false; in ProcessBlock() [all …]
|