/external/llvm/lib/CodeGen/ |
D | IfConversion.cpp | 140 BBInfo &BBI; member 146 : BBI(b), Kind(k), NeedSubsumption(s), NumDups(d), NumDups2(d2) {} in IfcvtToken() 175 bool ReverseBranchCondition(BBInfo &BBI); 183 void ScanInstructions(BBInfo &BBI); 186 bool FeasibilityAnalysis(BBInfo &BBI, SmallVectorImpl<MachineOperand> &Cond, 190 void RemoveExtraEdges(BBInfo &BBI); 191 bool IfConvertSimple(BBInfo &BBI, IfcvtKind Kind); 192 bool IfConvertTriangle(BBInfo &BBI, IfcvtKind Kind); 193 bool IfConvertDiamond(BBInfo &BBI, IfcvtKind Kind, 195 void PredicateBlock(BBInfo &BBI, [all …]
|
D | StrongPHIElimination.cpp | 241 for (MachineBasicBlock::iterator BBI = I->begin(), BBE = I->end(); in runOnMachineFunction() local 242 BBI != BBE && BBI->isPHI(); ++BBI) { in runOnMachineFunction() 243 unsigned DestReg = BBI->getOperand(0).getReg(); in runOnMachineFunction() 245 PHISrcDefs[I].push_back(BBI); in runOnMachineFunction() 247 for (unsigned i = 1; i < BBI->getNumOperands(); i += 2) { in runOnMachineFunction() 248 MachineOperand &SrcMO = BBI->getOperand(i); in runOnMachineFunction() 274 for (MachineBasicBlock::iterator BBI = I->begin(), BBE = I->end(); in runOnMachineFunction() local 275 BBI != BBE && BBI->isPHI(); ++BBI) { in runOnMachineFunction() 276 InsertCopiesForPHI(BBI, I); in runOnMachineFunction() 285 for (MachineBasicBlock::iterator BBI = I->begin(), BBE = I->end(); in runOnMachineFunction() local [all …]
|
D | PHIElimination.cpp | 395 for (MachineBasicBlock::const_iterator BBI = I->begin(), BBE = I->end(); in analyzePHINodes() local 396 BBI != BBE && BBI->isPHI(); ++BBI) in analyzePHINodes() 397 for (unsigned i = 1, e = BBI->getNumOperands(); i != e; i += 2) in analyzePHINodes() 398 ++VRegPHIUseCount[BBVRegPair(BBI->getOperand(i+1).getMBB()->getNumber(), in analyzePHINodes() 399 BBI->getOperand(i).getReg())]; in analyzePHINodes() 410 for (MachineBasicBlock::const_iterator BBI = MBB.begin(), BBE = MBB.end(); in SplitPHIEdges() local 411 BBI != BBE && BBI->isPHI(); ++BBI) { in SplitPHIEdges() 412 for (unsigned i = 1, e = BBI->getNumOperands(); i != e; i += 2) { in SplitPHIEdges() 413 unsigned Reg = BBI->getOperand(i).getReg(); in SplitPHIEdges() 414 MachineBasicBlock *PreMBB = BBI->getOperand(i+1).getMBB(); in SplitPHIEdges()
|
D | Analysis.cpp | 230 for (BasicBlock::const_iterator BBI = prior(prior(ExitBB->end())); ; in isInTailCallPosition() local 231 --BBI) { in isInTailCallPosition() 232 if (&*BBI == I) in isInTailCallPosition() 235 if (isa<DbgInfoIntrinsic>(BBI)) in isInTailCallPosition() 237 if (BBI->mayHaveSideEffects() || BBI->mayReadFromMemory() || in isInTailCallPosition() 238 !BBI->isSafeToSpeculativelyExecute()) in isInTailCallPosition()
|
D | LiveVariables.cpp | 678 for (MachineBasicBlock::const_iterator BBI = I->begin(), BBE = I->end(); in analyzePHINodes() local 679 BBI != BBE && BBI->isPHI(); ++BBI) in analyzePHINodes() 680 for (unsigned i = 1, e = BBI->getNumOperands(); i != e; i += 2) in analyzePHINodes() 681 PHIVarInfo[BBI->getOperand(i + 1).getMBB()->getNumber()] in analyzePHINodes() 682 .push_back(BBI->getOperand(i).getReg()); in analyzePHINodes() 757 for (MachineBasicBlock::const_iterator BBI = SuccBB->begin(), in addNewBlock() local 758 BBE = SuccBB->end(); BBI != BBE && BBI->isPHI(); ++BBI) in addNewBlock() 759 for (unsigned i = 1, e = BBI->getNumOperands(); i != e; i += 2) in addNewBlock() 760 if (BBI->getOperand(i+1).getMBB() == BB) in addNewBlock() 761 getVarInfo(BBI->getOperand(i).getReg()).AliveBlocks.set(NumNew); in addNewBlock()
|
D | GCStrategy.cpp | 376 for (MachineFunction::iterator BBI = MF.begin(), in FindSafePoints() local 377 BBE = MF.end(); BBI != BBE; ++BBI) in FindSafePoints() 378 for (MachineBasicBlock::iterator MI = BBI->begin(), in FindSafePoints() 379 ME = BBI->end(); MI != ME; ++MI) in FindSafePoints()
|
D | MachineVerifier.cpp | 894 for (MachineBasicBlock::const_iterator BBI = MBB->begin(), BBE = MBB->end(); in checkPHIOps() local 895 BBI != BBE && BBI->isPHI(); ++BBI) { in checkPHIOps() 898 for (unsigned i = 1, e = BBI->getNumOperands(); i != e; i += 2) { in checkPHIOps() 899 unsigned Reg = BBI->getOperand(i).getReg(); in checkPHIOps() 900 const MachineBasicBlock *Pre = BBI->getOperand(i + 1).getMBB(); in checkPHIOps() 907 &BBI->getOperand(i), i); in checkPHIOps() 914 report("Missing PHI operand", BBI); in checkPHIOps()
|
/external/llvm/lib/Transforms/InstCombine/ |
D | InstCombineLoadStoreAlloca.cpp | 172 BasicBlock::iterator BBI = &LI; in visitLoadInst() local 173 if (Value *AvailableVal = FindAvailableLoadedValue(Op, LI.getParent(), BBI,6)) in visitLoadInst() 406 BasicBlock::iterator BBI = &SI; in visitStoreInst() local 407 for (unsigned ScanInsts = 6; BBI != SI.getParent()->begin() && ScanInsts; in visitStoreInst() 409 --BBI; in visitStoreInst() 412 if (isa<DbgInfoIntrinsic>(BBI) || in visitStoreInst() 413 (isa<BitCastInst>(BBI) && BBI->getType()->isPointerTy())) { in visitStoreInst() 418 if (StoreInst *PrevSI = dyn_cast<StoreInst>(BBI)) { in visitStoreInst() 423 ++BBI; in visitStoreInst() 433 if (LoadInst *LI = dyn_cast<LoadInst>(BBI)) { in visitStoreInst() [all …]
|
D | InstCombineMulDivRem.cpp | 329 BasicBlock::iterator BBI = &I, BBFront = I.getParent()->begin(); in SimplifyDivRemOfSelect() local 331 while (BBI != BBFront) { in SimplifyDivRemOfSelect() 332 --BBI; in SimplifyDivRemOfSelect() 335 if (isa<CallInst>(BBI) && !isa<IntrinsicInst>(BBI)) in SimplifyDivRemOfSelect() 339 for (Instruction::op_iterator I = BBI->op_begin(), E = BBI->op_end(); in SimplifyDivRemOfSelect() 343 Worklist.Add(BBI); in SimplifyDivRemOfSelect() 345 *I = NonNullOperand == 1 ? ConstantInt::getTrue(BBI->getContext()) : in SimplifyDivRemOfSelect() 346 ConstantInt::getFalse(BBI->getContext()); in SimplifyDivRemOfSelect() 347 Worklist.Add(BBI); in SimplifyDivRemOfSelect() 352 if (&*BBI == SI) in SimplifyDivRemOfSelect() [all …]
|
/external/llvm/lib/Transforms/Scalar/ |
D | SimplifyCFGPass.cpp | 82 BasicBlock::iterator BBI = I, BBE = BB->end(); in ChangeToUnreachable() local 83 while (BBI != BBE) { in ChangeToUnreachable() 84 if (!BBI->use_empty()) in ChangeToUnreachable() 85 BBI->replaceAllUsesWith(UndefValue::get(BBI->getType())); in ChangeToUnreachable() 86 BB->getInstList().erase(BBI++); in ChangeToUnreachable() 124 for (BasicBlock::iterator BBI = BB->begin(), E = BB->end(); BBI != E;++BBI){ in MarkAliveBlocks() local 125 if (CallInst *CI = dyn_cast<CallInst>(BBI)) { in MarkAliveBlocks() 130 ++BBI; in MarkAliveBlocks() 131 if (!isa<UnreachableInst>(BBI)) { in MarkAliveBlocks() 133 ChangeToUnreachable(BBI, false); in MarkAliveBlocks() [all …]
|
D | DeadStoreElimination.cpp | 425 for (BasicBlock::iterator BBI = BB.begin(), BBE = BB.end(); BBI != BBE; ) { in runOnBasicBlock() local 426 Instruction *Inst = BBI++; in runOnBasicBlock() 456 WeakVH NextInst(BBI); in runOnBasicBlock() 461 BBI = BB.begin(); in runOnBasicBlock() 462 else if (BBI != BB.begin()) // Revisit this instruction if possible. in runOnBasicBlock() 463 --BBI; in runOnBasicBlock() 507 BBI = Inst; in runOnBasicBlock() 508 if (BBI != BB.begin()) in runOnBasicBlock() 509 --BBI; in runOnBasicBlock() 601 for (BasicBlock::iterator BBI = BB.end(); BBI != BB.begin(); ){ in handleEndBlock() local [all …]
|
D | TailRecursionElimination.cpp | 309 for (Function::iterator BBI = F->begin(), E = F->end(); BBI != E; ++BBI) { in getCommonReturnValue() local 310 ReturnInst *RI = dyn_cast<ReturnInst>(BBI->getTerminator()); in getCommonReturnValue() 371 BasicBlock::iterator BBI = TI; in FindTRECandidate() local 373 CI = dyn_cast<CallInst>(BBI); in FindTRECandidate() 377 if (BBI == BB->begin()) in FindTRECandidate() 379 --BBI; in FindTRECandidate() 432 BasicBlock::iterator BBI = CI; in EliminateRecursiveTailCall() local 433 for (++BBI; &*BBI != Ret; ++BBI) { in EliminateRecursiveTailCall() 434 if (CanMoveAboveCall(BBI, CI)) continue; in EliminateRecursiveTailCall() 441 CanTransformAccumulatorRecursion(BBI, CI))) { in EliminateRecursiveTailCall() [all …]
|
D | CodeGenPrepare.cpp | 181 BasicBlock::iterator BBI = BI; in EliminateMostlyEmptyBlocks() local 182 if (BBI != BB->begin()) { in EliminateMostlyEmptyBlocks() 183 --BBI; in EliminateMostlyEmptyBlocks() 184 while (isa<DbgInfoIntrinsic>(BBI)) { in EliminateMostlyEmptyBlocks() 185 if (BBI == BB->begin()) in EliminateMostlyEmptyBlocks() 187 --BBI; in EliminateMostlyEmptyBlocks() 189 if (!isa<DbgInfoIntrinsic>(BBI) && !isa<PHINode>(BBI)) in EliminateMostlyEmptyBlocks() 215 BasicBlock::const_iterator BBI = BB->begin(); in CanMergeBlocks() local 216 while (const PHINode *PN = dyn_cast<PHINode>(BBI++)) { in CanMergeBlocks() 257 BBI = DestBB->begin(); in CanMergeBlocks() [all …]
|
D | Reassociate.cpp | 104 void ReassociateInst(BasicBlock::iterator &BBI); 971 void Reassociate::ReassociateInst(BasicBlock::iterator &BBI) { in ReassociateInst() argument 972 Instruction *BI = BBI++; in ReassociateInst() 1001 BBI = BI; in ReassociateInst() 1002 ++BBI; in ReassociateInst() 1102 for (BasicBlock::iterator BBI = FI->begin(); BBI != FI->end(); ) in runOnFunction() local 1103 ReassociateInst(BBI); in runOnFunction() 1109 BasicBlock::iterator BBI = cast<Instruction>(V); in runOnFunction() local 1110 ReassociateInst(BBI); in runOnFunction()
|
D | TailDuplication.cpp | 260 BasicBlock::iterator BBI = DestBlock->getFirstNonPHI(); in eliminateUnconditionalBranch() local 261 while (!isa<TerminatorInst>(BBI)) { in eliminateUnconditionalBranch() 262 Instruction *I = BBI++; in eliminateUnconditionalBranch()
|
/external/llvm/lib/Analysis/ |
D | Loads.cpp | 130 BasicBlock::iterator BBI = ScanFrom, E = ScanFrom->getParent()->begin(); in isSafeToLoadUnconditionally() local 132 while (BBI != E) { in isSafeToLoadUnconditionally() 133 --BBI; in isSafeToLoadUnconditionally() 137 if (isa<CallInst>(BBI) && BBI->mayWriteToMemory() && in isSafeToLoadUnconditionally() 138 !isa<DbgInfoIntrinsic>(BBI)) in isSafeToLoadUnconditionally() 141 if (LoadInst *LI = dyn_cast<LoadInst>(BBI)) { in isSafeToLoadUnconditionally() 143 } else if (StoreInst *SI = dyn_cast<StoreInst>(BBI)) { in isSafeToLoadUnconditionally()
|
D | LazyValueInfo.cpp | 413 Instruction *BBI, BasicBlock *BB); 540 Instruction *BBI = dyn_cast<Instruction>(Val); in solveBlockValue() local 541 if (BBI == 0 || BBI->getParent() != BB) { in solveBlockValue() 545 if (PHINode *PN = dyn_cast<PHINode>(BBI)) { in solveBlockValue() 549 if (AllocaInst *AI = dyn_cast<AllocaInst>(BBI)) { in solveBlockValue() 557 if ((!isa<BinaryOperator>(BBI) && !isa<CastInst>(BBI)) || in solveBlockValue() 558 !BBI->getType()->isIntegerTy()) { in solveBlockValue() 567 BinaryOperator *BO = dyn_cast<BinaryOperator>(BBI); in solveBlockValue() 576 return ODCacheUpdater.markResult(solveBlockValueConstantRange(BBLV, BBI, BB)); in solveBlockValue() 715 Instruction *BBI, in solveBlockValueConstantRange() argument [all …]
|
D | ProfileEstimatorPass.cpp | 366 for (std::set<BasicBlock*>::iterator BBI = BBToVisit.begin(), BBE = BBToVisit.end(); in runOnFunction() local 367 (BBI != BBE) && (!found); ++BBI) { in runOnFunction() 368 BasicBlock *BB = *BBI; in runOnFunction()
|
/external/llvm/lib/Transforms/Utils/ |
D | LCSSA.cpp | 137 for (Loop::block_iterator BBI = L->block_begin(), E = L->block_end(); in runOnLoop() local 138 BBI != E; ++BBI) { in runOnLoop() 139 BasicBlock *BB = *BBI; in runOnLoop() 217 for (SmallVectorImpl<BasicBlock*>::const_iterator BBI = ExitBlocks.begin(), in ProcessInstruction() local 218 BBE = ExitBlocks.end(); BBI != BBE; ++BBI) { in ProcessInstruction() 219 BasicBlock *ExitBB = *BBI; in ProcessInstruction()
|
D | SimplifyCFG.cpp | 95 for (BasicBlock::iterator BBI = (*I)->begin(); in SafeToMergeTerminators() local 96 isa<PHINode>(BBI); ++BBI) { in SafeToMergeTerminators() 97 PHINode *PN = cast<PHINode>(BBI); in SafeToMergeTerminators() 824 for (BasicBlock::iterator BBI = SI->begin(); in isSafeToHoistInvoke() local 825 (PN = dyn_cast<PHINode>(BBI)); ++BBI) { in isSafeToHoistInvoke() 920 for (BasicBlock::iterator BBI = SI->begin(); in HoistThenElseCodeToIf() local 921 (PN = dyn_cast<PHINode>(BBI)); ++BBI) { in HoistThenElseCodeToIf() 958 for (BasicBlock::iterator BBI = BB1->begin(), BBE = BB1->end(); in SpeculativelyExecuteBB() local 959 BBI != BBE; ++BBI) { in SpeculativelyExecuteBB() 960 Instruction *I = BBI; in SpeculativelyExecuteBB() [all …]
|
D | LoopUnroll.cpp | 261 for (BasicBlock::iterator BBI = (*SI)->begin(); in UnrollLoop() local 262 PHINode *phi = dyn_cast<PHINode>(BBI); ++BBI) { in UnrollLoop() 300 for (BasicBlock::iterator BBI = (*SI)->begin(); in UnrollLoop() local 301 PHINode *PN = dyn_cast<PHINode>(BBI); ++BBI) { in UnrollLoop()
|
D | LoopSimplify.cpp | 465 Function::iterator BBI = NewBB; --BBI; in PlaceSplitBlockCarefully() local 467 if (&*BBI == SplitPreds[i]) in PlaceSplitBlockCarefully() 479 Function::iterator BBI = SplitPreds[i]; in PlaceSplitBlockCarefully() local 480 if (++BBI != NewBB->getParent()->end() && in PlaceSplitBlockCarefully() 481 L->contains(BBI)) { in PlaceSplitBlockCarefully()
|
D | PromoteMemoryToRegister.cpp | 175 for (BasicBlock::const_iterator BBI = BB->begin(), E = BB->end(); in getInstructionIndex() local 176 BBI != E; ++BBI) in getInstructionIndex() 177 if (isInterestingInstruction(BBI)) in getInstructionIndex() 178 InstNumbers[BBI] = InstNo++; in getInstructionIndex() 650 BasicBlock::iterator BBI = BB->begin(); in run() local 651 while ((SomePHI = dyn_cast<PHINode>(BBI++)) && in run()
|
/external/llvm/lib/Transforms/IPO/ |
D | LoopExtractor.cpp | 208 Function::iterator BBI = MF->begin(); in runOnModule() local 209 std::advance(BBI, std::distance(F->begin(), Function::iterator(BB))); in runOnModule() 210 TranslatedBlocksToNotExtract.insert(BBI); in runOnModule()
|
/external/llvm/include/llvm/Transforms/Utils/ |
D | SSAUpdaterImpl.h | 369 for (typename BlkT::iterator BBI = BB->begin(), BBE = BB->end(); in FindExistingPHI() local 370 BBI != BBE; ++BBI) { in FindExistingPHI() 371 PhiT *SomePHI = Traits::InstrIsPHI(BBI); in FindExistingPHI()
|