Searched refs:Phi (Results 1 - 25 of 76) sorted by relevance

1234

/external/llvm/lib/Target/AMDGPU/
H A DSIAnnotateControlFlow.cpp80 bool isElse(PHINode *Phi);
82 void eraseIfUnused(PHINode *Phi);
191 bool SIAnnotateControlFlow::isElse(PHINode *Phi) { argument
192 BasicBlock *IDom = DT->getNode(Phi->getParent())->getIDom()->getBlock();
193 for (unsigned i = 0, e = Phi->getNumIncomingValues(); i != e; ++i) {
194 if (Phi->getIncomingBlock(i) == IDom) {
196 if (Phi->getIncomingValue(i) != BoolTrue)
200 if (Phi->getIncomingValue(i) != BoolFalse)
208 // \brief Erase "Phi" if it is not used any more
209 void SIAnnotateControlFlow::eraseIfUnused(PHINode *Phi) { argument
243 PHINode *Phi = nullptr; local
404 PHINode *Phi = dyn_cast<PHINode>(Term->getCondition()); local
[all...]
H A DAMDGPUPromoteAlloca.cpp608 if (PHINode *Phi = dyn_cast<PHINode>(UseInst)) {
611 switch (Phi->getNumIncomingValues()) {
615 if (!binaryOpIsDerivedFromSameAlloca(BaseAlloca, Val, Phi, 0, 1))
760 } else if (PHINode *Phi = dyn_cast<PHINode>(V)) {
761 for (unsigned I = 0, E = Phi->getNumIncomingValues(); I != E; ++I) {
762 if (isa<ConstantPointerNull>(Phi->getIncomingValue(I)))
763 Phi->setIncomingValue(I, ConstantPointerNull::get(NewTy));
/external/llvm/lib/Transforms/Utils/
H A DLoopUtils.cpp77 RecurrenceDescriptor::lookThroughAnd(PHINode *Phi, Type *&RT, argument
80 if (!Phi->hasOneUse())
81 return Phi;
84 Instruction *I, *J = cast<Instruction>(Phi->use_begin()->getUser());
92 RT = IntegerType::get(Phi->getContext(), Bits);
93 Visited.insert(Phi);
98 return Phi;
162 bool RecurrenceDescriptor::AddReductionVar(PHINode *Phi, RecurrenceKind Kind, argument
165 if (Phi->getNumIncomingValues() != 2)
169 if (Phi
473 isReductionPHI(PHINode *Phi, Loop *TheLoop, RecurrenceDescriptor &RedDes) argument
522 isFirstOrderRecurrence(PHINode *Phi, Loop *TheLoop, DominatorTree *DT) argument
734 isInductionPHI(PHINode *Phi, PredicatedScalarEvolution &PSE, InductionDescriptor &D, bool Assume) argument
758 isInductionPHI(PHINode *Phi, ScalarEvolution *SE, InductionDescriptor &D, const SCEV *Expr) argument
[all...]
H A DMemorySSA.cpp213 auto *Phi = cast<MemoryPhi>(&Accesses->front()); local
214 Phi->addIncoming(IncomingVal, BB);
275 auto *Phi = cast<MemoryPhi>(&Accesses->front()); local
276 Phi->addIncoming(LiveOnEntryDef.get(), BB);
409 MemoryPhi *Phi = new MemoryPhi(BB->getContext(), BB, NextID++); local
410 ValueToMemoryAccess.insert(std::make_pair(BB, Phi));
411 // Phi's always are placed at the front of the block.
412 Accesses->push_front(Phi);
458 MemoryPhi *Phi = new MemoryPhi(BB->getContext(), BB, NextID++); local
459 ValueToMemoryAccess.insert(std::make_pair(BB, Phi));
688 MemoryAccess *Phi = getMemoryAccess(&B); local
[all...]
/external/clang/lib/Analysis/
H A DThreadSafetyTIL.cpp61 if (Phi* Ph = dyn_cast<Phi>(E)) {
73 if (Phi* Ph = dyn_cast<Phi>(E)) {
81 // Phi nodes to find the canonical definition.
90 if (const Phi *Ph = dyn_cast<Phi>(E)) {
91 if (Ph->status() == Phi::PH_SingleVal) {
103 // Phi nodes to find the canonical definition.
104 // The non-const version will simplify incomplete Phi node
[all...]
H A DThreadSafetyCommon.cpp61 // Return true if E is a variable that points to an incomplete Phi node.
63 if (const auto *Ph = dyn_cast<til::Phi>(E))
64 return Ph->status() == til::Phi::PH_Incomplete;
302 if (auto *Ph = dyn_cast<til::Phi>(E))
666 // Make a Phi node in the current block for the i^th variable in CurrentVarMap.
667 // If E != null, sets Phi[CurrentBlockInfo->ArgIndex] = E.
675 // We already have a Phi node in the current block,
676 // so just add the new variable to the Phi node.
677 til::Phi *Ph = dyn_cast<til::Phi>(Curr
[all...]
/external/v8/src/compiler/
H A Ddiamond.h52 Node* Phi(MachineRepresentation rep, Node* tv, Node* fv) { function in struct:v8::internal::compiler::Diamond
53 return graph->NewNode(common->Phi(rep, 2), tv, fv, merge);
H A Dselect-lowering.cc36 NodeProperties::ChangeOp(node, common()->Phi(p.representation(), 2));
H A Deffect-control-linearizer.cc158 // materializing the bit for the Phi and may offer potential for further
159 // branch folding optimizations (i.e. because one or more inputs to the Phi is
160 // a constant). Note that there may be more Phi nodes hanging off the Merge,
161 // but we can only a certain subset of them currently (actually only Phi and
173 // | Phi
184 // The resulting graph (modulo the Phi and EffectPhi nodes) looks like this:
216 // Check/collect other Phi/EffectPhi nodes hanging off the Merge.
220 // We cannot currently deal with non-Phi/EffectPhi nodes hanging off the
226 // Right now we can only handle Phi/EffectPhi nodes whose uses are
837 value = graph()->NewNode(common()->Phi(MachineRepresentatio
[all...]
H A Djs-builtin-reducer.cc472 vfalse0 = graph()->NewNode(common()->Phi(MachineRepresentation::kTagged, 2),
475 graph()->NewNode(common()->Phi(MachineRepresentation::kTagged, 2),
492 graph()->NewNode(common()->Phi(MachineRepresentation::kTagged, 2),
495 graph()->NewNode(common()->Phi(MachineRepresentation::kTagged, 2),
631 vfalse0 = graph()->NewNode(common()->Phi(MachineRepresentation::kTagged, 2),
634 graph()->NewNode(common()->Phi(MachineRepresentation::kTagged, 2),
651 graph()->NewNode(common()->Phi(MachineRepresentation::kTagged, 2),
654 graph()->NewNode(common()->Phi(MachineRepresentation::kTagged, 2),
798 graph()->NewNode(common()->Phi(MachineRepresentation::kTagged, 2),
1564 graph()->NewNode(common()->Phi(MachineRepresentatio
[all...]
H A Djs-inlining-heuristic.cc237 common()->Phi(MachineRepresentation::kTagged, num_calls), num_calls + 1,
250 graph()->NewNode(common()->Phi(MachineRepresentation::kTagged, num_calls),
/external/llvm/lib/Transforms/Scalar/
H A DPartiallyInlineLibCalls.cpp55 PHINode *Phi = Builder.CreatePHI(Call->getType(), 2); local
56 Call->replaceAllUsesWith(Phi);
76 Phi->addIncoming(Call, &CurrBB);
77 Phi->addIncoming(LibCall, LibCallBB);
H A DIndVarSimplify.cpp586 // Do not count the Phi as a use. LCSSA may have inserted
627 for (const RewritePhi &Phi : RewritePhiSet) {
628 PHINode *PN = Phi.PN;
629 Value *ExitVal = Phi.Val;
633 if (ReplaceExitValue == OnlyCheapRepl && !LoopCanBeDel && Phi.HighCost) {
640 Instruction *Inst = cast<Instruction>(PN->getIncomingValue(Phi.Ith));
641 PN->setIncomingValue(Phi.Ith, ExitVal);
766 for (const RewritePhi &Phi : RewritePhiSet) {
767 unsigned i = Phi.Ith;
768 if (Phi
1602 PHINode *Phi = dyn_cast<PHINode>(IncI->getOperand(0)); local
1657 PHINode *Phi = dyn_cast<PHINode>(LHS); local
1718 AlmostDeadIV(PHINode *Phi, BasicBlock *LatchBlock, Value *Cond) argument
1758 PHINode *Phi = cast<PHINode>(I); local
[all...]
H A DStructurizeCFG.cpp574 PHINode &Phi = cast<PHINode>(*I++); local
575 while (Phi.getBasicBlockIndex(From) != -1) {
576 Value *Deleted = Phi.removeIncomingValue(From, false);
577 Map[&Phi].push_back(std::make_pair(From, Deleted));
587 PHINode &Phi = cast<PHINode>(*I++); local
588 Value *Undef = UndefValue::get(Phi.getType());
589 Phi.addIncoming(Undef, From);
608 PHINode *Phi = PI.first; local
609 Value *Undef = UndefValue::get(Phi->getType());
610 Updater.Initialize(Phi
[all...]
H A DGVN.cpp2438 PHINode *Phi = local
2443 Phi->addIncoming(V, predMap[i].second);
2445 Phi->addIncoming(PREInstr, PREPred);
2448 VN.add(Phi, ValNo);
2449 addToLeaderTable(ValNo, Phi, CurrentBlock);
2450 Phi->setDebugLoc(CurInst->getDebugLoc());
2451 CurInst->replaceAllUsesWith(Phi);
2452 if (MD && Phi->getType()->getScalarType()->isPointerTy())
2453 MD->invalidateCachedPointerInfo(Phi);
2633 PHINode &Phi local
[all...]
/external/llvm/include/llvm/Transforms/Utils/
H A DLoopUtils.h168 /// Returns true if Phi is a reduction of type Kind and adds it to the
170 static bool AddReductionVar(PHINode *Phi, RecurrenceKind Kind, Loop *TheLoop,
174 /// Returns true if Phi is a reduction in TheLoop. The RecurrenceDescriptor is
176 static bool isReductionPHI(PHINode *Phi, Loop *TheLoop,
179 /// Returns true if Phi is a first-order recurrence. A first-order recurrence
183 static bool isFirstOrderRecurrence(PHINode *Phi, Loop *TheLoop,
210 /// Determines if Phi may have been type-promoted. If Phi has a single user
211 /// that ANDs the Phi with a type mask, return the user. RT is updated to
214 static Instruction *lookThroughAnd(PHINode *Phi, Typ
[all...]
/external/swiftshader/third_party/LLVM/lib/Transforms/Scalar/
H A DIndVarSimplify.cpp831 assert(L->getHeader() == OrigPhi->getParent() && "Phi must be an IV");
1350 PHINode *Phi = dyn_cast<PHINode>(IncI->getOperand(0)); local
1351 if (Phi && Phi->getParent() == L->getHeader()) {
1353 return Phi;
1360 Phi = dyn_cast<PHINode>(IncI->getOperand(1));
1361 if (Phi && Phi->getParent() == L->getHeader()) {
1363 return Phi;
1400 PHINode *Phi local
1414 AlmostDeadIV(PHINode *Phi, BasicBlock *LatchBlock, Value *Cond) argument
1457 PHINode *Phi = cast<PHINode>(I); local
[all...]
/external/llvm/lib/Analysis/
H A DScalarEvolutionExpander.cpp939 // Check that the chain of IV operands leading back to Phi can be hoisted.
1023 const SCEVAddRecExpr *Phi,
1026 Type *PhiTy = SE.getEffectiveSCEVType(Phi->getType());
1033 Phi = dyn_cast<SCEVAddRecExpr>(SE.getTruncateOrNoop(Phi, RequestedTy));
1034 if (!Phi)
1038 if (Phi == Requested) {
1045 SE.getNegativeSCEV(Requested)) == Phi) {
1777 for (PHINode *Phi : Phis) {
1791 if (Value *V = SimplifyPHINode(Phi)) {
1022 canBeCheaplyTransformed(ScalarEvolution &SE, const SCEVAddRecExpr *Phi, const SCEVAddRecExpr *Requested, bool &InvertStep) argument
[all...]
/external/llvm/lib/Target/PowerPC/
H A DPPCBoolRetToInt.cpp141 const PHINode *Phi = dyn_cast<PHINode>(V);
142 return !Phi || Promotable.count(Phi);
/external/llvm/lib/CodeGen/
H A DMachinePipeliner.cpp49 // represent loop carried dependences in the DAG as order edges to the Phi
121 /// an unrelated Phi.
124 cl::desc("Prune dependences between unrelated Phi nodes."),
291 /// using an anti dependence from a Phi to an instruction.
325 // Instructions that feed a Phi have a distance of 1. Computing larger
410 unsigned PhiNum, MachineInstr *Phi,
540 /// second is true if the register defines a Phi value and loop value is
541 /// scheduled before the Phi.
650 /// The number of stages for a Phi is a little different than other
652 /// because we assume the Phi i
917 getPhiRegs(MachineInstr &Phi, MachineBasicBlock *Loop, unsigned &InitVal, unsigned &LoopVal) argument
933 getInitPhiReg(MachineInstr &Phi, MachineBasicBlock *LoopBB) argument
941 getLoopPhiReg(MachineInstr &Phi, MachineBasicBlock *LoopBB) argument
3246 rewriteScheduledInstr( MachineBasicBlock *BB, SMSchedule &Schedule, InstrMapTy &InstrMap, unsigned CurStageNum, unsigned PhiNum, MachineInstr *Phi, unsigned OldReg, unsigned NewReg, unsigned PrevReg) argument
3323 MachineInstr *Phi = MRI.getVRegDef(BaseReg); local
3766 isLoopCarried(SwingSchedulerDAG *SSD, MachineInstr &Phi) argument
[all...]
/external/llvm/lib/Target/Hexagon/
H A DHexagonHardwareLoops.cpp215 /// \brief Return true if the Phi may generate a value that may underflow,
217 bool phiMayWrapOrUnderflow(MachineInstr *Phi, const MachineOperand *EndVal,
409 MachineInstr *Phi = &*I; local
414 for (unsigned i = 1, n = Phi->getNumOperands(); i < n; i += 2) {
415 if (Phi->getOperand(i+1).getMBB() != Latch)
418 unsigned PhiOpReg = Phi->getOperand(i).getReg();
429 if (MRI->getVRegDef(IndReg) == Phi && checkForImmediate(Opnd2, V)) {
1347 /// Return true if a Phi may generate a value that can underflow.
1348 /// This function calls loopCountMayWrapOrUnderFlow for each Phi operand.
1350 MachineInstr *Phi, cons
1349 phiMayWrapOrUnderflow( MachineInstr *Phi, const MachineOperand *EndVal, MachineBasicBlock *MBB, MachineLoop *L, LoopFeederMap &LoopFeederPhi) const argument
1592 MachineInstr *Phi = &*I; local
[all...]
H A DRDFLiveness.cpp140 assert(IA.Addr->getKind() == NodeAttrs::Phi);
203 bool IsPhi = DFG.IsCode<NodeAttrs::Phi>(TA);
212 // phi d1<R3>(,d2,), ... Phi def d1 is covered by d2.
331 auto Ps = BA.Addr->members_if(DFG.IsCode<NodeAttrs::Phi>, DFG);
422 // the set of registers defined between this phi (Phi) and the owner phi
440 dbgs() << "Phi-up-to-phi map:\n";
571 for (auto P : BA.Addr->members_if(DFG.IsCode<NodeAttrs::Phi>, DFG))
577 dbgs() << "Phi live-on-entry map:\n";
587 auto Phis = BA.Addr->members_if(DFG.IsCode<NodeAttrs::Phi>, DFG);
620 dbgs() << "Phi liv
[all...]
/external/llvm/lib/Transforms/Vectorize/
H A DLoopVectorize.cpp353 void fixFirstOrderRecurrence(PHINode *Phi);
1397 /// Returns True if Phi is a first-order recurrence in this loop.
1398 bool isFirstOrderRecurrence(const PHINode *Phi);
1504 /// Updates the vectorization state by adding \p Phi to the inductions list.
1505 /// This can set \p Phi as the main induction of the loop if \p Phi is a
1507 void addInductionPhi(PHINode *Phi, const InductionDescriptor &ID,
2035 PHINode *Phi = dyn_cast_or_null<PHINode>(Ptr);
2036 if (Phi && Inductions.count(Phi)) {
3737 fixFirstOrderRecurrence(PHINode *Phi) argument
4326 auto *Phi = dyn_cast<PHINode>(&I); local
4535 addInductionPhi( PHINode *Phi, const InductionDescriptor &ID, SmallPtrSetImpl<Value *> &AllowedExit) argument
4852 isFirstOrderRecurrence(const PHINode *Phi) argument
5834 auto *Phi = cast<PHINode>(I); local
[all...]
/external/llvm/lib/Transforms/InstCombine/
H A DInstCombinePHI.cpp393 Instruction *InstCombiner::FoldPHIArgZextsIntoPHI(PHINode &Phi) { argument
396 if (TerminatorInst *TI = Phi.getParent()->getTerminator())
403 unsigned NumIncomingValues = Phi.getNumIncomingValues();
409 for (Value *V : Phi.incoming_values()) {
423 for (Value *V : Phi.incoming_values()) {
456 Phi.getName() + ".shrunk");
458 NewPhi->addIncoming(NewIncoming[i], Phi.getIncomingBlock(i));
460 InsertNewInstBefore(NewPhi, Phi);
461 return CastInst::CreateZExtOrBitCast(NewPhi, Phi.getType());
/external/swiftshader/third_party/LLVM/lib/Analysis/
H A DScalarEvolutionExpander.cpp1528 PHINode *Phi = cast<PHINode>(I); local
1529 if (!SE.isSCEVable(Phi->getType()))
1532 PHINode *&OrigPhiRef = ExprToIVMap[SE.getSCEV(Phi)];
1534 OrigPhiRef = Phi;
1540 if (OrigPhiRef->getType() != Phi->getType())
1547 cast<Instruction>(Phi->getIncomingValueForBlock(LatchBlock));
1551 && isExpandedAddRecExprPHI(Phi, IsomorphicInc, L)) {
1552 std::swap(OrigPhiRef, Phi);
1572 << "INDVARS: Eliminated congruent iv: " << *Phi << '\n');
1574 Phi
[all...]

Completed in 431 milliseconds

1234