/openbsd-current/gnu/llvm/llvm/lib/Transforms/InstCombine/ |
H A D | InstCombinePHI.cpp | 43 void InstCombinerImpl::PHIArgMergedDebugLoc(Instruction *Inst, PHINode &PN) { argument 44 auto *FirstInst = cast<Instruction>(PN.getIncomingValue(0)); 50 for (Value *V : drop_begin(PN.incoming_values())) { 56 // Replace Integer typed PHI PN if the PHI's value is used as a pointer value. 57 // If there is an existing pointer typed PHI that produces the same value as PN, 58 // replace PN and the IntToPtr operation with it. Otherwise, synthesize a new 106 bool InstCombinerImpl::foldIntegerTypedPHI(PHINode &PN) { argument 107 if (!PN.getType()->isIntegerTy()) 109 if (!PN.hasOneUse()) 112 auto *IntToPtr = dyn_cast<IntToPtrInst>(PN 307 foldPHIArgIntToPtrToPHI(PHINode &PN) argument 331 foldPHIArgInsertValueInstructionIntoPHI(PHINode &PN) argument 371 foldPHIArgExtractValueInstructionIntoPHI(PHINode &PN) argument 407 foldPHIArgBinOpIntoPHI(PHINode &PN) argument 502 foldPHIArgGEPIntoPHI(PHINode &PN) argument 665 foldPHIArgLoadIntoPHI(PHINode &PN) argument 862 foldPHIArgOpIntoPHI(PHINode &PN) argument 976 isDeadPHICycle(PHINode *PN, SmallPtrSetImpl<PHINode *> &PotentiallyDeadPHIs) argument 998 PHIsEqualValue(PHINode *PN, Value *NonPhiInVal, SmallPtrSetImpl<PHINode*> &ValueEqualPHIs) argument 1023 getAnyNonZeroConstInt(PHINode &PN) argument 1052 PHINode *PN; // The PHI that was lowered. member in struct:__anon3384::LoweredPHIRecord 1110 PHINode *PN = PHIsToSlice[PHIId]; local 1192 PHINode *PN = PHIsToSlice[PHIId]; local 1278 simplifyUsingControlFlow(InstCombiner &Self, PHINode &PN, const DominatorTree &DT) argument 1379 visitPHINode(PHINode &PN) argument [all...] |
/openbsd-current/gnu/llvm/llvm/lib/Transforms/Utils/ |
H A D | UnifyFunctionExitNodes.cpp | 86 PHINode *PN = nullptr; local 91 PN = PHINode::Create(F.getReturnType(), ReturningBlocks.size(), 93 PN->insertInto(NewRetBlock, NewRetBlock->end()); 94 ReturnInst::Create(F.getContext(), PN, NewRetBlock); 102 if (PN) 103 PN->addIncoming(BB->getTerminator()->getOperand(0), BB);
|
H A D | SSAUpdaterBulk.cpp | 154 PHINode *PN = B.CreatePHI(R.Ty, 0, R.Name); 155 R.Defines[FrontierBB] = PN; 156 InsertedPHIsForVar.push_back(PN); 158 InsertedPHIs->push_back(PN); 162 for (auto *PN : InsertedPHIsForVar) { 163 BasicBlock *PBB = PN->getParent(); 165 PN->addIncoming(computeValueAt(Pred, R, DT), Pred);
|
H A D | LCSSA.cpp | 123 if (auto *PN = dyn_cast<PHINode>(User)) 124 UserBB = PN->getIncomingBlock(U); 168 PHINode *PN = Builder.CreatePHI(I->getType(), PredCache.size(ExitBB), local 171 PN->setDebugLoc(I->getDebugLoc()); 179 PN->addIncoming(I, Pred); 186 &PN->getOperandUse(PN->getOperandNumForIncomingValue( 187 PN->getNumIncomingValues() - 1))); 190 AddedPHIs.push_back(PN); 193 SSAUpdate.AddAvailableValue(ExitBB, PN); [all...] |
H A D | DemoteRegToStack.cpp | 58 if (PHINode *PN = dyn_cast<PHINode>(U)) { 69 for (unsigned i = 0, e = PN->getNumIncomingValues(); i != e; ++i) 70 if (PN->getIncomingValue(i) == &I) { 71 Value *&V = Loads[PN->getIncomingBlock(i)]; 76 PN->getIncomingBlock(i)->getTerminator()); 78 PN->setIncomingValue(i, V);
|
H A D | LoopSimplify.cpp | 177 PHINode *PN = cast<PHINode>(I); local 179 if (Value *V = simplifyInstruction(PN, {DL, nullptr, DT, AC})) { 181 PN->replaceAllUsesWith(V); 182 PN->eraseFromParent(); 187 for (unsigned i = 0, e = PN->getNumIncomingValues(); i != e; ++i) 188 if (PN->getIncomingValue(i) == PN && 189 L->contains(PN->getIncomingBlock(i))) 191 return PN; 248 PHINode *PN local 400 PHINode *PN = cast<PHINode>(I); local 597 PHINode *PN; local [all...] |
H A D | LoopVersioning.cpp | 132 PHINode *PN; local 139 for (auto I = PHIBlock->begin(); (PN = dyn_cast<PHINode>(I)); ++I) { 140 if (PN->getIncomingValue(0) == Inst) { 141 SE->forgetValue(PN); 146 if (!PN) { 147 PN = PHINode::Create(Inst->getType(), 2, Inst->getName() + ".lver", 154 U->replaceUsesOfWith(Inst, PN); 155 PN->addIncoming(Inst, VersionedLoop->getExitingBlock()); 160 for (auto I = PHIBlock->begin(); (PN = dyn_cast<PHINode>(I)); ++I) { 161 assert(PN [all...] |
H A D | LoopUnrollRuntime.cpp | 100 for (PHINode &PN : Succ->phis()) { 108 PHINode *NewPN = PHINode::Create(PN.getType(), 2, PN.getName() + ".unr", 112 if (L->contains(&PN)) { 114 NewPN->addIncoming(PN.getIncomingValueForBlock(NewPreHeader), 118 NewPN->addIncoming(UndefValue::get(PN.getType()), PreHeader); 121 Value *V = PN.getIncomingValueForBlock(Latch); 134 if (L->contains(&PN)) 135 PN.setIncomingValueForBlock(NewPreHeader, NewPN); 137 PN [all...] |
H A D | BasicBlockUtils.cpp | 149 while (PHINode *PN = dyn_cast<PHINode>(BB->begin())) { 150 if (PN->getIncomingValue(0) != PN) 151 PN->replaceAllUsesWith(PN->getIncomingValue(0)); 153 PN->replaceAllUsesWith(PoisonValue::get(PN->getType())); 156 MemDep->removeInstruction(PN); // Memdep updates AA itself. 158 PN->eraseFromParent(); 168 for (PHINode &PN 1116 PHINode *PN = cast<PHINode>(I++); local 1378 PHINode *PN = PHINode::Create(LPad->getType(), 2, "lpad.phi", LPad); local [all...] |
/openbsd-current/gnu/llvm/llvm/lib/Transforms/Scalar/ |
H A D | LoopBoundSplit.cpp | 74 PHINode *PN = cast<PHINode>(Cond.AddRecValue); local 75 Cond.NonPHIAddRecValue = PN->getIncomingValueForBlock(L.getLoopLatch()); 365 for (PHINode &PN : L.getHeader()->phis()) { 368 Builder.CreatePHI(PN.getType(), 1, PN.getName() + ".lcssa"); 369 LCSSAPhi->setDebugLoc(PN.getDebugLoc()); 373 isExitingLatch ? PN.getIncomingValueForBlock(L.getLoopLatch()) : &PN, 377 PHINode *PostLoopPN = cast<PHINode>(VMap[&PN]); 383 if (!SE.isSCEVable(PN [all...] |
H A D | CallSiteSplitting.cpp | 338 for (PHINode &PN : TailBB->phis()) { 341 if (&*CI == &PN) { 342 NewCI->setArgOperand(ArgNo, PN.getIncomingValueForBlock(SplitBlock)); 421 for (auto &PN : Parent->phis()) { 423 if (&*Arg != &PN) 425 assert(PN.getNumIncomingValues() == 2 && 427 if (PN.getIncomingBlock(0) == PN.getIncomingBlock(1)) 429 if (PN.getIncomingValue(0) == PN [all...] |
/openbsd-current/gnu/llvm/llvm/lib/Target/BPF/ |
H A D | BPFCheckAndAdjustIR.cpp | 80 PHINode *PN = dyn_cast<PHINode>(&I); local 81 if (!PN || PN->use_empty()) 83 for (int i = 0, e = PN->getNumIncomingValues(); i < e; ++i) { 84 auto *GV = dyn_cast<GlobalVariable>(PN->getIncomingValue(i));
|
/openbsd-current/gnu/llvm/llvm/lib/Analysis/ |
H A D | PhiValues.cpp | 125 const PhiValues::ValueSet &PhiValues::getValuesForPhi(const PHINode *PN) { argument 126 unsigned int DepthNumber = DepthMap.lookup(PN); 129 processPhi(PN, Stack); 130 DepthNumber = DepthMap.lookup(PN); 146 if (const PHINode *PN = dyn_cast<PHINode>(V)) 147 DepthMap.erase(PN); 167 for (const PHINode &PN : BB.phis()) { 169 PN.printAsOperand(OS, false); 171 unsigned int N = DepthMap.lookup(&PN); 200 for (const PHINode &PN [all...] |
/openbsd-current/gnu/llvm/llvm/lib/Transforms/ObjCARC/ |
H A D | ObjCARC.h | 72 /// Return the list of PHI nodes that are equivalent to PN. 74 void getEquivalentPHIs(PHINodeTy &PN, VectorTy &PHIList) { argument 75 auto *BB = PN.getParent(); 77 if (&P == &PN) // Do not add PN to the list. 79 unsigned I = 0, E = PN.getNumIncomingValues(); 81 auto *BB = PN.getIncomingBlock(I); 82 auto *PNOpnd = PN.getIncomingValue(I)->stripPointerCasts();
|
H A D | ProvenanceAnalysis.cpp | 158 if (const PHINode *PN = dyn_cast<PHINode>(A)) 159 return relatedPHI(PN, B); 160 if (const PHINode *PN = dyn_cast<PHINode>(B)) 161 return relatedPHI(PN, A);
|
/openbsd-current/gnu/llvm/llvm/lib/IR/ |
H A D | Dominators.cpp | 124 if (auto *PN = dyn_cast<PHINode>(UserInst)) 127 return dominates(BB, PN->getIncomingBlock(U)); 260 PHINode *PN = dyn_cast<PHINode>(UserInst); local 261 if (PN && PN->getParent() == BBE.getEnd() && 262 PN->getIncomingBlock(U) == BBE.getStart()) 268 if (PN) 269 UseBB = PN->getIncomingBlock(U); 290 if (PHINode *PN = dyn_cast<PHINode>(UserInst)) 291 UseBB = PN [all...] |
H A D | SafepointIRVerifier.cpp | 83 bool hasLiveIncomingEdge(const PHINode *PN, const BasicBlock *InBB) const { argument 85 const BasicBlock* BB = PN->getParent(); 350 if (const auto *PN = dyn_cast<PHINode>(V)) { 351 append_range(Worklist, PN->incoming_values()); 469 bool hasLiveIncomingEdge(const PHINode *PN, const BasicBlock *InBB) const { argument 470 return CD.hasLiveIncomingEdge(PN, InBB); 667 if (const PHINode *PN = dyn_cast<PHINode>(&I)) { 668 if (containsGCPtrType(PN->getType())) { 672 for (unsigned i = 0, e = PN->getNumIncomingValues(); i != e; ++i) { 673 const BasicBlock *InBB = PN [all...] |
/openbsd-current/gnu/llvm/llvm/include/llvm/IR/ |
H A D | BasicBlock.h | 338 PHINodeT *PN; member in class:llvm::final::phi_iterator_impl 340 phi_iterator_impl(PHINodeT *PN) : PN(PN) {} argument 352 : PN(Arg.PN) {} 354 bool operator==(const phi_iterator_impl &Arg) const { return PN == Arg.PN; } 356 PHINodeT &operator*() const { return *PN; } 360 assert(PN [all...] |
/openbsd-current/gnu/llvm/llvm/include/llvm/Analysis/ |
H A D | SparsePropagation.h | 78 virtual bool IsSpecialCasedPHI(PHINode *PN) { return false; } argument 399 void SparseSolver<LatticeKey, LatticeVal, KeyInfo>::visitPHINode(PHINode &PN) { argument 403 if (LatticeFunc->IsSpecialCasedPHI(&PN)) { 405 LatticeFunc->ComputeInstructionState(PN, ChangedValues, *this); 413 LatticeKey Key = KeyInfo::getLatticeKeyFromValue(&PN); 423 if (PN.getNumIncomingValues() > 64) { 431 for (unsigned i = 0, e = PN.getNumIncomingValues(); i != e; ++i) { 433 if (!isEdgeFeasible(PN.getIncomingBlock(i), PN.getParent(), true)) 438 getValueState(KeyInfo::getLatticeKeyFromValue(PN [all...] |
H A D | PhiValues.h | 49 /// This returns the cached value if PN has previously been processed, 51 const ValueSet &getValuesForPhi(const PHINode *PN); 108 void processPhi(const PHINode *PN, SmallVectorImpl<const PHINode *> &Stack);
|
/openbsd-current/gnu/llvm/llvm/lib/Target/Hexagon/ |
H A D | HexagonVectorLoopCarriedReuse.cpp | 381 PHINode *PN = cast<PHINode>(D->front()); local 384 BasicBlock *BB = PN->getParent(); 385 LLVM_DEBUG(dbgs() << "Checking if any uses of " << *PN 389 for (Use &U : PN->uses()) { 410 // For each interesting use I of PN, find an Instruction BEUser that 514 PHINode *PN = dyn_cast<PHINode>(Op); local 515 assert(PN); 516 Value *ValueInBlock = PN->getIncomingValueForBlock(BB); 603 PHINode *PN = dyn_cast<PHINode>(I); local 604 if (!PN) { 650 auto *PN = cast<PHINode>(I); local [all...] |
/openbsd-current/gnu/llvm/llvm/examples/IRTransforms/ |
H A D | SimplifyCFG.cpp | 79 // for (PHINode &PN : make_early_inc_range(Succ->phis())) 80 // PN.removeIncomingValue(&BB); 282 for (PHINode &PN : make_early_inc_range(BB.phis())) { 283 PN.replaceAllUsesWith(PN.getIncomingValue(0)); 284 PN.eraseFromParent(); 333 for (PHINode &PN : make_early_inc_range(BB.phis())) { 334 PN.replaceAllUsesWith(PN.getIncomingValue(0)); 335 PN [all...] |
/openbsd-current/gnu/llvm/llvm/lib/Target/XCore/ |
H A D | XCoreLowerThreadLocal.cpp | 85 if (PHINode *PN = dyn_cast<PHINode>(WU)) { 86 for (int I = 0, E = PN->getNumIncomingValues(); I < E; ++I) 87 if (PN->getIncomingValue(I) == CE) { 88 BasicBlock *PredBB = PN->getIncomingBlock(I); 90 PredBB = SplitEdge(PredBB, PN->getParent()); 93 PN->setOperand(I, NewInst);
|
/openbsd-current/gnu/llvm/llvm/lib/CodeGen/ |
H A D | WinEHPrepare.cpp | 81 AllocaInst *insertPHILoads(PHINode *PN, Function &F); 721 auto *PN = dyn_cast<PHINode>(&I); local 723 if (!PN) 726 AllocaInst *SpillSlot = insertPHILoads(PN, F); 728 insertPHIStores(PN, SpillSlot); 730 PHINodes.push_back(PN); 734 for (auto *PN : PHINodes) { 736 PN->replaceAllUsesWith(PoisonValue::get(PN->getType())); 737 PN 1082 insertPHILoads(PHINode *PN, Function &F) argument 1132 PHINode *PN = dyn_cast<PHINode>(InVal); local [all...] |
/openbsd-current/gnu/llvm/llvm/lib/CodeGen/SelectionDAG/ |
H A D | FunctionLoweringInfo.cpp | 277 for (const PHINode &PN : BB.phis()) { 278 if (PN.use_empty()) 282 if (PN.getType()->isEmptyTy()) 285 DebugLoc DL = PN.getDebugLoc(); 286 unsigned PHIReg = ValueMap[&PN]; 290 ComputeValueVTs(*TLI, MF->getDataLayout(), PN.getType(), ValueVTs); 425 void FunctionLoweringInfo::ComputePHILiveOutRegInfo(const PHINode *PN) { argument 426 Type *Ty = PN->getType(); 436 if (TLI->getNumRegisters(PN->getContext(), IntVT) != 1) 438 IntVT = TLI->getTypeToTransformTo(PN [all...] |