/external/llvm/lib/Transforms/Utils/ |
D | LoopUtils.cpp | 77 RecurrenceDescriptor::lookThroughAnd(PHINode *Phi, Type *&RT, in lookThroughAnd() argument 80 if (!Phi->hasOneUse()) in lookThroughAnd() 81 return Phi; in lookThroughAnd() 84 Instruction *I, *J = cast<Instruction>(Phi->use_begin()->getUser()); in lookThroughAnd() 92 RT = IntegerType::get(Phi->getContext(), Bits); in lookThroughAnd() 93 Visited.insert(Phi); in lookThroughAnd() 98 return Phi; in lookThroughAnd() 162 bool RecurrenceDescriptor::AddReductionVar(PHINode *Phi, RecurrenceKind Kind, in AddReductionVar() argument 165 if (Phi->getNumIncomingValues() != 2) in AddReductionVar() 169 if (Phi->getParent() != TheLoop->getHeader()) in AddReductionVar() [all …]
|
D | MemorySSA.cpp | 213 auto *Phi = cast<MemoryPhi>(&Accesses->front()); in renameBlock() local 214 Phi->addIncoming(IncomingVal, BB); in renameBlock() 275 auto *Phi = cast<MemoryPhi>(&Accesses->front()); in markUnreachableAsLiveOnEntry() local 276 Phi->addIncoming(LiveOnEntryDef.get(), BB); in markUnreachableAsLiveOnEntry() 409 MemoryPhi *Phi = new MemoryPhi(BB->getContext(), BB, NextID++); in buildMemorySSA() local 410 ValueToMemoryAccess.insert(std::make_pair(BB, Phi)); in buildMemorySSA() 412 Accesses->push_front(Phi); in buildMemorySSA() 458 MemoryPhi *Phi = new MemoryPhi(BB->getContext(), BB, NextID++); in createMemoryPhi() local 459 ValueToMemoryAccess.insert(std::make_pair(BB, Phi)); in createMemoryPhi() 461 Accesses->push_front(Phi); in createMemoryPhi() [all …]
|
/external/swiftshader/third_party/subzero/src/ |
D | IcePhiLoweringImpl.h | 35 auto *Phi = llvm::dyn_cast<InstPhi>(&I); in prelowerPhis32Bit() local 36 if (Phi->isDeleted()) in prelowerPhis32Bit() 38 Variable *Dest = Phi->getDest(); in prelowerPhis32Bit() 43 auto *PhiLo = InstPhi::create(Func, Phi->getSrcSize(), DestLo); in prelowerPhis32Bit() 44 auto *PhiHi = InstPhi::create(Func, Phi->getSrcSize(), DestHi); in prelowerPhis32Bit() 45 for (SizeT I = 0; I < Phi->getSrcSize(); ++I) { in prelowerPhis32Bit() 46 Operand *Src = Phi->getSrc(I); in prelowerPhis32Bit() 47 CfgNode *Label = Phi->getLabel(I); in prelowerPhis32Bit() 54 Phi->setDeleted(); in prelowerPhis32Bit() 60 auto *PhiElem = InstPhi::create(Func, Phi->getSrcSize(), DestElem); in prelowerPhis32Bit() [all …]
|
D | IceCfgNode.cpp | 43 if (auto *Phi = llvm::dyn_cast<InstPhi>(Instr)) { in appendInst() local 48 Phis.push_back(Phi); in appendInst() 61 auto &Phi = llvm::cast<InstPhi>(Inst); in replaceInEdge() local 62 for (SizeT i = 0; i < Phi.getSrcSize(); ++i) { in replaceInEdge() 63 if (Phi.getLabel(i) == Old) { in replaceInEdge() 64 Phi.setLabel(i, New); in replaceInEdge() 117 auto *Phi = llvm::cast<InstPhi>(&Instr); in enforcePhiConsistency() local 124 for (SizeT i = 0; i < Phi->getSrcSize(); ++i) { in enforcePhiConsistency() 125 CfgNode *Label = Phi->getLabel(i); in enforcePhiConsistency() 136 Phi->clearOperandForTarget(Label); in enforcePhiConsistency() [all …]
|
/external/swiftshader/third_party/llvm-7.0/llvm/lib/Analysis/ |
D | MemorySSAUpdater.cpp | 78 MemoryPhi *Phi = dyn_cast_or_null<MemoryPhi>(MSSA->getMemoryAccess(BB)); in getPreviousDefRecursive() local 81 auto *Result = tryRemoveTrivialPhi(Phi, PhiOps); in getPreviousDefRecursive() 83 if (Result == Phi) { in getPreviousDefRecursive() 84 if (!Phi) in getPreviousDefRecursive() 85 Phi = MSSA->createMemoryPhi(BB); in getPreviousDefRecursive() 90 if (Phi->getNumOperands() != 0) { in getPreviousDefRecursive() 92 if (!std::equal(Phi->op_begin(), Phi->op_end(), PhiOps.begin())) { in getPreviousDefRecursive() 94 std::copy(PhiOps.begin(), PhiOps.end(), Phi->op_begin()); in getPreviousDefRecursive() 95 std::copy(pred_begin(BB), pred_end(BB), Phi->block_begin()); in getPreviousDefRecursive() 100 Phi->addIncoming(&*PhiOps[i++], Pred); in getPreviousDefRecursive() [all …]
|
D | PhiValues.cpp | 40 void PhiValues::processPhi(const PHINode *Phi, in processPhi() argument 43 assert(DepthMap.lookup(Phi) == 0); in processPhi() 46 DepthMap[Phi] = DepthNumber; in processPhi() 49 for (Value *PhiOp : Phi->incoming_values()) { in processPhi() 58 DepthMap[Phi] = std::min(DepthMap[Phi], DepthMap[PhiPhiOp]); in processPhi() 63 Stack.push_back(Phi); in processPhi() 67 if (DepthMap[Phi] == DepthNumber) { in processPhi()
|
/external/llvm/lib/Target/AMDGPU/ |
D | SIAnnotateControlFlow.cpp | 80 bool isElse(PHINode *Phi); 82 void eraseIfUnused(PHINode *Phi); 191 bool SIAnnotateControlFlow::isElse(PHINode *Phi) { in isElse() argument 192 BasicBlock *IDom = DT->getNode(Phi->getParent())->getIDom()->getBlock(); in isElse() 193 for (unsigned i = 0, e = Phi->getNumIncomingValues(); i != e; ++i) { in isElse() 194 if (Phi->getIncomingBlock(i) == IDom) { in isElse() 196 if (Phi->getIncomingValue(i) != BoolTrue) in isElse() 200 if (Phi->getIncomingValue(i) != BoolFalse) in isElse() 209 void SIAnnotateControlFlow::eraseIfUnused(PHINode *Phi) { in eraseIfUnused() argument 210 if (!Phi->hasNUsesOrMore(1)) in eraseIfUnused() [all …]
|
/external/swiftshader/third_party/llvm-7.0/llvm/lib/Target/AMDGPU/ |
D | SIAnnotateControlFlow.cpp | 88 bool isElse(PHINode *Phi); 90 void eraseIfUnused(PHINode *Phi); 184 bool SIAnnotateControlFlow::isElse(PHINode *Phi) { in isElse() argument 185 BasicBlock *IDom = DT->getNode(Phi->getParent())->getIDom()->getBlock(); in isElse() 186 for (unsigned i = 0, e = Phi->getNumIncomingValues(); i != e; ++i) { in isElse() 187 if (Phi->getIncomingBlock(i) == IDom) { in isElse() 189 if (Phi->getIncomingValue(i) != BoolTrue) in isElse() 193 if (Phi->getIncomingValue(i) != BoolFalse) in isElse() 202 void SIAnnotateControlFlow::eraseIfUnused(PHINode *Phi) { in eraseIfUnused() argument 203 if (RecursivelyDeleteDeadPHINode(Phi)) { in eraseIfUnused() [all …]
|
/external/swiftshader/third_party/llvm-7.0/llvm/lib/Transforms/Utils/ |
D | LoopUtils.cpp | 88 static Instruction *lookThroughAnd(PHINode *Phi, Type *&RT, in lookThroughAnd() argument 91 if (!Phi->hasOneUse()) in lookThroughAnd() 92 return Phi; in lookThroughAnd() 95 Instruction *I, *J = cast<Instruction>(Phi->use_begin()->getUser()); in lookThroughAnd() 102 RT = IntegerType::get(Phi->getContext(), Bits); in lookThroughAnd() 103 Visited.insert(Phi); in lookThroughAnd() 108 return Phi; in lookThroughAnd() 191 bool RecurrenceDescriptor::AddReductionVar(PHINode *Phi, RecurrenceKind Kind, in AddReductionVar() argument 197 if (Phi->getNumIncomingValues() != 2) in AddReductionVar() 201 if (Phi->getParent() != TheLoop->getHeader()) in AddReductionVar() [all …]
|
D | CallPromotionUtils.cpp | 50 for (PHINode &Phi : Invoke->getNormalDest()->phis()) { in fixupPHINodeForNormalDest() 51 int Idx = Phi.getBasicBlockIndex(OrigBlock); in fixupPHINodeForNormalDest() 54 Phi.setIncomingBlock(Idx, MergeBlock); in fixupPHINodeForNormalDest() 82 for (PHINode &Phi : Invoke->getUnwindDest()->phis()) { in fixupPHINodeForUnwindDest() 83 int Idx = Phi.getBasicBlockIndex(OrigBlock); in fixupPHINodeForUnwindDest() 86 auto *V = Phi.getIncomingValue(Idx); in fixupPHINodeForUnwindDest() 87 Phi.setIncomingBlock(Idx, ThenBlock); in fixupPHINodeForUnwindDest() 88 Phi.addIncoming(V, ElseBlock); in fixupPHINodeForUnwindDest() 112 PHINode *Phi = Builder.CreatePHI(OrigInst->getType(), 0); in createRetPHINode() local 117 U->replaceUsesOfWith(OrigInst, Phi); in createRetPHINode() [all …]
|
D | LoopUnrollAndJam.cpp | 96 for (auto &Phi : Header->phis()) { in processHeaderPhiOperands() local 97 Value *V = Phi.getIncomingValueForBlock(Latch); in processHeaderPhiOperands() 383 for (PHINode &Phi : ForeBlocksFirst[It]->phis()) { in UnrollAndJamLoop() 384 Value *OldValue = Phi.getIncomingValueForBlock(AftBlocksLast[It]); in UnrollAndJamLoop() 390 assert(Phi.getNumOperands() == 2); in UnrollAndJamLoop() 391 Phi.setIncomingBlock(0, ForeBlocksLast[It - 1]); in UnrollAndJamLoop() 392 Phi.setIncomingValue(0, NewValue); in UnrollAndJamLoop() 393 Phi.removeIncomingValue(1); in UnrollAndJamLoop() 404 for (PHINode &Phi : BB->phis()) { in UnrollAndJamLoop() 405 int I = Phi.getBasicBlockIndex(OldBB); in UnrollAndJamLoop() [all …]
|
/external/swiftshader/third_party/llvm-7.0/llvm/lib/Transforms/Scalar/ |
D | MergeICmps.cpp | 327 BCECmpChain(const std::vector<BasicBlock *> &Blocks, PHINode &Phi); 350 BasicBlock *const NextBBInChain, PHINode &Phi, 359 BCECmpChain::BCECmpChain(const std::vector<BasicBlock *> &Blocks, PHINode &Phi) in BCECmpChain() argument 360 : Phi_(Phi) { in BCECmpChain() 367 BCECmpBlock Comparison = visitCmpBlock(Phi.getIncomingValueForBlock(Block), in BCECmpChain() 368 Block, Phi.getParent()); in BCECmpChain() 539 PHINode &Phi, in mergeComparisons() argument 574 const auto &DL = Phi.getModule()->getDataLayout(); in mergeComparisons() 584 Builder.CreateCondBr(MemCmpIsZero, NextBBInChain, Phi.getParent()); in mergeComparisons() 585 Phi.addIncoming(ConstantInt::getFalse(Context), BB); in mergeComparisons() [all …]
|
D | IndVarSimplify.cpp | 674 for (const RewritePhi &Phi : RewritePhiSet) { in rewriteLoopExitValues() local 675 PHINode *PN = Phi.PN; in rewriteLoopExitValues() 676 Value *ExitVal = Phi.Val; in rewriteLoopExitValues() 680 if (ReplaceExitValue == OnlyCheapRepl && !LoopCanBeDel && Phi.HighCost) { in rewriteLoopExitValues() 687 Instruction *Inst = cast<Instruction>(PN->getIncomingValue(Phi.Ith)); in rewriteLoopExitValues() 688 PN->setIncomingValue(Phi.Ith, ExitVal); in rewriteLoopExitValues() 810 for (const RewritePhi &Phi : RewritePhiSet) { in canLoopBeDeleted() local 811 unsigned i = Phi.Ith; in canLoopBeDeleted() 812 if (Phi.PN == P && (Phi.PN)->getIncomingValue(i) == Incoming) { in canLoopBeDeleted() 1888 PHINode *Phi = dyn_cast<PHINode>(IncI->getOperand(0)); in getLoopPhiForCounter() local [all …]
|
/external/clang/lib/Analysis/ |
D | ThreadSafetyTIL.cpp | 61 if (Phi* Ph = dyn_cast<Phi>(E)) { in addPredecessor() 73 if (Phi* Ph = dyn_cast<Phi>(E)) { in reservePredecessors() 90 if (const Phi *Ph = dyn_cast<Phi>(E)) { in getCanonicalVal() 91 if (Ph->status() == Phi::PH_SingleVal) { in getCanonicalVal() 118 if (auto *Ph = dyn_cast<Phi>(E)) { in simplifyToCanonicalVal() 119 if (Ph->status() == Phi::PH_Incomplete) in simplifyToCanonicalVal() 122 if (Ph->status() == Phi::PH_SingleVal) { in simplifyToCanonicalVal() 135 void til::simplifyIncompleteArg(til::Phi *Ph) { in simplifyIncompleteArg() 136 assert(Ph && Ph->status() == Phi::PH_Incomplete); in simplifyIncompleteArg() 139 Ph->setStatus(Phi::PH_MultiVal); in simplifyIncompleteArg() [all …]
|
/external/swiftshader/third_party/llvm-7.0/llvm/lib/Transforms/Vectorize/ |
D | LoopVectorizationLegality.cpp | 404 for (PHINode &Phi : BB->phis()) { in canIfConvertPHINodes() 405 for (Value *V : Phi.incoming_values()) in canIfConvertPHINodes() 523 PHINode *Phi, const InductionDescriptor &ID, in addInductionPhi() argument 525 Inductions[Phi] = ID; in addInductionPhi() 535 Type *PhiTy = Phi->getType(); in addInductionPhi() 536 const DataLayout &DL = Phi->getModule()->getDataLayout(); in addInductionPhi() 557 PrimaryInduction = Phi; in addInductionPhi() 566 AllowedExit.insert(Phi); in addInductionPhi() 567 AllowedExit.insert(Phi->getIncomingValueForBlock(TheLoop->getLoopLatch())); in addInductionPhi() 585 if (auto *Phi = dyn_cast<PHINode>(&I)) { in canVectorizeInstrs() local [all …]
|
D | VPlanHCFGTransforms.cpp | 49 else if (PHINode *Phi = dyn_cast<PHINode>(Inst)) { in VPInstructionsToVPRecipes() local 50 InductionDescriptor II = Inductions->lookup(Phi); in VPInstructionsToVPRecipes() 53 NewRecipe = new VPWidenIntOrFpInductionRecipe(Phi); in VPInstructionsToVPRecipes() 55 NewRecipe = new VPWidenPHIRecipe(Phi); in VPInstructionsToVPRecipes()
|
D | VPlanHCFGBuilder.cpp | 93 for (auto *Phi : PhisToFix) { in fixPhiNodes() local 94 assert(IRDef2VPValue.count(Phi) && "Missing VPInstruction for PHINode."); in fixPhiNodes() 95 VPValue *VPVal = IRDef2VPValue[Phi]; in fixPhiNodes() 101 for (Value *Op : Phi->operands()) in fixPhiNodes() 211 if (auto *Phi = dyn_cast<PHINode>(Inst)) { in createVPInstructionsForVPBB() local 217 PhisToFix.push_back(Phi); in createVPInstructionsForVPBB()
|
/external/swiftshader/third_party/llvm-7.0/llvm/lib/CodeGen/ |
D | ScalarizeMaskedMemIntrin.cpp | 176 PHINode *Phi = nullptr; in scalarizeMaskedLoad() local 188 Phi = Builder.CreatePHI(VecType, 2, "res.phi.else"); in scalarizeMaskedLoad() 189 Phi->addIncoming(VResult, CondBlock); in scalarizeMaskedLoad() 190 Phi->addIncoming(PrevPhi, PrevIfBlock); in scalarizeMaskedLoad() 191 PrevPhi = Phi; in scalarizeMaskedLoad() 192 VResult = Phi; in scalarizeMaskedLoad() 225 Phi = Builder.CreatePHI(VecType, 2, "res.phi.select"); in scalarizeMaskedLoad() 226 Phi->addIncoming(VResult, CondBlock); in scalarizeMaskedLoad() 227 Phi->addIncoming(PrevPhi, PrevIfBlock); in scalarizeMaskedLoad() 228 Value *NewI = Builder.CreateSelect(Mask, Phi, Src0); in scalarizeMaskedLoad() [all …]
|
/external/llvm/lib/Transforms/Scalar/ |
D | IndVarSimplify.cpp | 627 for (const RewritePhi &Phi : RewritePhiSet) { in rewriteLoopExitValues() local 628 PHINode *PN = Phi.PN; in rewriteLoopExitValues() 629 Value *ExitVal = Phi.Val; in rewriteLoopExitValues() 633 if (ReplaceExitValue == OnlyCheapRepl && !LoopCanBeDel && Phi.HighCost) { in rewriteLoopExitValues() 640 Instruction *Inst = cast<Instruction>(PN->getIncomingValue(Phi.Ith)); in rewriteLoopExitValues() 641 PN->setIncomingValue(Phi.Ith, ExitVal); in rewriteLoopExitValues() 766 for (const RewritePhi &Phi : RewritePhiSet) { in canLoopBeDeleted() local 767 unsigned i = Phi.Ith; in canLoopBeDeleted() 768 if (Phi.PN == P && (Phi.PN)->getIncomingValue(i) == Incoming) { in canLoopBeDeleted() 1602 PHINode *Phi = dyn_cast<PHINode>(IncI->getOperand(0)); in getLoopPhiForCounter() local [all …]
|
/external/swiftshader/third_party/llvm-7.0/llvm/unittests/Transforms/Vectorize/ |
D | VPlanHCFGTest.cpp | 56 VPInstruction *Phi = dyn_cast<VPInstruction>(&*Iter++); in TEST_F() local 57 EXPECT_EQ(Instruction::PHI, Phi->getOpcode()); in TEST_F() 62 EXPECT_EQ(Phi, Idx->getOperand(1)); in TEST_F() 83 EXPECT_EQ(Phi, IndvarAdd->getOperand(0)); in TEST_F() 137 auto *Phi = dyn_cast<VPWidenPHIRecipe>(&*Iter++); in TEST_F() local 138 EXPECT_NE(nullptr, Phi); in TEST_F()
|
/external/swiftshader/third_party/LLVM/lib/Transforms/Scalar/ |
D | IndVarSimplify.cpp | 1350 PHINode *Phi = dyn_cast<PHINode>(IncI->getOperand(0)); in getLoopPhiForCounter() local 1351 if (Phi && Phi->getParent() == L->getHeader()) { in getLoopPhiForCounter() 1353 return Phi; in getLoopPhiForCounter() 1360 Phi = dyn_cast<PHINode>(IncI->getOperand(1)); in getLoopPhiForCounter() 1361 if (Phi && Phi->getParent() == L->getHeader()) { in getLoopPhiForCounter() 1363 return Phi; in getLoopPhiForCounter() 1400 PHINode *Phi = dyn_cast<PHINode>(LHS); in needsLFTR() local 1401 if (!Phi) in needsLFTR() 1402 Phi = getLoopPhiForCounter(LHS, L, DT); in needsLFTR() 1404 if (!Phi) in needsLFTR() [all …]
|
/external/swiftshader/third_party/llvm-7.0/llvm/test/CodeGen/Hexagon/ |
D | swp-phi-ref.ll | 6 ; Test that we generate the correct Phi values when there is a Phi that 7 ; references another Phi. We need to examine the other Phi to get the 9 ; kernel code for the other Phi yet.
|
D | swp-epilog-reuse-1.ll | 4 ; Test that the pipeliner reuses an existing Phi when generating the epilog 5 ; block. In this case, the original loops has a Phi whose operand is another 6 ; Phi. When the loop is pipelined, the Phi that generates the operand value 7 ; is used in two stages. This means the Phi for the second stage can
|
/external/swiftshader/third_party/llvm-7.0/llvm/unittests/Analysis/ |
D | ScalarEvolutionTest.cpp | 373 PHINode *Phi = cast<PHINode>(&*II++); in TEST_F() local 374 Phi->addIncoming(Acc[i], LoopBB); in TEST_F() 375 Phi->addIncoming(UndefValue::get(Ty), EntryBB); in TEST_F() 768 PHINode *Phi = Builder.CreatePHI(T_int64, 2); in TEST_F() local 769 Value *Add = Builder.CreateAdd(Phi, ConstantInt::get(T_int64, 1), "add"); in TEST_F() 771 Phi->addIncoming(ConstantInt::get(T_int64, 0), LPh); in TEST_F() 772 Phi->addIncoming(Add, L); in TEST_F() 839 PHINode *Phi = Builder.CreatePHI(T_int64, 2); in TEST_F() local 841 Builder.CreateAdd(Phi, ConstantInt::get(T_int64, 1), "add")); in TEST_F() 846 Phi->addIncoming(ConstantInt::get(T_int64, 0), LPh); in TEST_F() [all …]
|
/external/deqp-deps/glslang/Test/baseResults/ |
D | spv.shortCircuit.frag.out | 72 38: 6(bool) Phi 28 5 37 30 101 57: 6(bool) Phi 52 49 56 54 117 66: 6(bool) Phi 62 59 65 63 159 92: 6(bool) Phi 85 82 91 87 196 120: 6(bool) Phi 108 104 119 110 216 133: 6(bool) Phi 125 122 132 126
|