/freebsd-11-stable/contrib/llvm-project/llvm/lib/Transforms/InstCombine/ |
H A D | InstCombinePHI.cpp | 33 void InstCombiner::PHIArgMergedDebugLoc(Instruction *Inst, PHINode &PN) { argument 34 auto *FirstInst = cast<Instruction>(PN.getIncomingValue(0)); 40 for (unsigned i = 1; i != PN.getNumIncomingValues(); ++i) { 41 auto *I = cast<Instruction>(PN.getIncomingValue(i)); 46 // Replace Integer typed PHI PN if the PHI's value is used as a pointer value. 47 // If there is an existing pointer typed PHI that produces the same value as PN, 48 // replace PN and the IntToPtr operation with it. Otherwise, synthesize a new 96 Instruction *InstCombiner::FoldIntegerTypedPHI(PHINode &PN) { argument 97 if (!PN.getType()->isIntegerTy()) 99 if (!PN 295 FoldPHIArgBinOpIntoPHI(PHINode &PN) argument 388 FoldPHIArgGEPIntoPHI(PHINode &PN) argument 543 FoldPHIArgLoadIntoPHI(PHINode &PN) argument 736 FoldPHIArgOpIntoPHI(PHINode &PN) argument 844 DeadPHICycle(PHINode *PN, SmallPtrSetImpl<PHINode*> &PotentiallyDeadPHIs) argument 866 PHIsEqualValue(PHINode *PN, Value *NonPhiInVal, SmallPtrSetImpl<PHINode*> &ValueEqualPHIs) argument 891 GetAnyNonZeroConstInt(PHINode &PN) argument 920 PHINode *PN; // The PHI that was lowered. member in struct:__anon2616::LoweredPHIRecord 979 PHINode *PN = PHIsToSlice[PHIId]; local 1051 PHINode *PN = PHIsToSlice[PHIId]; local 1139 visitPHINode(PHINode &PN) argument [all...] |
/freebsd-11-stable/contrib/llvm-project/llvm/lib/Transforms/ObjCARC/ |
H A D | ObjCARC.h | 84 /// Return the list of PHI nodes that are equivalent to PN. 86 void getEquivalentPHIs(PHINodeTy &PN, VectorTy &PHIList) { argument 87 auto *BB = PN.getParent(); 89 if (&P == &PN) // Do not add PN to the list. 91 unsigned I = 0, E = PN.getNumIncomingValues(); 93 auto *BB = PN.getIncomingBlock(I); 94 auto *PNOpnd = PN.getIncomingValue(I)->stripPointerCasts();
|
H A D | ProvenanceAnalysis.cpp | 150 if (const PHINode *PN = dyn_cast<PHINode>(A)) 151 return relatedPHI(PN, B); 152 if (const PHINode *PN = dyn_cast<PHINode>(B)) 153 return relatedPHI(PN, A);
|
/freebsd-11-stable/contrib/llvm-project/llvm/lib/Transforms/Utils/ |
H A D | UnifyFunctionExitNodes.cpp | 95 PHINode *PN = nullptr; local 100 PN = PHINode::Create(F.getReturnType(), ReturningBlocks.size(), 102 NewRetBlock->getInstList().push_back(PN); 103 ReturnInst::Create(F.getContext(), PN, NewRetBlock); 112 if (PN) 113 PN->addIncoming(BB->getTerminator()->getOperand(0), BB);
|
H A D | LCSSA.cpp | 110 if (auto *PN = dyn_cast<PHINode>(User)) 111 UserBB = PN->getIncomingBlock(U); 155 PHINode *PN = PHINode::Create(I->getType(), PredCache.size(ExitBB), local 158 PN->setDebugLoc(I->getDebugLoc()); 161 PN->addIncoming(I, Pred); 168 &PN->getOperandUse(PN->getOperandNumForIncomingValue( 169 PN->getNumIncomingValues() - 1))); 172 AddedPHIs.push_back(PN); 175 SSAUpdate.AddAvailableValue(ExitBB, PN); [all...] |
H A D | BasicBlockUtils.cpp | 143 while (PHINode *PN = dyn_cast<PHINode>(BB->begin())) { 144 if (PN->getIncomingValue(0) != PN) 145 PN->replaceAllUsesWith(PN->getIncomingValue(0)); 147 PN->replaceAllUsesWith(UndefValue::get(PN->getType())); 150 MemDep->removeInstruction(PN); // Memdep updates AA itself. 152 PN->eraseFromParent(); 160 for (PHINode &PN 649 PHINode *PN = cast<PHINode>(I++); local 868 PHINode *PN = PHINode::Create(LPad->getType(), 2, "lpad.phi", LPad); local [all...] |
H A D | DemoteRegToStack.cpp | 59 if (PHINode *PN = dyn_cast<PHINode>(U)) { 70 for (unsigned i = 0, e = PN->getNumIncomingValues(); i != e; ++i) 71 if (PN->getIncomingValue(i) == &I) { 72 Value *&V = Loads[PN->getIncomingBlock(i)]; 77 PN->getIncomingBlock(i)->getTerminator()); 79 PN->setIncomingValue(i, V);
|
H A D | LoopSimplify.cpp | 187 PHINode *PN = cast<PHINode>(I); local 189 if (Value *V = SimplifyInstruction(PN, {DL, nullptr, DT, AC})) { 191 PN->replaceAllUsesWith(V); 192 PN->eraseFromParent(); 197 for (unsigned i = 0, e = PN->getNumIncomingValues(); i != e; ++i) 198 if (PN->getIncomingValue(i) == PN && 199 L->contains(PN->getIncomingBlock(i))) 201 return PN; 237 PHINode *PN local 393 PHINode *PN = cast<PHINode>(I); local 593 PHINode *PN; local [all...] |
H A D | LoopVersioning.cpp | 129 PHINode *PN; local 136 for (auto I = PHIBlock->begin(); (PN = dyn_cast<PHINode>(I)); ++I) { 137 if (PN->getIncomingValue(0) == Inst) 141 if (!PN) { 142 PN = PHINode::Create(Inst->getType(), 2, Inst->getName() + ".lver", 149 U->replaceUsesOfWith(Inst, PN); 150 PN->addIncoming(Inst, VersionedLoop->getExitingBlock()); 155 for (auto I = PHIBlock->begin(); (PN = dyn_cast<PHINode>(I)); ++I) { 156 assert(PN->getNumOperands() == 1 && 160 Value *ClonedValue = PN [all...] |
H A D | BreakCriticalEdges.cpp | 115 for (PHINode &PN : DestBB->phis()) { 116 unsigned Idx = PN.getBasicBlockIndex(SplitBB); 117 Value *V = PN.getIncomingValue(Idx); 127 PN.getType(), Preds.size(), "split", 133 PN.setIncomingValue(Idx, NewPN); 184 PHINode *PN = cast<PHINode>(I); local 191 if (PN->getIncomingBlock(BBIdx) != TIBB) 192 BBIdx = PN->getBasicBlockIndex(TIBB); 193 PN->setIncomingBlock(BBIdx, NewBB); 328 PHINode *PN local [all...] |
H A D | SSAUpdaterBulk.cpp | 160 PHINode *PN = B.CreatePHI(R.Ty, 0, R.Name); 161 R.Defines[FrontierBB] = PN; 162 InsertedPHIsForVar.push_back(PN); 164 InsertedPHIs->push_back(PN); 168 for (auto *PN : InsertedPHIsForVar) { 169 BasicBlock *PBB = PN->getParent(); 171 PN->addIncoming(computeValueAt(Pred, R, DT), Pred);
|
H A D | CloneFunction.cpp | 503 for (const PHINode &PN : BI.phis()) { 506 if (isa<PHINode>(VMap[&PN])) 507 PHIToResolve.push_back(&PN); 532 PHINode *PN = cast<PHINode>(VMap[OPN]); local 534 Value *V = VMap.lookup(PN->getIncomingBlock(pred)); 536 Value *InVal = MapValue(PN->getIncomingValue(pred), 540 PN->setIncomingValue(pred, InVal); 541 PN->setIncomingBlock(pred, MappedBlock); 543 PN->removeIncomingValue(pred, false); 555 PHINode *PN local [all...] |
H A D | LoopUnrollRuntime.cpp | 94 for (PHINode &PN : Succ->phis()) { 102 PHINode *NewPN = PHINode::Create(PN.getType(), 2, PN.getName() + ".unr", 106 if (L->contains(&PN)) { 108 NewPN->addIncoming(PN.getIncomingValueForBlock(NewPreHeader), 112 NewPN->addIncoming(UndefValue::get(PN.getType()), PreHeader); 115 Value *V = PN.getIncomingValueForBlock(Latch); 128 if (L->contains(&PN)) 129 PN.setIncomingValueForBlock(NewPreHeader, NewPN); 131 PN [all...] |
/freebsd-11-stable/contrib/llvm-project/llvm/lib/Transforms/Scalar/ |
H A D | SpeculateAroundPHIs.cpp | 49 isSafeToSpeculatePHIUsers(PHINode &PN, DominatorTree &DT, argument 52 auto *PhiBB = PN.getParent(); 57 for (Use &U : PN.uses()) { 203 PHINode &PN, SmallDenseMap<PHINode *, int, 16> &CostSavingsMap, 218 for (int i : llvm::seq<int>(0, PN.getNumIncomingValues())) { 219 auto *IncomingC = dyn_cast<ConstantInt>(PN.getIncomingValue(i)); 224 if (!IncomingConstantBlocks.insert(PN.getIncomingBlock(i)).second) 239 LLVM_DEBUG(dbgs() << " Free: " << PN << "\n"); 246 if (!isSafeToSpeculatePHIUsers(PN, DT, PotentialSpecSet, UnsafeSet)) { 247 LLVM_DEBUG(dbgs() << " Unsafe PHI: " << PN << "\ 202 isSafeAndProfitableToSpeculateAroundPHI( PHINode &PN, SmallDenseMap<PHINode *, int, 16> &CostSavingsMap, SmallPtrSetImpl<Instruction *> &PotentialSpecSet, SmallPtrSetImpl<Instruction *> &UnsafeSet, DominatorTree &DT, TargetTransformInfo &TTI) argument [all...] |
/freebsd-11-stable/contrib/llvm-project/llvm/lib/Analysis/ |
H A D | PhiValues.cpp | 126 const PhiValues::ValueSet &PhiValues::getValuesForPhi(const PHINode *PN) { argument 127 unsigned int DepthNumber = DepthMap.lookup(PN); 130 processPhi(PN, Stack); 131 DepthNumber = DepthMap.lookup(PN); 147 if (const PHINode *PN = dyn_cast<PHINode>(V)) 148 DepthMap.erase(PN); 168 for (const PHINode &PN : BB.phis()) { 170 PN.printAsOperand(OS, false); 172 unsigned int N = DepthMap.lookup(&PN); 201 for (const PHINode &PN [all...] |
/freebsd-11-stable/contrib/llvm-project/llvm/lib/IR/ |
H A D | BasicBlock.cpp | 342 while (PHINode *PN = dyn_cast<PHINode>(&front())) { 344 PN->removeIncomingValue(Pred, !KeepOneInputPHIs); 348 if (PN->getIncomingValue(0) != PN) 349 PN->replaceAllUsesWith(PN->getIncomingValue(0)); 352 PN->replaceAllUsesWith(UndefValue::get(PN->getType())); 362 PHINode *PN; local 363 for (iterator II = begin(); (PN 445 PHINode *PN = dyn_cast<PHINode>(II); local [all...] |
H A D | Dominators.cpp | 234 PHINode *PN = dyn_cast<PHINode>(UserInst); local 235 if (PN && PN->getParent() == BBE.getEnd() && 236 PN->getIncomingBlock(U) == BBE.getStart()) 242 if (PN) 243 UseBB = PN->getIncomingBlock(U); 257 if (PHINode *PN = dyn_cast<PHINode>(UserInst)) 258 UseBB = PN->getIncomingBlock(U); 308 if (PHINode *PN = dyn_cast<PHINode>(I)) 309 return isReachableFromEntry(PN [all...] |
H A D | SafepointIRVerifier.cpp | 84 bool hasLiveIncomingEdge(const PHINode *PN, const BasicBlock *InBB) const { argument 86 const BasicBlock* BB = PN->getParent(); 351 if (const auto *PN = dyn_cast<PHINode>(V)) { 352 for (Value *InV: PN->incoming_values()) 460 bool hasLiveIncomingEdge(const PHINode *PN, const BasicBlock *InBB) const { argument 461 return CD.hasLiveIncomingEdge(PN, InBB); 659 if (const PHINode *PN = dyn_cast<PHINode>(&I)) { 660 if (containsGCPtrType(PN->getType())) { 664 for (unsigned i = 0, e = PN->getNumIncomingValues(); i != e; ++i) { 665 const BasicBlock *InBB = PN [all...] |
/freebsd-11-stable/contrib/llvm-project/llvm/include/llvm/IR/ |
H A D | BasicBlock.h | 297 PHINodeT *PN; member in class:llvm::final::phi_iterator_impl 299 phi_iterator_impl(PHINodeT *PN) : PN(PN) {} argument 309 : PN(Arg.PN) {} 311 bool operator==(const phi_iterator_impl &Arg) const { return PN == Arg.PN; } 313 PHINodeT &operator*() const { return *PN; } 317 assert(PN [all...] |
/freebsd-11-stable/contrib/llvm-project/llvm/lib/Target/Hexagon/ |
H A D | HexagonVectorLoopCarriedReuse.cpp | 460 PHINode *PN = cast<PHINode>(D->front()); local 463 BasicBlock *BB = PN->getParent(); 464 LLVM_DEBUG(dbgs() << "Checking if any uses of " << *PN 468 for (auto UI = PN->use_begin(), E = PN->use_end(); UI != E; ++UI) { 490 // For each interesting use I of PN, find an Instruction BEUser that 596 PHINode *PN = dyn_cast<PHINode>(Op); local 597 assert(PN); 598 Value *ValueInBlock = PN->getIncomingValueForBlock(BB); 685 PHINode *PN local 732 auto *PN = cast<PHINode>(I); local [all...] |
/freebsd-11-stable/contrib/llvm-project/llvm/include/llvm/Analysis/ |
H A D | SparsePropagation.h | 76 virtual bool IsSpecialCasedPHI(PHINode *PN) { return false; } argument 397 void SparseSolver<LatticeKey, LatticeVal, KeyInfo>::visitPHINode(PHINode &PN) { argument 401 if (LatticeFunc->IsSpecialCasedPHI(&PN)) { 403 LatticeFunc->ComputeInstructionState(PN, ChangedValues, *this); 411 LatticeKey Key = KeyInfo::getLatticeKeyFromValue(&PN); 421 if (PN.getNumIncomingValues() > 64) { 429 for (unsigned i = 0, e = PN.getNumIncomingValues(); i != e; ++i) { 431 if (!isEdgeFeasible(PN.getIncomingBlock(i), PN.getParent(), true)) 436 getValueState(KeyInfo::getLatticeKeyFromValue(PN [all...] |
H A D | PhiValues.h | 51 /// This returns the cached value if PN has previously been processed, 53 const ValueSet &getValuesForPhi(const PHINode *PN); 111 void processPhi(const PHINode *PN, SmallVectorImpl<const PHINode *> &Stack);
|
/freebsd-11-stable/contrib/llvm-project/llvm/lib/Target/XCore/ |
H A D | XCoreLowerThreadLocal.cpp | 136 if (PHINode *PN = dyn_cast<PHINode>(WU)) { 137 for (int I = 0, E = PN->getNumIncomingValues(); I < E; ++I) 138 if (PN->getIncomingValue(I) == CE) { 139 BasicBlock *PredBB = PN->getIncomingBlock(I); 141 PredBB = SplitEdge(PredBB, PN->getParent()); 144 PN->setOperand(I, NewInst);
|
/freebsd-11-stable/contrib/llvm-project/llvm/lib/CodeGen/ |
H A D | WinEHPrepare.cpp | 80 AllocaInst *insertPHILoads(PHINode *PN, Function &F); 704 auto *PN = dyn_cast<PHINode>(I); local 706 if (!PN) 709 AllocaInst *SpillSlot = insertPHILoads(PN, F); 711 insertPHIStores(PN, SpillSlot); 713 PHINodes.push_back(PN); 717 for (auto *PN : PHINodes) { 719 PN->replaceAllUsesWith(UndefValue::get(PN->getType())); 720 PN 1073 insertPHILoads(PHINode *PN, Function &F) argument 1125 PHINode *PN = dyn_cast<PHINode>(InVal); local [all...] |
/freebsd-11-stable/contrib/llvm-project/llvm/lib/CodeGen/SelectionDAG/ |
H A D | FunctionLoweringInfo.cpp | 276 for (const PHINode &PN : BB.phis()) { 277 if (PN.use_empty()) 281 if (PN.getType()->isEmptyTy()) 284 DebugLoc DL = PN.getDebugLoc(); 285 unsigned PHIReg = ValueMap[&PN]; 289 ComputeValueVTs(*TLI, MF->getDataLayout(), PN.getType(), ValueVTs); 418 void FunctionLoweringInfo::ComputePHILiveOutRegInfo(const PHINode *PN) { argument 419 Type *Ty = PN->getType(); 429 if (TLI->getNumRegisters(PN->getContext(), IntVT) != 1) 431 IntVT = TLI->getTypeToTransformTo(PN [all...] |