/freebsd-11-stable/contrib/llvm-project/llvm/lib/CodeGen/ |
H A D | MachineSSAUpdater.cpp | 53 /// updates. ProtoValue is the value used to name PHI nodes. 112 /// InsertNewDef - Insert an empty PHI or IMPLICIT_DEF instruction which define 141 /// a block. Because of this, we need to insert a new PHI node in SomeBB to 182 // If an identical PHI is already in BB, just reuse it. 187 // Otherwise, we do need a PHI: insert one now. 189 MachineInstrBuilder InsertedPHI = InsertNewDef(TargetOpcode::PHI, BB, 192 // Fill in all the predecessors of the PHI. 196 // See if the PHI node can be merged to a single value. This can happen in 197 // loop cases when we get a PHI of itself and one other value. 206 LLVM_DEBUG(dbgs() << " Inserted PHI 254 MachineInstr *PHI; member in class:llvm::SSAUpdaterTraits::PHI_iterator 274 PHI_begin(PhiT *PHI) argument 276 PHI_end(PhiT *PHI) argument 306 MachineInstr *PHI = InsertNewDef(TargetOpcode::PHI, BB, Loc, local 314 AddPHIOperand(MachineInstr *PHI, unsigned Val, MachineBasicBlock *Pred) argument 335 MachineInstr *PHI = ValueIsPHI(Val, Updater); local 343 GetPHIValue(MachineInstr *PHI) argument [all...] |
H A D | EarlyIfConversion.cpp | 112 MachineInstr *PHI; member in struct:__anon1707::SSAIfConv::PHIInfo 118 : PHI(phi), TReg(0), FReg(0), CondCycles(0), TCycles(0), FCycles(0) {} 160 /// Replace PHI instructions in Tail with selects. 163 /// Insert selects and rewrite PHI operands to use them. 512 // Find PHI operands corresponding to TPred and FPred. 513 for (unsigned i = 1; i != PI.PHI->getNumOperands(); i += 2) { 514 if (PI.PHI->getOperand(i+1).getMBB() == TPred) 515 PI.TReg = PI.PHI->getOperand(i).getReg(); 516 if (PI.PHI->getOperand(i+1).getMBB() == FPred) 517 PI.FReg = PI.PHI [all...] |
H A D | SwiftErrorValueTracking.cpp | 244 MachineInstrBuilder PHI = local 246 TII->get(TargetOpcode::PHI), PHIVReg); 248 PHI.addReg(BBRegPair.second).addMBB(BBRegPair.first);
|
H A D | MachineTraceMetrics.cpp | 678 // Get the input data dependencies of a PHI instruction, using Pred as the 688 assert(UseMI.isPHI() && UseMI.getNumOperands() % 2 && "Bad PHI"); 1075 for (const auto &PHI : *Succ) { 1076 if (!PHI.isPHI()) 1079 getPHIDeps(PHI, Deps, MBB, MTM.MRI); 1081 // Loop header PHI heights are all 0. 1082 unsigned Height = TBI.Succ ? Cycles.lookup(&PHI).Height : 0; 1083 LLVM_DEBUG(dbgs() << "pred\t" << Height << '\t' << PHI); 1084 if (pushDepHeight(Deps.front(), PHI, Height, Heights, MTM.SchedModel, 1106 // Don't process PHI dep [all...] |
H A D | PeepholeOptimizer.cpp | 126 // Limit the number of PHI instructions to process 130 cl::desc("Limit the length of PHI chains to lookup")); 197 bool optimizeRecurrence(MachineInstr &PHI); 405 /// Specialized version of getNextSource for PHI instructions. 541 // replace these unless it's a PHI. 564 // Look for PHI uses of the extended result, we don't want to extend the 565 // liveness of a PHI input. It breaks all kinds of assumptions down 566 // stream. A PHI use is expected to be the kill of its source values. 655 /// given multiple incoming sources of a PHI instruction. In this case, we 656 /// look in each PHI sourc 1565 optimizeRecurrence(MachineInstr &PHI) argument [all...] |
H A D | ModuloSchedule.cpp | 553 TII->get(TargetOpcode::PHI), NewReg); 669 TII->get(TargetOpcode::PHI), NewReg); 789 for (auto &PHI : KernelBB->phis()) { 790 Register Def = PHI.getOperand(0).getReg(); 798 unsigned LCDef = getLoopPhiReg(PHI, KernelBB); 1111 for (auto &PHI : BB->phis()) { 1114 getPhiRegs(PHI, BB, InitVal, LoopVal); 1115 Register PhiDef = PHI.getOperand(0).getReg(); 1127 rewriteScheduledInstr(NewBB, InstrMap, StageNum - np, np, &PHI, PhiDef, 1438 BuildMI(*BB, MI, DebugLoc(), TII->get(TargetOpcode::PHI), [all...] |
H A D | SafeStack.cpp | 288 // A DFS search through all uses of the alloca in bitcasts/PHI/GEPs/etc. 603 if (auto *PHI = dyn_cast<PHINode>(User)) 604 InsertBefore = PHI->getIncomingBlock(U)->getTerminator(); 613 if (auto *PHI = dyn_cast<PHINode>(User)) 614 // PHI nodes may have multiple incoming edges from the same BB (why??), 616 PHI->setIncomingValueForBlock(PHI->getIncomingBlock(U), Replacement);
|
/freebsd-11-stable/contrib/llvm-project/llvm/lib/Transforms/Utils/ |
H A D | SSAUpdater.cpp | 78 static bool IsEquivalentPHI(PHINode *PHI, argument 80 unsigned PHINumValues = PHI->getNumIncomingValues(); 86 if (ValueMapping[PHI->getIncomingBlock(i)] != 87 PHI->getIncomingValue(i)) { 111 // is relatively slow. If we already have PHI nodes in this block, walk one 149 // Otherwise, we do need a PHI: check to see if we already have one available 164 // Fill in all the predecessors of the PHI. 168 // See if the PHI node can be merged to a single value. This can happen in 169 // loop cases when we get a PHI of itself and one other value. 176 // Set the DebugLoc of the inserted PHI, i 233 PHINode *PHI; member in class:llvm::SSAUpdaterTraits::PHI_iterator 250 PHI_begin(PhiT *PHI) argument 251 PHI_end(PhiT *PHI) argument 280 PHINode *PHI = PHINode::Create(Updater->ProtoType, NumPreds, local 287 AddPHIOperand(PHINode *PHI, Value *Val, BasicBlock *Pred) argument 305 PHINode *PHI = ValueIsPHI(Val, Updater); local 313 GetPHIValue(PHINode *PHI) argument [all...] |
H A D | FlattenCFG.cpp | 137 PHINode *PHI = dyn_cast<PHINode>(BB->begin()); local 138 if (PHI) 139 return false; // For simplicity, avoid cases containing PHI nodes. 274 // PS2 should not contain PHI node. 275 PHI = dyn_cast<PHINode>(PS2->begin()); 276 if (PHI) 456 // Handle PHI node to replace its predecessors to FirstEntryBlock.
|
H A D | SimplifyCFG.cpp | 101 "to speculatively execute to fold a 2-entry PHI node into a " 160 // switch for that PHI. 236 // successor, and if that successor has a PHI node, and if *that* PHI node has 260 /// store all PHI nodes in common successors. 269 // We fold the unconditional branch if we can easily update all PHI nodes in 298 /// Update PHI nodes in Succ to indicate that there will now be entries in it 299 /// from the 'NewPred' block. The values that will be flowing into the PHI nodes 859 // Remove PHI node entries for the dead edge. 915 // Remove PHI nod 2923 PHINode *PHI = nullptr; local 4826 InitializeUniqueCases(SwitchInst *SI, PHINode *&PHI, BasicBlock *&CommonDest, SwitchCaseResultVectorTy &UniqueResults, Constant *&DefaultResult, const DataLayout &DL, const TargetTransformInfo &TTI, uintptr_t MaxUniqueResults, uintptr_t MaxCasesPerResult) argument 4920 RemoveSwitchAfterSelectConversion(SwitchInst *SI, PHINode *PHI, Value *SelectValue, IRBuilder<> &Builder) argument 4948 PHINode *PHI = nullptr; local 5405 PHINode *PHI = I.first; local 5440 PHINode *PHI = I.first; local [all...] |
H A D | LoopUnrollPeel.cpp | 549 // The new copy of the loop body starts with a bunch of PHI nodes 577 for (PHINode &PHI : Edge.second->phis()) { 578 Value *LatchVal = PHI.getIncomingValueForBlock(Edge.first); 582 PHI.addIncoming(LatchVal, cast<BasicBlock>(VMap[Edge.first])); 755 PHINode *PHI = cast<PHINode>(I); 756 Value *NewVal = PHI->getIncomingValueForBlock(Latch); 761 PHI->setIncomingValueForBlock(NewPreHeader, NewVal);
|
H A D | InlineFunction.cpp | 106 /// PHI for EH values from landingpad insts. 114 // If there are PHI nodes in the unwind destination block, we need to keep 121 PHINode *PHI = cast<PHINode>(I); local 122 UnwindDestPHIValues.push_back(PHI->getIncomingValueForBlock(InvokeBB)); 146 /// Add incoming-PHI values to the unwind destination block for the given 188 // Create a PHI for the exception values. 521 /// it rewrites them to be invokes that jump to InvokeDest and fills in the PHI 619 // Update any PHI nodes in the exceptional block to indicate that there 628 // Now that everything is happy, we have one final detail. The PHI nodes in 631 // PHI nod 655 PHINode *PHI = dyn_cast<PHINode>(&I); local 2334 PHINode *PHI = nullptr; local [all...] |
H A D | PredicateInfo.cpp | 165 auto *PHI = cast<PHINode>(VD.U->getUser()); local 166 return std::make_pair(PHI->getIncomingBlock(*VD.U), PHI->getParent()); 268 auto *PHI = dyn_cast<PHINode>(VDUse.U->getUser()); 269 if (!PHI) 272 BasicBlock *EdgePred = PHI->getIncomingBlock(*VDUse.U);
|
/freebsd-11-stable/contrib/gcc/ |
H A D | tree-ssa-operands.h | 139 #define PHI_RESULT_PTR(PHI) get_phi_result_ptr (PHI) 140 #define PHI_RESULT(PHI) DEF_FROM_PTR (PHI_RESULT_PTR (PHI)) 141 #define SET_PHI_RESULT(PHI, V) SET_DEF (PHI_RESULT_PTR (PHI), (V)) 143 #define PHI_ARG_DEF_PTR(PHI, I) get_phi_arg_def_ptr ((PHI), (I)) 144 #define PHI_ARG_DEF(PHI, I) USE_FROM_PTR (PHI_ARG_DEF_PTR ((PHI), ( [all...] |
/freebsd-11-stable/contrib/llvm-project/llvm/include/llvm/Transforms/Utils/ |
H A D | SSAUpdaterImpl.h | 293 /// dominating definitions for non-PHI blocks. 303 // If this block already needs a PHI, there is nothing to do here. 311 // Need a PHI here. 326 /// FindAvailableVal - If this block requires a PHI, first check if an 327 /// existing PHI matches the PHI placement and reaching definitions computed 328 /// earlier, and if not, create a new PHI. Visit all the block's 330 /// the incoming values for a new PHI. 338 // Check if there needs to be a PHI in BB. 342 // Look for an existing PHI 347 ValT PHI = Traits::CreateEmptyPHI(Info->BB, Info->NumPreds, Updater); local 366 PhiT *PHI = Traits::ValueIsNewPHI(Info->AvailableVal, Updater); local 404 CheckIfPHIMatches(PhiT *PHI) argument [all...] |
/freebsd-11-stable/contrib/llvm-project/llvm/lib/Target/AMDGPU/ |
H A D | AMDGPUMachineCFGStructurizer.cpp | 303 static unsigned getPHINumInputs(MachineInstr &PHI) { 304 assert(PHI.isPHI()); 305 return (PHI.getNumOperands() - 1) / 2; 308 static MachineBasicBlock *getPHIPred(MachineInstr &PHI, unsigned Index) { 309 assert(PHI.isPHI()); 310 return PHI.getOperand(Index * 2 + 2).getMBB(); 313 static void setPhiPred(MachineInstr &PHI, unsigned Index, 315 PHI.getOperand(Index * 2 + 2).setMBB(NewPred); 318 static unsigned getPHISourceReg(MachineInstr &PHI, unsigned Index) { 319 assert(PHI [all...] |
H A D | AMDGPUAtomicOptimizer.cpp | 583 // Create a PHI node to get our new atomic result into the exit block. 584 PHINode *const PHI = B.CreatePHI(Ty, 2); local 585 PHI->addIncoming(UndefValue::get(Ty), EntryBB); 586 PHI->addIncoming(NewI, SingleLaneTerminator->getParent()); 594 Value *const ExtractLo = B.CreateTrunc(PHI, B.getInt32Ty()); 596 B.CreateTrunc(B.CreateLShr(PHI, 32), B.getInt32Ty()); 608 BroadcastI = B.CreateIntrinsic(Intrinsic::amdgcn_readfirstlane, {}, PHI); 644 // Need a final PHI to reconverge to above the helper lane branch mask. 647 PHINode *const PHI = B.CreatePHI(Ty, 2); local 648 PHI [all...] |
/freebsd-11-stable/contrib/llvm-project/llvm/lib/Transforms/Scalar/ |
H A D | LoopInterchange.cpp | 651 // If SV is a LCSSA PHI node with a single incoming value, return the incoming 654 PHINode *PHI = dyn_cast<PHINode>(SV); 655 if (!PHI) 658 if (PHI->getNumIncomingValues() != 1) 660 return followLCSSA(PHI->getIncomingValue(0)); 666 if (PHINode *PHI = dyn_cast<PHINode>(User)) { 667 if (PHI->getNumIncomingValues() == 1) 670 if (RecurrenceDescriptor::isReductionPHI(PHI, L, RD)) 671 return PHI; 683 for (PHINode &PHI [all...] |
H A D | LoopFuse.cpp | 1190 for (PHINode &PHI : FC0.Header->phis()) 1191 OriginalFC0PHIs.push_back(&PHI); 1232 while (PHINode *PHI = dyn_cast<PHINode>(&FC1.Header->front())) { 1233 if (SE.isSCEVable(PHI->getType())) 1234 SE.forgetValue(PHI); 1235 if (PHI->hasNUsesOrMore(1)) 1236 PHI->moveBefore(&*FC0.Header->getFirstInsertionPt()); 1238 PHI->eraseFromParent(); 1433 for (PHINode &PHI : FC0.Header->phis()) 1434 OriginalFC0PHIs.push_back(&PHI); [all...] |
H A D | GVNSink.cpp | 227 /// Describes a PHI node that may or may not exist. These track the PHIs 258 /// Create a PHI from an array of incoming values and incoming blocks. 265 /// Create a PHI from [I[OpNum] for I in Insts]. 273 /// Restrict the PHI's contents down to only \c NewBlocks. 342 // that the program would be equivalent if we replaced A with PHI(A, B). 594 /// Create a ModelledPHI for each PHI in BB, adding to PHIs. 701 for (auto &PHI : NeededPHIs) 702 PHIContents.insert(PHI.getValues().begin(), PHI.getValues().end()); 705 // Is this instruction required by a later PHI tha [all...] |
H A D | Scalarizer.cpp | 196 bool visitPHINode(PHINode &PHI); 354 // When scalarizing PHI nodes we might try to examine/rewrite InsertElement 761 bool ScalarizerVisitor::visitPHINode(PHINode &PHI) { argument 762 VectorType *VT = dyn_cast<VectorType>(PHI.getType()); 767 IRBuilder<> Builder(&PHI); 771 unsigned NumOps = PHI.getNumOperands(); 774 PHI.getName() + ".i" + Twine(I)); 777 Scatterer Op = scatter(&PHI, PHI.getIncomingValue(I)); 778 BasicBlock *IncomingBlock = PHI [all...] |
H A D | InferAddressSpaces.cpp | 226 case Instruction::PHI: 246 case Instruction::PHI: { 472 case Instruction::PHI: { 474 PHINode *PHI = cast<PHINode>(I); local 475 PHINode *NewPHI = PHINode::Create(NewPtrType, PHI->getNumIncomingValues()); 476 for (unsigned Index = 0; Index < PHI->getNumIncomingValues(); ++Index) { 479 PHI->getIncomingBlock(Index));
|
H A D | LoopLoadElimination.cpp | 442 PHINode *PHI = PHINode::Create(Initial->getType(), 2, "store_forwarded", 444 PHI->addIncoming(Initial, PH); 445 PHI->addIncoming(Cand.Store->getOperand(0), L->getLoopLatch()); 447 Cand.Load->replaceAllUsesWith(PHI);
|
/freebsd-11-stable/contrib/llvm-project/llvm/lib/Transforms/ObjCARC/ |
H A D | ObjCARCContract.cpp | 25 // TODO: ObjCARCContract could insert PHI nodes when uses aren't 652 if (PHINode *PHI = dyn_cast<PHINode>(U.getUser())) { 653 // For PHI nodes, insert the bitcast in the predecessor block. 655 BasicBlock *IncomingBB = PHI->getIncomingBlock(ValNo); 671 // While we're here, rewrite all edges for this PHI, rather 674 for (unsigned i = 0, e = PHI->getNumIncomingValues(); i != e; ++i) 675 if (PHI->getIncomingBlock(i) == IncomingBB) { 678 &PHI->getOperandUse( 681 PHI->setIncomingValue(i, Replacement); 710 // If Arg is a PHI nod [all...] |
/freebsd-11-stable/contrib/llvm-project/llvm/lib/Analysis/ |
H A D | MemoryBuiltins.cpp | 990 SizeOffsetEvalType ObjectSizeOffsetEvaluator::visitPHINode(PHINode &PHI) { argument 992 PHINode *SizePHI = Builder.CreatePHI(IntTy, PHI.getNumIncomingValues()); 993 PHINode *OffsetPHI = Builder.CreatePHI(IntTy, PHI.getNumIncomingValues()); 996 CacheMap[&PHI] = std::make_pair(SizePHI, OffsetPHI); 998 // Compute offset/size for each PHI incoming pointer. 999 for (unsigned i = 0, e = PHI.getNumIncomingValues(); i != e; ++i) { 1000 Builder.SetInsertPoint(&*PHI.getIncomingBlock(i)->getFirstInsertionPt()); 1001 SizeOffsetEvalType EdgeData = compute_(PHI.getIncomingValue(i)); 1012 SizePHI->addIncoming(EdgeData.first, PHI.getIncomingBlock(i)); 1013 OffsetPHI->addIncoming(EdgeData.second, PHI [all...] |