| /src/external/apache2/llvm/dist/llvm/lib/Analysis/ |
| IVDescriptors.cpp | 85 /// Determines if Phi may have been type-promoted. If Phi has a single user 86 /// that ANDs the Phi with a type mask, return the user. RT is updated to 89 static Instruction *lookThroughAnd(PHINode *Phi, Type *&RT, 92 if (!Phi->hasOneUse()) 93 return Phi; 96 Instruction *I, *J = cast<Instruction>(Phi->use_begin()->getUser()); 103 RT = IntegerType::get(Phi->getContext(), Bits); 104 Visited.insert(Phi); 109 return Phi; [all...] |
| MemorySSAUpdater.cpp | 36 // The simple, non-marker algorithm places phi nodes at any join 37 // Here, we place markers, and only place phi nodes if they end up necessary. 42 // flow, where phi nodes may be in cycles with themselves, but unnecessary. 65 // We hit our node again, meaning we had a cycle, we must insert a phi 78 // potential phi node. This will insert phi nodes if we cycle in order to 94 // Now try to simplify the ops to avoid placing a phi. 95 // This may return null if we never created a phi yet, that's okay 96 MemoryPhi *Phi = dyn_cast_or_null<MemoryPhi>(MSSA->getMemoryAccess(BB)); 98 // See if we can avoid the phi by simplifying it [all...] |
| PhiValues.cpp | 1 //===- PhiValues.cpp - Phi Value Analysis ---------------------------------===// 33 // The goal here is to find all of the non-phi values reachable from this phi, 34 // and to do the same for all of the phis reachable from this phi, as doing so 35 // is necessary anyway in order to get the values for this phi. We do this using 37 // components of the phi graph rooted in this phi: 39 // non-phi values. The SCC may not be the maximal subgraph for that set of 46 // * We collect both the non-phi values reachable from each SCC, as that's what 49 void PhiValues::processPhi(const PHINode *Phi, [all...] |
| DivergenceAnalysis.cpp | 54 // %a = phi i32 [ 0, %then ], [ 1, %else ] 178 "In LCSSA form all users of loop-exiting defs are Phi nodes."); 195 for (const auto &Phi : DivExit.phis()) { 196 analyzeTemporalDivergence(Phi, OuterDivLoop); 207 // dominance region of DivLoop (including its fringes for phi nodes) 221 // phi nodes at the fringes of the dominance region 223 // all PHI nodes of UserBlock become divergent 224 for (auto &Phi : UserBlock->phis()) { 225 analyzeTemporalDivergence(Phi, OuterDivLoop); 266 // this is a divergent join point - mark all phi nodes as divergent and pus [all...] |
| MemorySSA.cpp | 458 // Add reachable phi predecessors 516 // Phi optimization bookkeeping: 517 // List of DefPath to process during the current phi optimization walk. 522 // Record if phi translation has been performed during the current phi 523 // optimization walk, as merging alias results after phi translation can 527 /// Find the nearest def or phi that `From` can legally be optimized to. 529 assert(From->getNumOperands() && "Phi with no operands?"); 551 /// Walk to the next Phi or Clobber in the def chain starting at Desc.Last. 594 "Ended at a non-clobber that's not a phi?") [all...] |
| /src/external/apache2/llvm/dist/llvm/lib/Target/ARM/ |
| MVEGatherScatterLowering.cpp | 143 void pushOutAdd(PHINode *&Phi, Value *OffsSecondOperand, unsigned StartIndex); 145 void pushOutMul(PHINode *&Phi, Value *IncrementPerRound, 687 // change the phi which does affect other users of the gep (which will still 688 // be using the phi in the old way) 733 // by a constant, thus we're looking for an add of a phi and a constant 734 PHINode *Phi = dyn_cast<PHINode>(Offsets); 735 if (Phi == nullptr || Phi->getNumIncomingValues() != 2 || 736 Phi->getParent() != L->getHeader() || Phi->getNumUses() != 2 [all...] |
| /src/external/apache2/llvm/dist/clang/lib/Analysis/ |
| ThreadSafetyTIL.cpp | 63 if (auto *Ph = dyn_cast<Phi>(E)) { 74 if (auto *Ph = dyn_cast<Phi>(E)) { 81 // Phi nodes to find the canonical definition. 90 if (const auto *Ph = dyn_cast<Phi>(E)) { 91 if (Ph->status() == Phi::PH_SingleVal) { 102 // Phi nodes to find the canonical definition. 103 // The non-const version will simplify incomplete Phi nodes. 117 if (auto *Ph = dyn_cast<Phi>(E)) { 118 if (Ph->status() == Phi::PH_Incomplete) 120 // Eliminate redundant Phi nodes [all...] |
| /src/external/apache2/llvm/dist/llvm/lib/Transforms/Vectorize/ |
| VPlanTransforms.cpp | 47 auto *Phi = cast<PHINode>(VPPhi->getUnderlyingValue()); 48 InductionDescriptor II = Inductions.lookup(Phi); 52 NewRecipe = new VPWidenIntOrFpInductionRecipe(Phi, Start, nullptr); 54 Plan->addVPValue(Phi, VPPhi);
|
| VPlanHCFGBuilder.cpp | 59 // Hold phi node's that need to be fixed once the plain CFG has been built. 92 // Add operands to VPInstructions representing phi nodes from the input IR. 94 for (auto *Phi : PhisToFix) { 95 assert(IRDef2VPValue.count(Phi) && "Missing VPInstruction for PHINode."); 96 VPValue *VPVal = IRDef2VPValue[Phi]; 98 "Expected WidenPHIRecipe for phi node."); 103 for (unsigned I = 0; I != Phi->getNumOperands(); ++I) 104 VPPhi->addIncoming(getOrCreateVPOperand(Phi->getIncomingValue(I)), 105 BB2VPBB[Phi->getIncomingBlock(I)]); 193 // VPInstruction in \p BB have been visited before (except for Phi nodes) [all...] |
| LoopVectorizationLegality.cpp | 353 /// Check whether it is safe to if-convert this phi node. 355 /// Phi nodes with constant expressions that can trap are not safe to if 358 for (PHINode &Phi : BB->phis()) { 359 for (Value *V : Phi.incoming_values()) 481 reportVectorizationFailure("Unsupported outer loop Phi(s)", 482 "Unsupported outer loop Phi(s)", 494 PHINode *Phi, const InductionDescriptor &ID, 496 Inductions[Phi] = ID; 506 Type *PhiTy = Phi->getType(); 507 const DataLayout &DL = Phi->getModule()->getDataLayout() [all...] |
| VPRecipeBuilder.h | 77 tryToOptimizeInductionPHI(PHINode *Phi, ArrayRef<VPValue *> Operands) const; 85 /// Handle non-loop phi nodes. Return a VPValue, if all incoming values match 86 /// or a new VPBlendRecipe otherwise. Currently all such phi nodes are turned 89 VPRecipeOrVPValueTy tryToBlend(PHINode *Phi, ArrayRef<VPValue *> Operands,
|
| /src/external/apache2/llvm/dist/llvm/lib/Target/AMDGPU/ |
| SIAnnotateControlFlow.cpp | 72 bool isElse(PHINode *Phi); 76 void eraseIfUnused(PHINode *Phi); 167 /// Can the condition represented by this PHI node treated like 169 bool SIAnnotateControlFlow::isElse(PHINode *Phi) { 170 BasicBlock *IDom = DT->getNode(Phi->getParent())->getIDom()->getBlock(); 171 for (unsigned i = 0, e = Phi->getNumIncomingValues(); i != e; ++i) { 172 if (Phi->getIncomingBlock(i) == IDom) { 174 if (Phi->getIncomingValue(i) != BoolTrue) 178 if (Phi->getIncomingValue(i) != BoolFalse) 195 // Erase "Phi" if it is not used any mor [all...] |
| /src/external/apache2/llvm/dist/llvm/include/llvm/Analysis/ |
| IVDescriptors.h | 147 /// Returns true if Phi is a reduction of type Kind and adds it to the 151 static bool AddReductionVar(PHINode *Phi, RecurKind Kind, Loop *TheLoop, 158 /// Returns true if Phi is a reduction in TheLoop. The RecurrenceDescriptor 162 static bool isReductionPHI(PHINode *Phi, Loop *TheLoop, 168 /// Returns true if Phi is a first-order recurrence. A first-order recurrence 174 /// to handle Phi as a first-order recurrence. 176 isFirstOrderRecurrence(PHINode *Phi, Loop *TheLoop, 194 /// Returns 1st non-reassociative FP instruction in the PHI node's use-chain. 223 /// actual type of the Phi if the recurrence has been type-promoted. 236 /// Attempts to find a chain of operations from Phi to LoopExitInst that ca [all...] |
| MemorySSAUpdater.h | 11 // deletion, and moves. It performs phi insertion where necessary, and 104 /// Updating phi nodes in exit block successors is done separately. 113 /// Update phi nodes in exit block successors following cloning. Exit blocks 167 /// If New is the only predecessor, move Old's Phi, if present, to New. 168 /// Otherwise, add a new Phi in New with appropriate incoming values, and 169 /// update the incoming values in Old's Phi node too, if present. 184 /// used to replace an existing memory instruction. It will *not* create PHI 201 /// used to replace an existing memory instruction. It will *not* create PHI 230 /// Assumption we make here: all uses of deleted defs and phi must either 234 /// Phi nodes may already be updated. Instructions in DeadBlocks should b [all...] |
| /src/external/apache2/llvm/dist/llvm/lib/Transforms/Utils/ |
| CallPromotionUtils.cpp | 25 /// Fix-up phi nodes in an invoke instruction's normal destination. 38 /// %t2 = phi i32 [ %t0, %then_bb ], [ %t1, %else_bb ] 42 /// %t3 = phi i32 [ %x, %orig_bb ], ... 44 /// "orig_bb" is no longer a predecessor of "normal_dst", so the phi nodes in 48 /// %t3 = phi i32 [ %x, %merge_bb ], ... 52 for (PHINode &Phi : Invoke->getNormalDest()->phis()) { 53 int Idx = Phi.getBasicBlockIndex(OrigBlock); 56 Phi.setIncomingBlock(Idx, MergeBlock); 60 /// Fix-up phi nodes in an invoke instruction's unwind destination. 73 /// %t3 = phi i32 [ %x, %orig_bb ], .. [all...] |
| LoopUnrollAndJam.cpp | 133 // Looks at the phi nodes in Header for values coming from Latch. For these 146 for (auto &Phi : Header->phis()) { 147 Value *V = Phi.getIncomingValueForBlock(Latch); 168 // Move the phi operands of Header from Latch out of AftBlocks to InsertLoc. 339 // Move any instructions from fore phi operands from AftBlocks into Fore. 445 // Alter the ForeBlocks phi's, pointing them at the latest version of the 447 for (PHINode &Phi : ForeBlocksFirst[It]->phis()) { 448 Value *OldValue = Phi.getIncomingValueForBlock(AftBlocksLast[It]); 454 assert(Phi.getNumOperands() == 2); 455 Phi.setIncomingBlock(0, ForeBlocksLast[It - 1]) [all...] |
| LoopUtils.cpp | 603 // Set the zero'th element of Phi to be from the preheader and remove all 709 "There should be a non-PHI instruction in exit block, else these " 1219 // Collect information about PHI nodes which can be transformed in 1222 PHINode *PN; // For which PHI node is this replacement? 1266 for (const RewritePhi &Phi : RewritePhiSet) { 1267 if (!Phi.ValidRewrite) 1269 unsigned i = Phi.Ith; 1270 if (Phi.PN == P && (Phi.PN)->getIncomingValue(i) == Incoming) { 1308 // Because of LCSSA, these values will only occur in LCSSA PHI Nodes. Sca [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...] |
| /src/external/apache2/llvm/dist/llvm/lib/Transforms/Scalar/ |
| MergeICmps.cpp | 328 // - For the final block, as an incoming value for the Phi. 409 BCECmpChain(const std::vector<BasicBlock *> &Blocks, PHINode &Phi, 436 BCECmpChain::BCECmpChain(const std::vector<BasicBlock *> &Blocks, PHINode &Phi, 438 : Phi_(Phi) { 445 BCECmpBlock Comparison = visitCmpBlock(Phi.getIncomingValueForBlock(Block), 446 Block, Phi.getParent(), BaseId); 550 errs() << " \"" << I << "\" -> \"Phi\" [label=\"" << *Val << "\"];\n"; 552 errs() << " \"Phi\" [label=\"Phi\"];\n"; 608 PHINode &Phi, const TargetLibraryInfo &TLI [all...] |
| PartiallyInlineLibCalls.cpp | 53 // dst = phi(v0, v1) 69 // Create phi that will merge results of either sqrt and replace all uses. 73 PHINode *Phi = Builder.CreatePHI(Ty, 2); 74 Call->replaceAllUsesWith(Phi); 95 // Add phi operands. 96 Phi->addIncoming(Call, &CurrBB); 97 Phi->addIncoming(LibCall, LibCallBB);
|
| IndVarSimplify.cpp | 228 // If this is not an add of the PHI with a constantfp, or if the constant fp 436 /// loop iteration. This lets us predict exit values of PHI nodes that live in 447 // If there are no more PHI nodes in this exit block, then no more 485 // If ExitVal is a PHI on the loop header, then we know its 659 /// loop, return the associated Phi node if so. Otherwise, return null. Note 679 PHINode *Phi = dyn_cast<PHINode>(IncI->getOperand(0)); 680 if (Phi && Phi->getParent() == L->getHeader()) { 682 return Phi; 689 Phi = dyn_cast<PHINode>(IncI->getOperand(1)) [all...] |
| Reg2Mem.cpp | 11 // values live across basic blocks are allocas and loads before phi nodes. 42 STATISTIC(NumPhisDemoted, "Number of phi-nodes demoted"); 84 // Find all phi's 86 for (auto &Phi : BB.phis()) 87 WorkList.push_front(&Phi); 89 // Demote phi nodes
|
| StructurizeCFG.cpp | 217 /// The condition for the optional "Else" region is expressed as a PHI node. 218 /// The incoming values of the PHI node are true for the "If" edge and false 236 /// consist of a network of PHI nodes where the true incoming values expresses 589 /// Remove all PHI values coming from "From" into "To" and remember 593 for (PHINode &Phi : To->phis()) { 595 while (Phi.getBasicBlockIndex(From) != -1) { 596 Value *Deleted = Phi.removeIncomingValue(From, false); 597 Map[&Phi].push_back(std::make_pair(From, Deleted)); 599 AffectedPhis.push_back(&Phi); 606 /// Add a dummy PHI value as soon as we knew the new predecesso [all...] |
| /src/external/apache2/llvm/dist/llvm/lib/Transforms/AggressiveInstCombine/ |
| AggressiveInstCombine.cpp | 77 if (I.getOpcode() != Instruction::PHI || I.getNumOperands() != 2) 117 // One phi operand must be a funnel/rotate operation, and the other phi 119 // phi [ rotate(RotSrc, ShAmt), FunnelBB ], [ RotSrc, GuardBB ] 120 // phi [ fshl(ShVal0, ShVal1, ShAmt), FunnelBB ], [ ShVal0, GuardBB ] 121 // phi [ fshr(ShVal0, ShVal1, ShAmt), FunnelBB ], [ ShVal1, GuardBB ] 122 PHINode &Phi = cast<PHINode>(I); 124 Value *P0 = Phi.getOperand(0), *P1 = Phi.getOperand(1); 144 BasicBlock *GuardBB = Phi.getIncomingBlock(GuardOp) [all...] |
| /src/external/apache2/llvm/dist/llvm/lib/CodeGen/ |
| ModuloSchedule.cpp | 33 /// Return the register values for the operands of a Phi instruction. 34 /// This function assume the instruction is a Phi. 35 static void getPhiRegs(MachineInstr &Phi, MachineBasicBlock *Loop, 37 assert(Phi.isPHI() && "Expecting a Phi."); 41 for (unsigned i = 1, e = Phi.getNumOperands(); i != e; i += 2) 42 if (Phi.getOperand(i + 1).getMBB() != Loop) 43 InitVal = Phi.getOperand(i).getReg(); 45 LoopVal = Phi.getOperand(i).getReg(); 47 assert(InitVal != 0 && LoopVal != 0 && "Unexpected Phi structure.") 1457 Register KernelRewriter::phi(Register LoopReg, Optional<Register> InitReg, function in class:KernelRewriter [all...] |