/external/llvm/lib/Transforms/InstCombine/ |
InstCombinePHI.cpp | 24 Instruction *InstCombiner::FoldPHIArgBinOpIntoPHI(PHINode &PN) { 25 Instruction *FirstInst = cast<Instruction>(PN.getIncomingValue(0)); 44 for (unsigned i = 1; i != PN.getNumIncomingValues(); ++i) { 45 Instruction *I = dyn_cast<Instruction>(PN.getIncomingValue(i)); 83 NewLHS = PHINode::Create(LHSType, PN.getNumIncomingValues(), 84 FirstInst->getOperand(0)->getName() + ".pn"); 85 NewLHS->addIncoming(InLHS, PN.getIncomingBlock(0)); 86 InsertNewInstBefore(NewLHS, PN); 91 NewRHS = PHINode::Create(RHSType, PN.getNumIncomingValues(), 92 FirstInst->getOperand(1)->getName() + ".pn"); [all...] |
/external/llvm/lib/VMCore/ |
BasicBlock.cpp | 250 while (PHINode *PN = dyn_cast<PHINode>(&front())) { 252 PN->removeIncomingValue(Pred, !DontDeleteUselessPHIs); 256 if (PN->getIncomingValue(0) != PN) 257 PN->replaceAllUsesWith(PN->getIncomingValue(0)); 260 PN->replaceAllUsesWith(UndefValue::get(PN->getType())); 270 PHINode *PN; 271 for (iterator II = begin(); (PN = dyn_cast<PHINode>(II)); ) [all...] |
/external/llvm/lib/Transforms/Utils/ |
LoopSimplify.cpp | 265 PHINode *PN; 267 (PN = dyn_cast<PHINode>(I++)); ) 268 if (Value *V = SimplifyInstruction(PN, 0, DT)) { 269 if (AA) AA->deleteValue(PN); 270 if (SE) SE->forgetValue(PN); 271 PN->replaceAllUsesWith(V); 272 PN->eraseFromParent(); 457 PHINode *PN = cast<PHINode>(I); 459 if (Value *V = SimplifyInstruction(PN, 0, DT)) { 461 PN->replaceAllUsesWith(V) [all...] |
BasicBlockUtils.cpp | 77 while (PHINode *PN = dyn_cast<PHINode>(BB->begin())) { 78 if (PN->getIncomingValue(0) != PN) 79 PN->replaceAllUsesWith(PN->getIncomingValue(0)); 81 PN->replaceAllUsesWith(UndefValue::get(PN->getType())); 84 MemDep->removeInstruction(PN); // Memdep updates AA itself. 85 else if (AA && isa<PointerType>(PN->getType())) 86 AA->deleteValue(PN); [all...] |
DemoteRegToStack.cpp | 54 if (PHINode *PN = dyn_cast<PHINode>(U)) { 65 for (unsigned i = 0, e = PN->getNumIncomingValues(); i != e; ++i) 66 if (PN->getIncomingValue(i) == &I) { 67 Value *&V = Loads[PN->getIncomingBlock(i)]; 71 PN->getIncomingBlock(i)->getTerminator()); 73 PN->setIncomingValue(i, V);
|
UnifyFunctionExitNodes.cpp | 114 PHINode *PN = 0; 119 PN = PHINode::Create(F.getReturnType(), ReturningBlocks.size(), 121 NewRetBlock->getInstList().push_back(PN); 122 ReturnInst::Create(F.getContext(), PN, NewRetBlock); 134 if (PN) 135 PN->addIncoming(BB->getTerminator()->getOperand(0), BB);
|
LCSSA.cpp | 188 if (PHINode *PN = dyn_cast<PHINode>(U)) 189 UserBB = PN->getIncomingBlock(UI); 225 PHINode *PN = PHINode::Create(Inst->getType(), 232 PN->addIncoming(Inst, *PI); 239 &PN->getOperandUse( 240 PN->getOperandNumForIncomingValue(PN->getNumIncomingValues()-1))); 243 AddedPHIs.push_back(PN); 246 SSAUpdate.AddAvailableValue(ExitBB, PN); 258 if (PHINode *PN = dyn_cast<PHINode>(User) [all...] |
BreakCriticalEdges.cpp | 134 PHINode *PN = dyn_cast<PHINode>(I); ++I) { 135 unsigned Idx = PN->getBasicBlockIndex(SplitBB); 136 Value *V = PN->getIncomingValue(Idx); 143 PHINode *NewPN = PHINode::Create(PN->getType(), Preds.size(), "split", 148 PN->setIncomingValue(Idx, NewPN); 207 PHINode *PN = cast<PHINode>(I); 214 if (PN->getIncomingBlock(BBIdx) != TIBB) 215 BBIdx = PN->getBasicBlockIndex(TIBB); 216 PN->setIncomingBlock(BBIdx, NewBB); 257 if (PHINode *PN = dyn_cast<PHINode>(DestBB->begin())) [all...] |
Local.cpp | 323 bool llvm::RecursivelyDeleteDeadPHINode(PHINode *PN) { 325 for (Instruction *I = PN; areAllUsesEqual(I) && !I->mayHaveSideEffects(); 400 while (PHINode *PN = dyn_cast<PHINode>(PhiIt)) { 403 Value *PNV = SimplifyInstruction(PN, TD); 408 assert(PNV != PN && "SimplifyInstruction broken!"); 411 ReplaceAndSimplifyAllUses(PN, PNV, TD); 428 while (PHINode *PN = dyn_cast<PHINode>(DestBB->begin())) { 429 Value *NewVal = PN->getIncomingValue(0); 431 if (NewVal == PN) NewVal = UndefValue::get(PN->getType()) [all...] |
CloneFunction.cpp | 401 if (PHINode *PN = dyn_cast<PHINode>(I)) { 404 for (; (PN = dyn_cast<PHINode>(I)); ++I, ++OldI) 427 PHINode *PN = cast<PHINode>(VMap[OPN]); 429 Value *V = VMap[PN->getIncomingBlock(pred)]; 431 Value *InVal = MapValue(PN->getIncomingValue(pred), 435 PN->setIncomingValue(pred, InVal); 436 PN->setIncomingBlock(pred, MappedBlock); 438 PN->removeIncomingValue(pred, false); 449 PHINode *PN = cast<PHINode>(NewBB->begin()); 451 if (NumPreds != PN->getNumIncomingValues()) [all...] |
CodeExtractor.cpp | 111 PHINode *PN = dyn_cast<PHINode>(Header->begin()); 112 if (!PN) return; // No PHI nodes. 117 for (unsigned i = 0, e = PN->getNumIncomingValues(); i != e; ++i) 118 if (BlocksToExtract.count(PN->getIncomingBlock(i))) 151 PHINode *PN = cast<PHINode>(OldPred->begin()); 154 for (unsigned i = 0, e = PN->getNumIncomingValues(); i != e; ++i) 155 if (BlocksToExtract.count(PN->getIncomingBlock(i))) { 156 TerminatorInst *TI = PN->getIncomingBlock(i)->getTerminator(); 163 PHINode *PN = cast<PHINode>(AfterPHIs); 165 // from OldPred of PN [all...] |
LoopUnroll.cpp | 50 if (PHINode *PN = dyn_cast<PHINode>(I)) { 51 for (unsigned i = 0, e = PN->getNumIncomingValues(); i != e; ++i) { 52 ValueToValueMapTy::iterator It = VMap.find(PN->getIncomingBlock(i)); 54 PN->setIncomingBlock(i, cast<BasicBlock>(It->second)); 306 PHINode *PN = OrigPHINode[i]; 308 PN->replaceAllUsesWith(PN->getIncomingValueForBlock(Preheader)); 309 Header->getInstList().erase(PN); 312 Value *InVal = PN->removeIncomingValue(LatchBlock, false); 320 PN->addIncoming(InVal, Latches.back()) [all...] |
LowerSwitch.cpp | 219 PHINode* PN = cast<PHINode>(I); 224 PN->removeIncomingValue(OrigBlock); 227 int BlockIdx = PN->getBasicBlockIndex(OrigBlock); 229 PN->setIncomingBlock((unsigned)BlockIdx, NewLeaf); 300 PHINode *PN = cast<PHINode>(I); 301 int BlockIdx = PN->getBasicBlockIndex(OrigBlock); 303 PN->setIncomingBlock((unsigned)BlockIdx, NewDefault);
|
SimplifyCFG.cpp | 98 PHINode *PN = cast<PHINode>(BBI); 99 if (PN->getIncomingValueForBlock(SI1BB) != 100 PN->getIncomingValueForBlock(SI2BB)) 115 PHINode *PN; 117 (PN = dyn_cast<PHINode>(I)); ++I) 118 PN->addIncoming(PN->getIncomingValueForBlock(ExistPred), NewPred); [all...] |
/external/llvm/lib/Analysis/ |
SparsePropagation.cpp | 229 void SparseSolver::visitPHINode(PHINode &PN) { 233 if (LatticeFunc->IsSpecialCasedPHI(&PN)) { 234 LatticeVal IV = LatticeFunc->ComputeInstructionState(PN, *this); 236 UpdateState(PN, IV); 240 LatticeVal PNIV = getOrInitValueState(&PN); 249 if (PN.getNumIncomingValues() > 64) { 250 UpdateState(PN, Overdefined); 257 for (unsigned i = 0, e = PN.getNumIncomingValues(); i != e; ++i) { 259 if (!isEdgeFeasible(PN.getIncomingBlock(i), PN.getParent(), true) [all...] |
ScalarEvolutionNormalization.cpp | 47 PHINode *PN = dyn_cast<PHINode>(User); 48 if (!PN || !Operand) return false; // not a phi, not dominated by latch block. 53 for (unsigned i = 0, e = PN->getNumIncomingValues(); i != e; ++i) 54 if (PN->getIncomingValue(i) == Operand && 55 !DT->dominates(LatchBlock, PN->getIncomingBlock(i))) 58 // Okay, all uses of Operand by PN are in predecessor blocks that really are
|
ScalarEvolutionExpander.cpp | [all...] |
/external/llvm/lib/Transforms/Scalar/ |
LoopRotation.cpp | 93 for (I = OrigHeader->begin(); PHINode *PN = dyn_cast<PHINode>(I); ++I) 94 PN->removeIncomingValue(PN->getBasicBlockIndex(OrigPreheader)); 222 for (; PHINode *PN = dyn_cast<PHINode>(I); ++I) 223 ValueMap[PN] = PN->getIncomingValueForBlock(OrigPreheader); 274 PHINode *PN = dyn_cast<PHINode>(BI); ++BI) 275 PN->addIncoming(PN->getIncomingValueForBlock(OrigHeader), OrigPreheader);
|
JumpThreading.cpp | 125 bool ProcessBranchOnPHI(PHINode *PN); 363 if (PHINode *PN = dyn_cast<PHINode>(I)) { 364 for (unsigned i = 0, e = PN->getNumIncomingValues(); i != e; ++i) { 365 Value *InVal = PN->getIncomingValue(i); 367 Result.push_back(std::make_pair(KC, PN->getIncomingBlock(i))); 370 PN->getIncomingBlock(i), BB); 372 Result.push_back(std::make_pair(KC, PN->getIncomingBlock(i))); 468 PHINode *PN = dyn_cast<PHINode>(Cmp->getOperand(0)); 469 if (PN && PN->getParent() == BB) [all...] |
CodeGenPrepare.cpp | 223 while (const PHINode *PN = dyn_cast<PHINode>(BBI++)) { 224 for (Value::const_use_iterator UI = PN->use_begin(), E = PN->use_end(); 265 while (const PHINode *PN = dyn_cast<PHINode>(BBI++)) { 266 const Value *V1 = PN->getIncomingValueForBlock(Pred); 267 const Value *V2 = PN->getIncomingValueForBlock(BB); 311 PHINode *PN; 313 (PN = dyn_cast<PHINode>(BBI)); ++BBI) { 315 Value *InVal = PN->removeIncomingValue(BB, false); 323 PN->addIncoming(InValPhi->getIncomingValue(i) [all...] |
IndVarSimplify.cpp | 253 void IndVarSimplify::HandleFloatingPointIV(Loop *L, PHINode *PN) { 254 unsigned IncomingEdge = L->contains(PN->getIncomingBlock(0)); 259 dyn_cast<ConstantFP>(PN->getIncomingValue(IncomingEdge)); 265 // Check IV increment. Reject this PN if increment operation is not 268 dyn_cast<BinaryOperator>(PN->getIncomingValue(BackEdge)); 275 if (IncValueVal == 0 || Incr->getOperand(0) != PN || 279 // Check Incr uses. One user is PN and the other user is an exit condition 405 IntegerType *Int32Ty = Type::getInt32Ty(PN->getContext()); 408 PHINode *NewPHI = PHINode::Create(Int32Ty, 2, PN->getName()+".int", PN); [all...] |
/frameworks/base/core/java/android/content/ |
ComponentName.java | 103 int PN = mPackage.length(); 105 if (CN > PN && mClass.charAt(PN) == '.') { 106 return mClass.substring(PN, CN);
|
/external/llvm/lib/CodeGen/ |
DwarfEHPrepare.cpp | 223 } else if (PHINode *PN = dyn_cast<PHINode>(II)) { 224 if (SeenPHIs.insert(PN)) 226 Changed |= FindSelectorAndURoR(PN, URoRInvoke, SelCalls, SeenPHIs); 425 PHINode *PN = cast<PHINode>(II); 430 Value *InVal = PN->getIncomingValueForBlock(*PB); 432 if (PI != PB && InVal != PN->getIncomingValueForBlock(*PI)) { 441 PHINode *NewPN = PHINode::Create(PN->getType(), 442 PN->getNumIncomingValues(), 443 PN->getName()+".unwind", NewBB); 446 NewPN->addIncoming(PN->getIncomingValueForBlock(*PI), *PI) [all...] |
/external/llvm/lib/CodeGen/SelectionDAG/ |
FunctionLoweringInfo.cpp | 156 const PHINode *PN = dyn_cast<PHINode>(I); ++I) { 157 if (PN->use_empty()) continue; 160 if (PN->getType()->isEmptyTy()) 163 DebugLoc DL = PN->getDebugLoc(); 164 unsigned PHIReg = ValueMap[PN]; 168 ComputeValueVTs(TLI, PN->getType(), ValueVTs); 262 void FunctionLoweringInfo::ComputePHILiveOutRegInfo(const PHINode *PN) { 263 Type *Ty = PN->getType(); 273 if (TLI.getNumRegisters(PN->getContext(), IntVT) != 1) 275 IntVT = TLI.getTypeToTransformTo(PN->getContext(), IntVT) [all...] |
/external/llvm/include/llvm/CodeGen/ |
FunctionLoweringInfo.h | 191 void InvalidatePHILiveOutRegInfo(const PHINode *PN) { 193 DenseMap<const Value*, unsigned>::const_iterator It = ValueMap.find(PN);
|