Home
last modified time | relevance | path

Searched refs:SI (Results 1 – 25 of 367) sorted by relevance

12345678910>>...15

/external/llvm/lib/Transforms/InstCombine/
DInstCombineLoadStoreAlloca.cpp220 if (SelectInst *SI = dyn_cast<SelectInst>(Op)) { in visitLoadInst() local
223 if (isSafeToLoadUnconditionally(SI->getOperand(1), SI, Align, TD) && in visitLoadInst()
224 isSafeToLoadUnconditionally(SI->getOperand(2), SI, Align, TD)) { in visitLoadInst()
225 LoadInst *V1 = Builder->CreateLoad(SI->getOperand(1), in visitLoadInst()
226 SI->getOperand(1)->getName()+".val"); in visitLoadInst()
227 LoadInst *V2 = Builder->CreateLoad(SI->getOperand(2), in visitLoadInst()
228 SI->getOperand(2)->getName()+".val"); in visitLoadInst()
231 return SelectInst::Create(SI->getCondition(), V1, V2); in visitLoadInst()
235 if (Constant *C = dyn_cast<Constant>(SI->getOperand(1))) in visitLoadInst()
237 LI.setOperand(0, SI->getOperand(2)); in visitLoadInst()
[all …]
DInstCombineSelect.cpp25 SelectInst *SI = dyn_cast<SelectInst>(V); in MatchSelectPattern() local
26 if (SI == 0) return SPF_UNKNOWN; in MatchSelectPattern()
28 ICmpInst *ICI = dyn_cast<ICmpInst>(SI->getCondition()); in MatchSelectPattern()
35 if (SI->getTrueValue() == ICI->getOperand(0) && in MatchSelectPattern()
36 SI->getFalseValue() == ICI->getOperand(1)) { in MatchSelectPattern()
51 if (SI->getTrueValue() == ICI->getOperand(1) && in MatchSelectPattern()
52 SI->getFalseValue() == ICI->getOperand(0)) { in MatchSelectPattern()
123 Instruction *InstCombiner::FoldSelectOpOp(SelectInst &SI, Instruction *TI, in FoldSelectOpOp() argument
136 Value *NewSI = Builder->CreateSelect(SI.getCondition(), TI->getOperand(0), in FoldSelectOpOp()
137 FI->getOperand(0), SI.getName()+".v"); in FoldSelectOpOp()
[all …]
DInstCombineMulDivRem.cpp115 if (BinaryOperator *SI = dyn_cast<BinaryOperator>(Op0)) in visitMul() local
116 if (SI->getOpcode() == Instruction::Shl) in visitMul()
117 if (Constant *ShOp = dyn_cast<Constant>(SI->getOperand(1))) in visitMul()
118 return BinaryOperator::CreateMul(SI->getOperand(0), in visitMul()
166 if (SelectInst *SI = dyn_cast<SelectInst>(Op0)) in visitMul() local
167 if (Instruction *R = FoldOpIntoSelect(I, SI)) in visitMul()
278 if (SelectInst *SI = dyn_cast<SelectInst>(Op0)) in visitFMul() local
279 if (Instruction *R = FoldOpIntoSelect(I, SI)) in visitFMul()
297 SelectInst *SI = cast<SelectInst>(I.getOperand(1)); in SimplifyDivRemOfSelect() local
301 if (Constant *ST = dyn_cast<Constant>(SI->getOperand(1))) in SimplifyDivRemOfSelect()
[all …]
/external/llvm/lib/Object/
DObject.cpp30 ObjectFile::section_iterator SI = unwrap(ObjectFile)->begin_sections(); in LLVMGetSections() local
31 return wrap(new ObjectFile::section_iterator(SI)); in LLVMGetSections()
34 void LLVMDisposeSectionIterator(LLVMSectionIteratorRef SI) { in LLVMDisposeSectionIterator() argument
35 delete unwrap(SI); in LLVMDisposeSectionIterator()
39 LLVMSectionIteratorRef SI) { in LLVMIsSectionIteratorAtEnd() argument
40 return (*unwrap(SI) == unwrap(ObjectFile)->end_sections()) ? 1 : 0; in LLVMIsSectionIteratorAtEnd()
43 void LLVMMoveToNextSection(LLVMSectionIteratorRef SI) { in LLVMMoveToNextSection() argument
45 unwrap(SI)->increment(ec); in LLVMMoveToNextSection()
49 const char *LLVMGetSectionName(LLVMSectionIteratorRef SI) { in LLVMGetSectionName() argument
51 if (error_code ec = (*unwrap(SI))->getName(ret)) in LLVMGetSectionName()
[all …]
/external/llvm/include/llvm/ADT/
DSetOperations.h26 for (typename S2Ty::const_iterator SI = S2.begin(), SE = S2.end(); in set_union() local
27 SI != SE; ++SI) in set_union()
28 if (S1.insert(*SI).second) in set_union()
53 for (typename S1Ty::const_iterator SI = S1.begin(), SE = S1.end(); in set_difference() local
54 SI != SE; ++SI) in set_difference()
55 if (!S2.count(*SI)) // if the element is not in set2 in set_difference()
56 Result.insert(*SI); in set_difference()
64 for (typename S2Ty::const_iterator SI = S2.begin(), SE = S2.end(); in set_subtract() local
65 SI != SE; ++SI) in set_subtract()
66 S1.erase(*SI); in set_subtract()
/external/llvm/lib/Transforms/Scalar/
DBasicBlockPlacement.cpp127 succ_iterator SI = succ_begin(BB), E = succ_end(BB); in PlaceBlocks() local
130 for (; SI != E && PlacedBlocks.count(*SI); ++SI) in PlaceBlocks()
132 if (SI == E) return; // No more successors to place. in PlaceBlocks()
134 double MaxExecutionCount = PI->getExecutionCount(*SI); in PlaceBlocks()
135 BasicBlock *MaxSuccessor = *SI; in PlaceBlocks()
138 for (; SI != E; ++SI) in PlaceBlocks()
139 if (!PlacedBlocks.count(*SI)) { in PlaceBlocks()
140 double Count = PI->getExecutionCount(*SI); in PlaceBlocks()
143 (Count == MaxExecutionCount && *SI == &*InsertPos)) { in PlaceBlocks()
145 MaxSuccessor = *SI; in PlaceBlocks()
DSimplifyCFGPass.cpp68 for (succ_iterator SI = succ_begin(BB), SE = succ_end(BB); SI != SE; ++SI) in ChangeToUnreachable() local
69 (*SI)->removePredecessor(BB); in ChangeToUnreachable()
143 if (StoreInst *SI = dyn_cast<StoreInst>(BBI)) { in MarkAliveBlocks() local
145 if (SI->isVolatile()) continue; in MarkAliveBlocks()
147 Value *Ptr = SI->getOperand(1); in MarkAliveBlocks()
151 SI->getPointerAddressSpace() == 0)) { in MarkAliveBlocks()
152 ChangeToUnreachable(SI, true); in MarkAliveBlocks()
167 for (succ_iterator SI = succ_begin(BB), SE = succ_end(BB); SI != SE; ++SI) in MarkAliveBlocks() local
168 Worklist.push_back(*SI); in MarkAliveBlocks()
193 for (succ_iterator SI = succ_begin(BB), SE = succ_end(BB); SI != SE; ++SI) in RemoveUnreachableBlocksFromFn() local
[all …]
DLoopIdiomRecognize.cpp82 bool processLoopStore(StoreInst *SI, const SCEV *BECount);
90 bool processLoopStoreOfLoopLoad(StoreInst *SI, unsigned StoreSize,
238 if (StoreInst *SI = dyn_cast<StoreInst>(Inst)) { in runOnLoopBlock() local
240 if (!processLoopStore(SI, BECount)) continue; in runOnLoopBlock()
269 bool LoopIdiomRecognize::processLoopStore(StoreInst *SI, const SCEV *BECount) { in processLoopStore() argument
270 if (SI->isVolatile()) return false; in processLoopStore()
272 Value *StoredVal = SI->getValueOperand(); in processLoopStore()
273 Value *StorePtr = SI->getPointerOperand(); in processLoopStore()
298 dbgs() << "NEGATIVE STRIDE: " << *SI << "\n"; in processLoopStore()
299 dbgs() << "BB: " << *SI->getParent(); in processLoopStore()
[all …]
DMemCpyOptimizer.cpp205 if (StoreInst *SI = dyn_cast<StoreInst>(Inst)) in addInst() local
206 addStore(OffsetFromFirst, SI); in addInst()
211 void addStore(int64_t OffsetFromFirst, StoreInst *SI) { in addStore() argument
212 int64_t StoreSize = TD.getTypeStoreSize(SI->getOperand(0)->getType()); in addStore()
215 SI->getPointerOperand(), SI->getAlignment(), SI); in addStore()
330 bool processStore(StoreInst *SI, BasicBlock::iterator &BBI);
331 bool processMemSet(MemSetInst *SI, BasicBlock::iterator &BBI);
469 SI = Range.TheStores.begin(), in INITIALIZE_PASS_DEPENDENCY() local
470 SE = Range.TheStores.end(); SI != SE; ++SI) { in INITIALIZE_PASS_DEPENDENCY()
471 MD->removeInstruction(*SI); in INITIALIZE_PASS_DEPENDENCY()
[all …]
DScalarReplAggregates.cpp151 void RewriteStoreUserOfWholeAlloca(StoreInst *SI, AllocaInst *AI,
493 if (StoreInst *SI = dyn_cast<StoreInst>(User)) { in CanConvertToScalar() local
495 if (SI->getOperand(0) == V || SI->isVolatile()) return false; in CanConvertToScalar()
497 if (SI->getOperand(0)->getType()->isX86_MMXTy()) in CanConvertToScalar()
500 MergeInTypeForLoadOrStore(SI->getOperand(0)->getType(), Offset); in CanConvertToScalar()
610 if (StoreInst *SI = dyn_cast<StoreInst>(User)) { in ConvertUsesToScalar() local
611 assert(SI->getOperand(0) != Ptr && "Consistency error!"); in ConvertUsesToScalar()
613 Value *New = ConvertScalar_InsertValue(SI->getOperand(0), Old, Offset, in ConvertUsesToScalar()
616 SI->eraseFromParent(); in ConvertUsesToScalar()
1142 if (StoreInst *SI = dyn_cast<StoreInst>(Inst)) in updateDebugInfo() local
[all …]
DLoopUnswitch.cpp255 } else if (SwitchInst *SI = dyn_cast<SwitchInst>(TI)) { in processCurrentLoop() local
256 Value *LoopCond = FindLIVLoopCondition(SI->getCondition(), in processCurrentLoop()
258 if (LoopCond && SI->getNumCases() > 1) { in processCurrentLoop()
262 Constant *UnswitchVal = SI->getCaseValue(1); in processCurrentLoop()
277 if (SelectInst *SI = dyn_cast<SelectInst>(BBI)) { in processCurrentLoop() local
278 Value *LoopCond = FindLIVLoopCondition(SI->getCondition(), in processCurrentLoop()
311 for (succ_iterator SI = succ_begin(BB), E = succ_end(BB); SI != E; ++SI) { in isTrivialLoopExitBlockHelper() local
313 if (!isTrivialLoopExitBlockHelper(L, *SI, ExitBB, Visited)) in isTrivialLoopExitBlockHelper()
374 } else if (SwitchInst *SI = dyn_cast<SwitchInst>(HeaderTerm)) { in IsTrivialUnswitchCondition() local
376 if (SI->getCondition() != Cond) return false; in IsTrivialUnswitchCondition()
[all …]
/external/llvm/include/llvm-c/
DObject.h40 void LLVMDisposeSectionIterator(LLVMSectionIteratorRef SI);
42 LLVMSectionIteratorRef SI);
43 void LLVMMoveToNextSection(LLVMSectionIteratorRef SI);
44 const char *LLVMGetSectionName(LLVMSectionIteratorRef SI);
45 uint64_t LLVMGetSectionSize(LLVMSectionIteratorRef SI);
46 const char *LLVMGetSectionContents(LLVMSectionIteratorRef SI);
62 inline ObjectFile::section_iterator *unwrap(LLVMSectionIteratorRef SI) { in unwrap() argument
63 return reinterpret_cast<ObjectFile::section_iterator*>(SI); in unwrap()
67 wrap(const ObjectFile::section_iterator *SI) { in wrap() argument
69 (const_cast<ObjectFile::section_iterator*>(SI)); in wrap()
/external/llvm/lib/Transforms/Utils/
DSimplifyCFG.cpp69 bool SimplifySwitch(SwitchInst *SI, IRBuilder<> &Builder);
435 if (SwitchInst *SI = dyn_cast<SwitchInst>(TI)) { in EraseTerminatorInstAndDCECond() local
436 Cond = dyn_cast<Instruction>(SI->getCondition()); in EraseTerminatorInstAndDCECond()
452 if (SwitchInst *SI = dyn_cast<SwitchInst>(TI)) { in isValueEqualityComparison() local
455 if (SI->getNumSuccessors()*std::distance(pred_begin(SI->getParent()), in isValueEqualityComparison()
456 pred_end(SI->getParent())) <= 128) in isValueEqualityComparison()
457 CV = SI->getCondition(); in isValueEqualityComparison()
479 if (SwitchInst *SI = dyn_cast<SwitchInst>(TI)) { in GetValueEqualityComparisonCases() local
480 Cases.reserve(SI->getNumCases()); in GetValueEqualityComparisonCases()
481 for (unsigned i = 1, e = SI->getNumCases(); i != e; ++i) in GetValueEqualityComparisonCases()
[all …]
DLowerSwitch.cpp61 void processSwitchInst(SwitchInst *SI);
67 unsigned Clusterify(CaseVector& Cases, SwitchInst *SI);
100 if (SwitchInst *SI = dyn_cast<SwitchInst>(Cur->getTerminator())) { in runOnFunction() local
102 processSwitchInst(SI); in runOnFunction()
236 unsigned LowerSwitch::Clusterify(CaseVector& Cases, SwitchInst *SI) { in Clusterify() argument
240 for (unsigned i = 1; i < SI->getNumSuccessors(); ++i) in Clusterify()
241 Cases.push_back(CaseRange(SI->getSuccessorValue(i), in Clusterify()
242 SI->getSuccessorValue(i), in Clusterify()
243 SI->getSuccessor(i))); in Clusterify()
276 void LowerSwitch::processSwitchInst(SwitchInst *SI) { in processSwitchInst() argument
[all …]
DLocal.cpp105 if (SwitchInst *SI = dyn_cast<SwitchInst>(T)) { in ConstantFoldTerminator() local
108 ConstantInt *CI = dyn_cast<ConstantInt>(SI->getCondition()); in ConstantFoldTerminator()
109 BasicBlock *TheOnlyDest = SI->getSuccessor(0); // The default dest in ConstantFoldTerminator()
111 assert(TheOnlyDest == SI->getDefaultDest() && in ConstantFoldTerminator()
115 for (unsigned i = 1, e = SI->getNumSuccessors(); i != e; ++i) { in ConstantFoldTerminator()
117 if (SI->getSuccessorValue(i) == CI) { in ConstantFoldTerminator()
118 TheOnlyDest = SI->getSuccessor(i); in ConstantFoldTerminator()
124 if (SI->getSuccessor(i) == DefaultDest) { in ConstantFoldTerminator()
126 DefaultDest->removePredecessor(SI->getParent()); in ConstantFoldTerminator()
127 SI->removeCase(i); in ConstantFoldTerminator()
[all …]
DLowerExpectIntrinsic.cpp31 bool HandleSwitchExpect(SwitchInst *SI);
46 bool LowerExpectIntrinsic::HandleSwitchExpect(SwitchInst *SI) { in HandleSwitchExpect() argument
47 CallInst *CI = dyn_cast<CallInst>(SI->getCondition()); in HandleSwitchExpect()
63 unsigned caseNo = SI->findCaseValue(ExpectedValue); in HandleSwitchExpect()
65 unsigned n = SI->getNumCases(); in HandleSwitchExpect()
74 SI->setMetadata(LLVMContext::MD_prof, WeightsNode); in HandleSwitchExpect()
76 SI->setCondition(ArgValue); in HandleSwitchExpect()
135 } else if (SwitchInst *SI = dyn_cast<SwitchInst>(BB->getTerminator())) { in runOnFunction() local
136 if (HandleSwitchExpect(SI)) in runOnFunction()
DPromoteMemoryToRegister.cpp91 } else if (const StoreInst *SI = dyn_cast<StoreInst>(U)) { in isAllocaPromotable() local
92 if (SI->getOperand(0) == AI) in isAllocaPromotable()
94 if (SI->isVolatile()) in isAllocaPromotable()
321 if (StoreInst *SI = dyn_cast<StoreInst>(User)) { in AnalyzeAlloca() local
323 DefiningBlocks.push_back(SI->getParent()); in AnalyzeAlloca()
324 AllocaPointerVal = SI->getOperand(0); in AnalyzeAlloca()
325 OnlyStore = SI; in AnalyzeAlloca()
456 StoreInst *SI = cast<StoreInst>(AI->use_back()); in run() local
460 DIB = new DIBuilder(*SI->getParent()->getParent()->getParent()); in run()
461 ConvertDebugDeclareToDebugValue(DDI, SI, *DIB); in run()
[all …]
/external/llvm/lib/CodeGen/
DEdgeBundles.cpp49 for (MachineBasicBlock::const_succ_iterator SI = MBB.succ_begin(), in runOnMachineFunction() local
50 SE = MBB.succ_end(); SI != SE; ++SI) in runOnMachineFunction()
51 EC.join(OutE, 2 * (*SI)->getNumber()); in runOnMachineFunction()
90 for (MachineBasicBlock::const_succ_iterator SI = I->succ_begin(), in WriteGraph() local
91 SE = I->succ_end(); SI != SE; ++SI) in WriteGraph()
92 O << "\t\"BB#" << BB << "\" -> \"BB#" << (*SI)->getNumber() in WriteGraph()
DLiveIntervalUnion.cpp87 for (LiveSegments::const_iterator SI = Segments.begin(); SI.valid(); ++SI) { in print() local
88 OS << " [" << SI.start() << ' ' << SI.stop() << "):" in print()
89 << PrintReg(SI.value()->reg, TRI); in print()
116 for (SegmentIter SI = Segments.begin(); SI.valid(); ++SI) in verify() local
117 VisitedVRegs.set(SI.value()->reg); in verify()
DShrinkWrapping.cpp205 for (MachineBasicBlock::succ_iterator SI = MBB->succ_begin(), in calcAnticInOut() local
206 SE = MBB->succ_end(); SI != SE; ++SI) { in calcAnticInOut()
207 MachineBasicBlock* SUCC = *SI; in calcAnticInOut()
473 for (MachineBasicBlock::succ_iterator SI = EntryBlock->succ_begin(), in calculateSets() local
474 SE = EntryBlock->succ_end(); SI != SE; ++SI) { in calculateSets()
475 MachineBasicBlock* SUCC = *SI; in calculateSets()
560 for (MachineBasicBlock::succ_iterator SI = MBB->succ_begin(), in addUsesForMEMERegion() local
561 SE = MBB->succ_end(); SI != SE; ++SI) { in addUsesForMEMERegion()
562 MachineBasicBlock* SUCC = *SI; in addUsesForMEMERegion()
594 for (MachineBasicBlock::succ_iterator SI = MBB->succ_begin(), in addUsesForMEMERegion() local
[all …]
DDwarfEHPrepare.cpp264 SI = Sels.begin(), SE = Sels.end(); SI != SE; ++SI) { in HandleURoRInvokes() local
265 const BasicBlock *SelBB = (*SI)->getParent(); in HandleURoRInvokes()
270 SelsToConvert.insert(*SI); in HandleURoRInvokes()
304 SI = SelCalls.begin(), SE = SelCalls.end(); SI != SE; ++SI) in HandleURoRInvokes() local
305 if (!HasCatchAllInSelector(*SI)) in HandleURoRInvokes()
306 SelsToConvert.insert(*SI); in HandleURoRInvokes()
317 SI = SelsToConvert.begin(), SE = SelsToConvert.end(); in HandleURoRInvokes() local
318 SI != SE; ++SI) { in HandleURoRInvokes()
319 IntrinsicInst *II = *SI; in HandleURoRInvokes()
/external/llvm/lib/Analysis/
DRegionInfo.cpp213 for (succ_iterator SI = succ_begin(BB), SE = succ_end(BB); SI != SE; ++SI) in verifyBBInRegion() local
214 if (!contains(*SI) && exit != *SI) in verifyBBInRegion()
218 for (pred_iterator SI = pred_begin(BB), SE = pred_end(BB); SI != SE; ++SI) in verifyBBInRegion() local
219 if (!contains(*SI)) in verifyBBInRegion()
230 for (succ_iterator SI = succ_begin(BB), SE = succ_end(BB); SI != SE; ++SI) in verifyWalk() local
231 if (*SI != exit && visited->find(*SI) == visited->end()) in verifyWalk()
232 verifyWalk(*SI, visited); in verifyWalk()
486 for (DST::iterator SI = entrySuccs->begin(), SE = entrySuccs->end(); in isRegion() local
487 SI != SE; ++SI) in isRegion()
488 if (*SI != exit && *SI != entry) in isRegion()
[all …]
DLoads.cpp143 } else if (StoreInst *SI = dyn_cast<StoreInst>(BBI)) { in isSafeToLoadUnconditionally() local
144 if (AreEquivalentAddressValues(SI->getOperand(1), V)) return true; in isSafeToLoadUnconditionally()
195 if (StoreInst *SI = dyn_cast<StoreInst>(Inst)) { in FindAvailableLoadedValue() local
197 if (AreEquivalentAddressValues(SI->getOperand(1), Ptr)) in FindAvailableLoadedValue()
198 return SI->getOperand(0); in FindAvailableLoadedValue()
204 (isa<AllocaInst>(SI->getOperand(1)) || in FindAvailableLoadedValue()
205 isa<GlobalVariable>(SI->getOperand(1)))) in FindAvailableLoadedValue()
211 (AA->getModRefInfo(SI, Ptr, AccessSize) & AliasAnalysis::Mod) == 0) in FindAvailableLoadedValue()
DDominanceFrontier.cpp65 for (succ_iterator SI = succ_begin(currentBB), SE = succ_end(currentBB); in calculate() local
66 SI != SE; ++SI) { in calculate()
68 if (DT[*SI]->getIDom() != currentNode) in calculate()
69 S.insert(*SI); in calculate()
/external/llvm/lib/Transforms/IPO/
DPartialInlining.cpp60 for (succ_iterator SI = succ_begin(entryBlock), SE = succ_end(entryBlock); in unswitchFunction() local
61 SI != SE; ++SI) in unswitchFunction()
62 if (isa<ReturnInst>((*SI)->getTerminator())) { in unswitchFunction()
63 returnBlock = *SI; in unswitchFunction()
66 nonReturnBlock = *SI; in unswitchFunction()

12345678910>>...15