/external/swiftshader/third_party/llvm-7.0/llvm/lib/CodeGen/ |
D | TailDuplicator.cpp | 105 for (MachineBasicBlock *PredBB : Preds) { in VerifyPHIs() 109 if (PHIBB == PredBB) { in VerifyPHIs() 118 << printMBBReference(*PredBB) << '\n'; in VerifyPHIs() 340 MachineInstr *MI, MachineBasicBlock *TailBB, MachineBasicBlock *PredBB, in processPHI() argument 345 unsigned SrcOpIdx = getPHISrcRegOpIdx(MI, PredBB); in processPHI() 357 addSSAUpdateEntry(DefReg, NewDef, PredBB); in processPHI() 372 MachineInstr *MI, MachineBasicBlock *TailBB, MachineBasicBlock *PredBB, in duplicateInstruction() argument 377 BuildMI(*PredBB, PredBB->end(), PredBB->findDebugLoc(PredBB->begin()), in duplicateInstruction() 382 MachineInstr &NewMI = TII->duplicate(*PredBB, PredBB->end(), *MI); in duplicateInstruction() 397 addSSAUpdateEntry(Reg, NewReg, PredBB); in duplicateInstruction() [all …]
|
D | MachineDominators.cpp | 109 for (MachineBasicBlock *PredBB : Succ->predecessors()) { in applySplitCriticalEdges() 110 if (PredBB == Edge.NewBB) in applySplitCriticalEdges() 124 if (NewBBs.count(PredBB)) { in applySplitCriticalEdges() 125 assert(PredBB->pred_size() == 1 && "A basic block resulting from a " in applySplitCriticalEdges() 128 PredBB = *PredBB->pred_begin(); in applySplitCriticalEdges() 130 if (!DT->dominates(SuccDTNode, DT->getNode(PredBB))) { in applySplitCriticalEdges()
|
D | BranchFolding.cpp | 637 MachineBasicBlock *PredBB, in ProfitableToMerge() argument 662 if ((MBB1 == PredBB || MBB2 == PredBB) && in ProfitableToMerge() 665 unsigned NumTerms = CountTerminators(MBB1 == PredBB ? MBB2 : MBB1, I); in ProfitableToMerge() 710 if (SuccBB && MBB1 != PredBB && MBB2 != PredBB && in ProfitableToMerge() 732 MachineBasicBlock *PredBB) { in ComputeSameTails() argument 745 SuccBB, PredBB, in ComputeSameTails() 767 MachineBasicBlock *PredBB) { in RemoveBlocksWithHash() argument 774 if (SuccBB && CurMBB != PredBB) in RemoveBlocksWithHash() 784 bool BranchFolder::CreateCommonTailOnlyBlock(MachineBasicBlock *&PredBB, in CreateCommonTailOnlyBlock() argument 792 if (SameTails[i].getBlock() == PredBB) { in CreateCommonTailOnlyBlock() [all …]
|
D | BranchFolding.h | 161 MachineBasicBlock* PredBB, 188 MachineBasicBlock *PredBB); 193 MachineBasicBlock* PredBB); 197 bool CreateCommonTailOnlyBlock(MachineBasicBlock *&PredBB,
|
/external/llvm/lib/CodeGen/ |
D | TailDuplicator.cpp | 84 MachineBasicBlock *PredBB = *PI; in VerifyPHIs() local 88 if (PHIBB == PredBB) { in VerifyPHIs() 96 << PredBB->getNumber() << '\n'; in VerifyPHIs() 304 MachineInstr *MI, MachineBasicBlock *TailBB, MachineBasicBlock *PredBB, in processPHI() argument 309 unsigned SrcOpIdx = getPHISrcRegOpIdx(MI, PredBB); in processPHI() 321 addSSAUpdateEntry(DefReg, NewDef, PredBB); in processPHI() 336 MachineInstr *MI, MachineBasicBlock *TailBB, MachineBasicBlock *PredBB, in duplicateInstruction() argument 355 addSSAUpdateEntry(Reg, NewReg, PredBB); in duplicateInstruction() 396 BuildMI(*PredBB, MI, MI->getDebugLoc(), in duplicateInstruction() 414 PredBB->insert(PredBB->instr_end(), NewMI); in duplicateInstruction() [all …]
|
D | MachineDominators.cpp | 99 for (MachineBasicBlock *PredBB : Succ->predecessors()) { in applySplitCriticalEdges() 100 if (PredBB == Edge.NewBB) in applySplitCriticalEdges() 114 if (NewBBs.count(PredBB)) { in applySplitCriticalEdges() 115 assert(PredBB->pred_size() == 1 && "A basic block resulting from a " in applySplitCriticalEdges() 118 PredBB = *PredBB->pred_begin(); in applySplitCriticalEdges() 120 if (!DT->dominates(SuccDTNode, DT->getNode(PredBB))) { in applySplitCriticalEdges()
|
D | BranchFolding.cpp | 599 MachineBasicBlock *PredBB, in ProfitableToMerge() argument 620 if (MBB1 == PredBB || MBB2 == PredBB) { in ProfitableToMerge() 622 unsigned NumTerms = CountTerminators(MBB1 == PredBB ? MBB2 : MBB1, I); in ProfitableToMerge() 640 if (SuccBB && MBB1 != PredBB && MBB2 != PredBB && in ProfitableToMerge() 671 MachineBasicBlock *PredBB) { in ComputeSameTails() argument 684 SuccBB, PredBB, in ComputeSameTails() 707 MachineBasicBlock *PredBB) { in RemoveBlocksWithHash() argument 714 if (SuccBB && CurMBB != PredBB) in RemoveBlocksWithHash() 726 bool BranchFolder::CreateCommonTailOnlyBlock(MachineBasicBlock *&PredBB, in CreateCommonTailOnlyBlock() argument 734 if (SameTails[i].getBlock() == PredBB) { in CreateCommonTailOnlyBlock() [all …]
|
D | BranchFolding.h | 132 MachineBasicBlock* PredBB); 142 MachineBasicBlock *PredBB); 144 MachineBasicBlock* PredBB); 145 bool CreateCommonTailOnlyBlock(MachineBasicBlock *&PredBB,
|
/external/swiftshader/third_party/LLVM/lib/CodeGen/ |
D | TailDuplication.cpp | 83 MachineBasicBlock *PredBB, 90 MachineBasicBlock *PredBB, 148 MachineBasicBlock *PredBB = *PI; in VerifyPHIs() local 152 if (PHIBB == PredBB) { in VerifyPHIs() 160 << PredBB->getNumber() << '\n'; in VerifyPHIs() 377 MachineBasicBlock *PredBB, in ProcessPHI() argument 383 unsigned SrcOpIdx = getPHISrcRegOpIdx(MI, PredBB); in ProcessPHI() 394 AddSSAUpdateEntry(DefReg, NewDef, PredBB); in ProcessPHI() 410 MachineBasicBlock *PredBB, in DuplicateInstruction() argument 428 AddSSAUpdateEntry(Reg, NewReg, PredBB); in DuplicateInstruction() [all …]
|
D | BranchFolding.cpp | 522 MachineBasicBlock *PredBB) { in ProfitableToMerge() argument 532 if (MBB1 == PredBB || MBB2 == PredBB) { in ProfitableToMerge() 534 unsigned NumTerms = CountTerminators(MBB1 == PredBB ? MBB2 : MBB1, I); in ProfitableToMerge() 552 if (SuccBB && MBB1 != PredBB && MBB2 != PredBB && in ProfitableToMerge() 587 MachineBasicBlock *PredBB) { in ComputeSameTails() argument 601 SuccBB, PredBB)) { in ComputeSameTails() 623 MachineBasicBlock *PredBB) { in RemoveBlocksWithHash() argument 630 if (SuccBB && CurMBB != PredBB) in RemoveBlocksWithHash() 642 bool BranchFolder::CreateCommonTailOnlyBlock(MachineBasicBlock *&PredBB, in CreateCommonTailOnlyBlock() argument 649 if (SameTails[i].getBlock() == PredBB) { in CreateCommonTailOnlyBlock() [all …]
|
D | BranchFolding.h | 97 MachineBasicBlock* PredBB); 106 MachineBasicBlock *PredBB); 108 MachineBasicBlock* PredBB); 109 bool CreateCommonTailOnlyBlock(MachineBasicBlock *&PredBB,
|
/external/swiftshader/third_party/llvm-7.0/llvm/lib/Analysis/ |
D | PHITransAddr.cpp | 145 BasicBlock *PredBB, in PHITranslateSubExpr() argument 170 return AddAsInput(PN->getIncomingValueForBlock(PredBB)); in PHITranslateSubExpr() 190 Value *PHIIn = PHITranslateSubExpr(Cast->getOperand(0), CurBB, PredBB, DT); in PHITranslateSubExpr() 208 (!DT || DT->dominates(CastI->getParent(), PredBB))) in PHITranslateSubExpr() 219 Value *GEPOp = PHITranslateSubExpr(GEP->getOperand(i), CurBB, PredBB, DT); in PHITranslateSubExpr() 245 (!DT || DT->dominates(GEPI->getParent(), PredBB))) { in PHITranslateSubExpr() 261 Value *LHS = PHITranslateSubExpr(Inst->getOperand(0), CurBB, PredBB, DT); in PHITranslateSubExpr() 297 (!DT || DT->dominates(BO->getParent(), PredBB))) in PHITranslateSubExpr() 313 bool PHITransAddr::PHITranslateValue(BasicBlock *CurBB, BasicBlock *PredBB, in PHITranslateValue() argument 318 if (DT && DT->isReachableFromEntry(PredBB)) in PHITranslateValue() [all …]
|
/external/swiftshader/third_party/LLVM/lib/Analysis/ |
D | PHITransAddr.cpp | 145 BasicBlock *PredBB, in PHITranslateSubExpr() argument 170 return AddAsInput(PN->getIncomingValueForBlock(PredBB)); in PHITranslateSubExpr() 190 Value *PHIIn = PHITranslateSubExpr(Cast->getOperand(0), CurBB, PredBB, DT); in PHITranslateSubExpr() 209 (!DT || DT->dominates(CastI->getParent(), PredBB))) in PHITranslateSubExpr() 220 Value *GEPOp = PHITranslateSubExpr(GEP->getOperand(i), CurBB, PredBB, DT); in PHITranslateSubExpr() 246 (!DT || DT->dominates(GEPI->getParent(), PredBB))) { in PHITranslateSubExpr() 268 Value *LHS = PHITranslateSubExpr(Inst->getOperand(0), CurBB, PredBB, DT); in PHITranslateSubExpr() 305 (!DT || DT->dominates(BO->getParent(), PredBB))) in PHITranslateSubExpr() 321 bool PHITransAddr::PHITranslateValue(BasicBlock *CurBB, BasicBlock *PredBB, in PHITranslateValue() argument 324 Addr = PHITranslateSubExpr(Addr, CurBB, PredBB, DT); in PHITranslateValue() [all …]
|
/external/llvm/lib/Analysis/ |
D | PHITransAddr.cpp | 146 BasicBlock *PredBB, in PHITranslateSubExpr() argument 172 return AddAsInput(PN->getIncomingValueForBlock(PredBB)); in PHITranslateSubExpr() 192 Value *PHIIn = PHITranslateSubExpr(Cast->getOperand(0), CurBB, PredBB, DT); in PHITranslateSubExpr() 210 (!DT || DT->dominates(CastI->getParent(), PredBB))) in PHITranslateSubExpr() 221 Value *GEPOp = PHITranslateSubExpr(GEP->getOperand(i), CurBB, PredBB, DT); in PHITranslateSubExpr() 247 (!DT || DT->dominates(GEPI->getParent(), PredBB))) { in PHITranslateSubExpr() 263 Value *LHS = PHITranslateSubExpr(Inst->getOperand(0), CurBB, PredBB, DT); in PHITranslateSubExpr() 300 (!DT || DT->dominates(BO->getParent(), PredBB))) in PHITranslateSubExpr() 316 bool PHITransAddr::PHITranslateValue(BasicBlock *CurBB, BasicBlock *PredBB, in PHITranslateValue() argument 321 if (DT && DT->isReachableFromEntry(PredBB)) in PHITranslateValue() [all …]
|
/external/swiftshader/third_party/llvm-7.0/llvm/lib/Transforms/Scalar/ |
D | JumpThreading.cpp | 218 auto *PredBB = IncomingBB; in updatePredecessorProfileMetadata() local 221 BranchInst *PredBr = dyn_cast<BranchInst>(PredBB->getTerminator()); in updatePredecessorProfileMetadata() 223 return {PredBB, SuccBB}; in updatePredecessorProfileMetadata() 224 auto *SinglePredBB = PredBB->getSinglePredecessor(); in updatePredecessorProfileMetadata() 227 SuccBB = PredBB; in updatePredecessorProfileMetadata() 228 PredBB = SinglePredBB; in updatePredecessorProfileMetadata() 248 BasicBlock *PredBB = PredOutEdge.first; in updatePredecessorProfileMetadata() local 249 BranchInst *PredBr = cast<BranchInst>(PredBB->getTerminator()); in updatePredecessorProfileMetadata() 767 BasicBlock *PredBB = PN->getIncomingBlock(i); in ComputeValueKnownInPredecessors() local 771 RHS = CmpRHS->DoPHITranslation(BB, PredBB); in ComputeValueKnownInPredecessors() [all …]
|
D | SpeculateAroundPHIs.cpp | 563 for (auto *PredBB : PredSet) { in speculatePHIs() local 565 PredBB, ParentBB, in speculatePHIs() 569 LLVM_DEBUG(dbgs() << " Split critical edge from: " << PredBB->getName() in speculatePHIs() 573 assert(PredBB->getSingleSuccessor() == ParentBB && in speculatePHIs() 575 assert(!isa<InvokeInst>(PredBB->getTerminator()) && in speculatePHIs() 579 SpecPreds.push_back(PredBB); in speculatePHIs() 640 for (auto *PredBB : SpecPreds) in speculatePHIs() local 641 SpeculatedVals.push_back(IncomingValueMap.find(PredBB)->second); in speculatePHIs() 646 auto *PredBB = SpecPreds[PredIdx]; in speculatePHIs() local 647 assert(PredBB->getSingleSuccessor() == ParentBB && in speculatePHIs() [all …]
|
/external/llvm/lib/Transforms/Scalar/ |
D | JumpThreading.cpp | 553 BasicBlock *PredBB = PN->getIncomingBlock(i); in ComputeValueKnownInPredecessors() local 555 Value *RHS = Cmp->getOperand(1)->DoPHITranslation(BB, PredBB); in ComputeValueKnownInPredecessors() 564 cast<Constant>(RHS), PredBB, BB, in ComputeValueKnownInPredecessors() 572 Result.push_back(std::make_pair(KC, PredBB)); in ComputeValueKnownInPredecessors() 988 for (BasicBlock *PredBB : predecessors(LoadBB)) { in SimplifyPartiallyRedundantLoad() 990 if (!PredsScanned.insert(PredBB).second) in SimplifyPartiallyRedundantLoad() 994 BBIt = PredBB->end(); in SimplifyPartiallyRedundantLoad() 996 Value *PredAvailable = FindAvailableLoadedValue(LI, PredBB, BBIt, in SimplifyPartiallyRedundantLoad() 1000 OneUnavailablePred = PredBB; in SimplifyPartiallyRedundantLoad() 1009 AvailablePreds.push_back(std::make_pair(PredBB, PredAvailable)); in SimplifyPartiallyRedundantLoad() [all …]
|
/external/swiftshader/third_party/LLVM/lib/Transforms/Scalar/ |
D | JumpThreading.cpp | 473 BasicBlock *PredBB = PN->getIncomingBlock(i); in ComputeValueKnownInPredecessors() local 475 Value *RHS = Cmp->getOperand(1)->DoPHITranslation(BB, PredBB); in ComputeValueKnownInPredecessors() 484 cast<Constant>(RHS), PredBB, BB); in ComputeValueKnownInPredecessors() 491 Result.push_back(std::make_pair(KC, PredBB)); in ComputeValueKnownInPredecessors() 865 BasicBlock *PredBB = *PI; in SimplifyPartiallyRedundantLoad() local 868 if (!PredsScanned.insert(PredBB)) in SimplifyPartiallyRedundantLoad() 872 BBIt = PredBB->end(); in SimplifyPartiallyRedundantLoad() 873 Value *PredAvailable = FindAvailableLoadedValue(LoadedPtr, PredBB, BBIt, 6); in SimplifyPartiallyRedundantLoad() 875 OneUnavailablePred = PredBB; in SimplifyPartiallyRedundantLoad() 881 AvailablePreds.push_back(std::make_pair(PredBB, PredAvailable)); in SimplifyPartiallyRedundantLoad() [all …]
|
/external/swiftshader/third_party/LLVM/include/llvm/Analysis/ |
D | PHITransAddr.h | 72 bool PHITranslateValue(BasicBlock *CurBB, BasicBlock *PredBB, 82 Value *PHITranslateWithInsertion(BasicBlock *CurBB, BasicBlock *PredBB, 93 Value *PHITranslateSubExpr(Value *V, BasicBlock *CurBB, BasicBlock *PredBB, 102 BasicBlock *PredBB, const DominatorTree &DT,
|
/external/llvm/include/llvm/Analysis/ |
D | PHITransAddr.h | 82 bool PHITranslateValue(BasicBlock *CurBB, BasicBlock *PredBB, 92 Value *PHITranslateWithInsertion(BasicBlock *CurBB, BasicBlock *PredBB, 104 Value *PHITranslateSubExpr(Value *V, BasicBlock *CurBB, BasicBlock *PredBB, 113 BasicBlock *PredBB, const DominatorTree &DT,
|
D | LoopInfoImpl.h | 357 BlockT *PredBB = ReverseCFGWorklist.back(); in discoverAndMapSubloop() local 360 LoopT *Subloop = LI->getLoopFor(PredBB); in discoverAndMapSubloop() 362 if (!DomTree.isReachableFromEntry(PredBB)) in discoverAndMapSubloop() 366 LI->changeLoopFor(PredBB, L); in discoverAndMapSubloop() 368 if (PredBB == L->getHeader()) in discoverAndMapSubloop() 372 InvBlockTraits::child_begin(PredBB), in discoverAndMapSubloop() 373 InvBlockTraits::child_end(PredBB)); in discoverAndMapSubloop() 388 PredBB = Subloop->getHeader(); in discoverAndMapSubloop() 394 InvBlockTraits::child_begin(PredBB), in discoverAndMapSubloop() 395 PE = InvBlockTraits::child_end(PredBB); PI != PE; ++PI) { in discoverAndMapSubloop()
|
/external/swiftshader/third_party/llvm-7.0/llvm/include/llvm/Analysis/ |
D | PHITransAddr.h | 82 bool PHITranslateValue(BasicBlock *CurBB, BasicBlock *PredBB, 92 Value *PHITranslateWithInsertion(BasicBlock *CurBB, BasicBlock *PredBB, 104 Value *PHITranslateSubExpr(Value *V, BasicBlock *CurBB, BasicBlock *PredBB, 113 BasicBlock *PredBB, const DominatorTree &DT,
|
/external/swiftshader/third_party/LLVM/lib/Transforms/Utils/ |
D | BasicBlockUtils.cpp | 120 BasicBlock *PredBB = BB->getUniquePredecessor(); in MergeBlockIntoPredecessor() local 121 if (!PredBB) return false; in MergeBlockIntoPredecessor() 124 if (PredBB == BB) return false; in MergeBlockIntoPredecessor() 126 if (isa<InvokeInst>(PredBB->getTerminator())) return false; in MergeBlockIntoPredecessor() 128 succ_iterator SI(succ_begin(PredBB)), SE(succ_end(PredBB)); in MergeBlockIntoPredecessor() 154 PredBB->getInstList().pop_back(); in MergeBlockIntoPredecessor() 158 BB->replaceAllUsesWith(PredBB); in MergeBlockIntoPredecessor() 161 PredBB->getInstList().splice(PredBB->end(), BB->getInstList()); in MergeBlockIntoPredecessor() 164 if (!PredBB->hasName()) in MergeBlockIntoPredecessor() 165 PredBB->takeName(BB); in MergeBlockIntoPredecessor() [all …]
|
/external/swiftshader/third_party/llvm-7.0/llvm/lib/Transforms/Utils/ |
D | BasicBlockUtils.cpp | 128 BasicBlock *PredBB = BB->getUniquePredecessor(); in MergeBlockIntoPredecessor() local 129 if (!PredBB) return false; in MergeBlockIntoPredecessor() 132 if (PredBB == BB) return false; in MergeBlockIntoPredecessor() 134 if (PredBB->getTerminator()->isExceptional()) in MergeBlockIntoPredecessor() 138 if (PredBB->getUniqueSuccessor() != BB) in MergeBlockIntoPredecessor() 162 Updates.push_back({DominatorTree::Delete, PredBB, BB}); in MergeBlockIntoPredecessor() 165 Updates.push_back({DominatorTree::Insert, PredBB, *I}); in MergeBlockIntoPredecessor() 170 PredBB->getInstList().pop_back(); in MergeBlockIntoPredecessor() 174 BB->replaceAllUsesWith(PredBB); in MergeBlockIntoPredecessor() 177 PredBB->getInstList().splice(PredBB->end(), BB->getInstList()); in MergeBlockIntoPredecessor() [all …]
|
/external/llvm/lib/Transforms/Utils/ |
D | BasicBlockUtils.cpp | 102 BasicBlock *PredBB = BB->getUniquePredecessor(); in MergeBlockIntoPredecessor() local 103 if (!PredBB) return false; in MergeBlockIntoPredecessor() 106 if (PredBB == BB) return false; in MergeBlockIntoPredecessor() 108 if (PredBB->getTerminator()->isExceptional()) in MergeBlockIntoPredecessor() 111 succ_iterator SI(succ_begin(PredBB)), SE(succ_end(PredBB)); in MergeBlockIntoPredecessor() 137 PredBB->getInstList().pop_back(); in MergeBlockIntoPredecessor() 141 BB->replaceAllUsesWith(PredBB); in MergeBlockIntoPredecessor() 144 PredBB->getInstList().splice(PredBB->end(), BB->getInstList()); in MergeBlockIntoPredecessor() 147 if (!PredBB->hasName()) in MergeBlockIntoPredecessor() 148 PredBB->takeName(BB); in MergeBlockIntoPredecessor() [all …]
|