| /src/external/gpl3/gcc/dist/gcc/ |
| tree-ssa-operands.h | 75 #define PHI_RESULT_PTR(PHI) gimple_phi_result_ptr (PHI) 76 #define PHI_RESULT(PHI) DEF_FROM_PTR (PHI_RESULT_PTR (PHI)) 77 #define SET_PHI_RESULT(PHI, V) SET_DEF (PHI_RESULT_PTR (PHI), (V)) 79 #define PHI_ARG_DEF(PHI, I) USE_FROM_PTR (PHI_ARG_DEF_PTR ((PHI), (I))) 81 #define PHI_ARG_DEF_PTR(PHI, I) gimple_phi_arg_imm_use_ptr ((PHI), (I) [all...] |
| /src/external/gpl3/gcc.old/dist/gcc/ |
| tree-ssa-operands.h | 75 #define PHI_RESULT_PTR(PHI) gimple_phi_result_ptr (PHI) 76 #define PHI_RESULT(PHI) DEF_FROM_PTR (PHI_RESULT_PTR (PHI)) 77 #define SET_PHI_RESULT(PHI, V) SET_DEF (PHI_RESULT_PTR (PHI), (V)) 79 #define PHI_ARG_DEF(PHI, I) USE_FROM_PTR (PHI_ARG_DEF_PTR ((PHI), (I))) 81 #define PHI_ARG_DEF_PTR(PHI, I) gimple_phi_arg_imm_use_ptr ((PHI), (I) [all...] |
| /src/external/apache2/llvm/dist/llvm/lib/CodeGen/ |
| MachineSSAUpdater.cpp | 115 /// InsertNewDef - Insert an empty PHI or IMPLICIT_DEF instruction which define 144 /// a block. Because of this, we need to insert a new PHI node in SomeBB to 183 // If an identical PHI is already in BB, just reuse it. 188 // Otherwise, we do need a PHI: insert one now. 190 MachineInstrBuilder InsertedPHI = InsertNewDef(TargetOpcode::PHI, BB, 193 // Fill in all the predecessors of the PHI. 197 // See if the PHI node can be merged to a single value. This can happen in 198 // loop cases when we get a PHI of itself and one other value. 207 LLVM_DEBUG(dbgs() << " Inserted PHI: " << *InsertedPHI << "\n"); 222 /// RewriteUse - Rewrite a use of the symbolic value. This handles PHI nodes [all...] |
| EarlyIfConversion.cpp | 111 /// Information about each phi in the Tail block. 113 MachineInstr *PHI; 118 PHIInfo(MachineInstr *phi) 119 : PHI(phi), TReg(0), FReg(0), CondCycles(0), TCycles(0), FCycles(0) {} 161 /// Replace PHI instructions in Tail with selects. 164 /// Insert selects and rewrite PHI operands to use them. 514 // Find PHI operands corresponding to TPred and FPred. 515 for (unsigned i = 1; i != PI.PHI->getNumOperands(); i += 2) { 516 if (PI.PHI->getOperand(i+1).getMBB() == TPred [all...] |
| SwiftErrorValueTracking.cpp | 33 // use" by inserting a copy or phi at the beginning of this block. 180 // Otherwise we need a phi. 192 // phi needs to use it self. 201 // We need a phi node if we have more than one predecessor with different 211 // If there is no upwards exposed used and we don't need a phi just 226 // If we don't need a phi create a copy to the upward exposed vreg. 238 // We need a phi: if there is an upwards exposed use we already have a 244 MachineInstrBuilder PHI = 246 TII->get(TargetOpcode::PHI), PHIVReg); 248 PHI.addReg(BBRegPair.second).addMBB(BBRegPair.first) [all...] |
| /src/external/apache2/llvm/dist/llvm/lib/Transforms/Utils/ |
| CanonicalizeFreezeInLoops.cpp | 13 // i = phi init, i.next 21 // i = phi init.fr, i.next 71 // A freeze instruction that uses an induction phi 73 // The induction phi, step instruction, the operand idx of StepInst which is 75 PHINode *PHI; 79 FrozenIndPHIInfo(PHINode *PHI, BinaryOperator *StepInst) 80 : PHI(PHI), StepInst(StepInst) {} 132 for (auto &PHI : L->getHeader()->phis()) { 134 if (!InductionDescriptor::isInductionPHI(&PHI, L, &SE, ID) [all...] |
| SSAUpdater.cpp | 77 static bool IsEquivalentPHI(PHINode *PHI, 79 unsigned PHINumValues = PHI->getNumIncomingValues(); 83 // Scan the phi to see if it matches. 85 if (ValueMapping[PHI->getIncomingBlock(i)] != 86 PHI->getIncomingValue(i)) { 110 // is relatively slow. If we already have PHI nodes in this block, walk one 147 // Otherwise, we do need a PHI: check to see if we already have one available 162 // Fill in all the predecessors of the PHI. 166 // See if the PHI node can be merged to a single value. This can happen in 167 // loop cases when we get a PHI of itself and one other value [all...] |
| LoopPeel.cpp | 82 // Designates that a Phi is estimated to become invariant after an "infinite" 129 // This function calculates the number of iterations after which the given Phi 132 // Given %x = phi <Inputs from above the loop>, ..., [%y, %back.edge]. 134 // If %y is a Phi from the loop header, I(%x) = I(%y) + 1. 136 // TODO: Actually if %y is an expression that depends only on Phi %z and some 139 // %x = phi(0, %a), <-- becomes invariant starting from 3rd iteration. 140 // %y = phi(0, 5), 143 PHINode *Phi, Loop *L, BasicBlock *BackEdge, 145 assert(Phi->getParent() == L->getHeader() && 146 "Non-loop Phi should not be checked for turning into invariant.") [all...] |
| FlattenCFG.cpp | 137 PHINode *PHI = dyn_cast<PHINode>(BB->begin()); 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) 500 // Handle PHI node to replace its predecessors to FirstEntryBlock. 502 for (PHINode &Phi : Succ->phis()) { 503 for (unsigned i = 0, e = Phi.getNumIncomingValues(); i != e; ++i) { 504 if (Phi.getIncomingBlock(i) == SecondEntryBlock [all...] |
| SimplifyCFG.cpp | 106 "phi-node-folding-threshold", cl::Hidden, cl::init(2), 108 "Control the amount of phi node folding to perform (default = 2)")); 111 "two-entry-phi-node-folding-threshold", cl::Hidden, cl::init(4), 113 "to speculatively execute to fold a 2-entry PHI node into a " 200 // The first field contains the phi node that generates a result of the switch 202 // switch for that PHI. 302 // successor, and if that successor has a PHI node, and if *that* PHI node has 324 /// Update PHI nodes in Succ to indicate that there will now be entries in it 325 /// from the 'NewPred' block. The values that will be flowing into the PHI node [all...] |
| /src/external/apache2/llvm/dist/llvm/include/llvm/Transforms/Utils/ |
| 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 [all...] |
| /src/external/apache2/llvm/dist/llvm/lib/Target/AMDGPU/ |
| AMDGPUMachineCFGStructurizer.cpp | 284 static unsigned getPHINumInputs(MachineInstr &PHI) { 285 assert(PHI.isPHI()); 286 return (PHI.getNumOperands() - 1) / 2; 289 static MachineBasicBlock *getPHIPred(MachineInstr &PHI, unsigned Index) { 290 assert(PHI.isPHI()); 291 return PHI.getOperand(Index * 2 + 2).getMBB(); 294 static void setPhiPred(MachineInstr &PHI, unsigned Index, 296 PHI.getOperand(Index * 2 + 2).setMBB(NewPred); 299 static unsigned getPHISourceReg(MachineInstr &PHI, unsigned Index) { 300 assert(PHI.isPHI()) [all...] |
| AMDGPUAtomicOptimizer.cpp | 621 // Create a PHI node to get our new atomic result into the exit block. 622 PHINode *const PHI = B.CreatePHI(Ty, 2); 623 PHI->addIncoming(UndefValue::get(Ty), EntryBB); 624 PHI->addIncoming(NewI, SingleLaneTerminator->getParent()); 632 Value *const ExtractLo = B.CreateTrunc(PHI, B.getInt32Ty()); 634 B.CreateTrunc(B.CreateLShr(PHI, 32), B.getInt32Ty()); 646 BroadcastI = B.CreateIntrinsic(Intrinsic::amdgcn_readfirstlane, {}, PHI); 683 // Need a final PHI to reconverge to above the helper lane branch mask. 686 PHINode *const PHI = B.CreatePHI(Ty, 2); 687 PHI->addIncoming(UndefValue::get(Ty), PixelEntryBB) [all...] |
| /src/external/apache2/llvm/dist/llvm/lib/Transforms/Scalar/ |
| LoopInterchange.cpp | 721 // If SV is a LCSSA PHI node with a single incoming value, return the incoming 724 PHINode *PHI = dyn_cast<PHINode>(SV); 725 if (!PHI) 728 if (PHI->getNumIncomingValues() != 1) 730 return followLCSSA(PHI->getIncomingValue(0)); 740 if (PHINode *PHI = dyn_cast<PHINode>(User)) { 741 if (PHI->getNumIncomingValues() == 1) 744 if (RecurrenceDescriptor::isReductionPHI(PHI, L, RD)) 745 return PHI; 757 for (PHINode &PHI : L->getHeader()->phis()) [all...] |
| GVNSink.cpp | 19 /// [ %e = phi i32 %a2, %c2 ] 226 /// Describes a PHI node that may or may not exist. These track the PHIs 257 /// Create a PHI from an array of incoming values and incoming blocks. 264 /// Create a PHI from [I[OpNum] for I in Insts]. 272 /// Restrict the PHI's contents down to only \c NewBlocks. 340 // that the program would be equivalent if we replaced A with PHI(A, B). 597 /// Create a ModelledPHI for each PHI in BB, adding to PHIs. 702 for (auto &PHI : NeededPHIs) 703 PHIContents.insert(PHI.getValues().begin(), PHI.getValues().end()) [all...] |
| LoopFuse.cpp | 1346 // Remember the phi nodes originally in the header of FC0 in order to rewire 1349 // test if this is the case but simply insert intermediate phi nodes, we 1350 // need to make sure these intermediate phi nodes have different 1357 for (PHINode &PHI : FC0.Header->phis()) 1358 OriginalFC0PHIs.push_back(&PHI); 1372 // However, doing so might invalidate the phi nodes of the first loop as 1374 // predicate. To remedy this potential problem we always introduce phi 1413 // Moves the phi nodes from the second to the first loops header block. 1414 while (PHINode *PHI = dyn_cast<PHINode>(&FC1.Header->front())) { 1415 if (SE.isSCEVable(PHI->getType()) [all...] |
| LoopFlatten.cpp | 124 // Find the induction PHI. If there is no induction PHI, we can't do the 128 for (PHINode &PHI : L->getHeader()->phis()) { 130 if (InductionDescriptor::isInductionPHI(&PHI, L, SE, ID)) { 131 InductionPHI = &PHI; 132 LLVM_DEBUG(dbgs() << "Found induction PHI: "; InductionPHI->dump()); 137 LLVM_DEBUG(dbgs() << "Could not find induction PHI\n"); 189 LLVM_DEBUG(dbgs() << "PHI value is not zero: "; CI->dump()); 199 // - The induction PHI, which we are going to rewrite as one induction in 201 // - An outer header PHI with all incoming values from outside the loop [all...] |
| Scalarizer.cpp | 204 bool visitPHINode(PHINode &PHI); 364 // When scalarizing PHI nodes we might try to examine/rewrite InsertElement 840 bool ScalarizerVisitor::visitPHINode(PHINode &PHI) { 841 VectorType *VT = dyn_cast<VectorType>(PHI.getType()); 846 IRBuilder<> Builder(&PHI); 850 unsigned NumOps = PHI.getNumOperands(); 853 PHI.getName() + ".i" + Twine(I)); 856 Scatterer Op = scatter(&PHI, PHI.getIncomingValue(I)); 857 BasicBlock *IncomingBlock = PHI.getIncomingBlock(I) [all...] |
| InferAddressSpaces.cpp | 60 // %y = phi [ %generic.input, %y2 ] 68 // All address expressions (our implementation only considers phi, bitcast, 83 // %y' = phi float addrspace(3)* [ %input, undef ] 87 // %y' = phi float addrspace(3)* [ %input, %y2' ] 273 // TODO: Currently, we consider only phi, bitcast, addrspacecast, and 282 case Instruction::PHI: 311 case Instruction::PHI: { 594 case Instruction::PHI: { 596 PHINode *PHI = cast<PHINode>(I); 597 PHINode *NewPHI = PHINode::Create(NewPtrType, PHI->getNumIncomingValues()) [all...] |
| /src/external/apache2/llvm/dist/llvm/lib/Transforms/InstCombine/ |
| InstCombineNegator.cpp | 271 case Instruction::PHI: { 272 // `phi` is negatible if all the incoming values are negatible. 273 auto *PHI = cast<PHINode>(I); 274 SmallVector<Value *, 4> NegatedIncomingValues(PHI->getNumOperands()); 275 for (auto I : zip(PHI->incoming_values(), NegatedIncomingValues)) { 280 // All incoming values are indeed negatible. Create negated PHI node. 282 PHI->getType(), PHI->getNumOperands(), PHI->getName() + ".neg"); 283 for (auto I : zip(NegatedIncomingValues, PHI->blocks()) [all...] |
| /src/external/apache2/llvm/dist/llvm/lib/Target/X86/ |
| X86LowerAMXType.cpp | 461 void replacePhiDefWithLoad(Instruction *PHI, Value *StorePtr); 474 // All its uses (except phi) should load from stored mem. 485 void X86VolatileTileData::replacePhiDefWithLoad(Instruction *PHI, 487 for (Use &U : PHI->uses()) 489 PHI->eraseFromParent(); 492 // Smilar with volatileTileNonPHI, this function only handle PHI Nodes 494 // 1) PHI Def should change to tileload. 495 // 2) PHI Incoming Values should tilestored in just after their def. 515 // %td = phi x86_amx [ %t1, %if.else ], [ %t0, %if.then ] 547 void X86VolatileTileData::volatileTilePHI(PHINode *PHI) { [all...] |
| /src/external/apache2/llvm/dist/llvm/lib/Transforms/ObjCARC/ |
| ObjCARCContract.cpp | 25 // TODO: ObjCARCContract could insert PHI nodes when uses aren't 613 if (PHINode *PHI = dyn_cast<PHINode>(U.getUser())) { 614 // For PHI nodes, insert the bitcast in the predecessor block. 616 BasicBlock *IncomingBB = PHI->getIncomingBlock(ValNo); 632 // While we're here, rewrite all edges for this PHI, rather 635 for (unsigned i = 0, e = PHI->getNumIncomingValues(); i != e; ++i) 636 if (PHI->getIncomingBlock(i) == IncomingBB) { 639 &PHI->getOperandUse( 642 PHI->setIncomingValue(i, Replacement); 670 // If Arg is a PHI node, get PHIs that are equivalent to it and replac [all...] |
| /src/external/apache2/llvm/dist/llvm/lib/Target/PowerPC/ |
| PPCMIPeephole.cpp | 272 // This function returns a list of all PHI nodes in the tree starting from 274 // The list initially only contains the root PHI. When we visit a PHI node, we 275 // add it to the list. We continue to look for other PHI node operands while 291 // While collecting the PHI nodes, we check if they can be converted (i.e. 292 // all the operands are either copies, implicit defs or PHI nodes). 299 } else if (Opcode != PPC::IMPLICIT_DEF && Opcode != PPC::PHI) 301 // If we detect a cycle in the PHI nodes, we exit. It would be 305 if (Opcode != PPC::PHI) 316 // This function changes the unprimed accumulator PHI nodes in the PHIs list t [all...] |
| /src/external/apache2/llvm/dist/llvm/lib/Transforms/Instrumentation/ |
| PGOMemOPSizeOpt.cpp | 440 PHINode *PHI = nullptr; 442 // Insert a phi for the return values at the merge block. 444 PHI = IRBM.CreatePHI(MemOpTy, SizeIds.size() + 1, "MemOP.RVMerge"); 445 MO.I->replaceAllUsesWith(PHI); 446 PHI->addIncoming(MO.I, DefaultBB); 479 PHI->addIncoming(NewMO.I, CaseBB);
|
| /src/external/apache2/llvm/dist/llvm/lib/Analysis/ |
| MemoryBuiltins.cpp | 1033 SizeOffsetEvalType ObjectSizeOffsetEvaluator::visitPHINode(PHINode &PHI) { 1035 PHINode *SizePHI = Builder.CreatePHI(IntTy, PHI.getNumIncomingValues()); 1036 PHINode *OffsetPHI = Builder.CreatePHI(IntTy, PHI.getNumIncomingValues()); 1039 CacheMap[&PHI] = std::make_pair(SizePHI, OffsetPHI); 1041 // Compute offset/size for each PHI incoming pointer. 1042 for (unsigned i = 0, e = PHI.getNumIncomingValues(); i != e; ++i) { 1043 Builder.SetInsertPoint(&*PHI.getIncomingBlock(i)->getFirstInsertionPt()); 1044 SizeOffsetEvalType EdgeData = compute_(PHI.getIncomingValue(i)); 1055 SizePHI->addIncoming(EdgeData.first, PHI.getIncomingBlock(i)); 1056 OffsetPHI->addIncoming(EdgeData.second, PHI.getIncomingBlock(i)) [all...] |