Home
last modified time | relevance | path

Searched refs:GEPI (Results 1 – 15 of 15) sorted by relevance

/netbsd-src/external/apache2/llvm/dist/llvm/lib/Transforms/InstCombine/
H A DInstCombineLoadStoreAlloca.cpp820 GetElementPtrInst *GEPI, Instruction *MemI, in canReplaceGEPIdxWithZero() argument
822 if (GEPI->getNumOperands() < 2) in canReplaceGEPIdxWithZero()
827 auto FirstNZIdx = [](const GetElementPtrInst *GEPI) { in canReplaceGEPIdxWithZero() argument
829 for (unsigned IE = GEPI->getNumOperands(); I != IE; ++I) { in canReplaceGEPIdxWithZero()
830 Value *V = GEPI->getOperand(I); in canReplaceGEPIdxWithZero()
843 Idx = FirstNZIdx(GEPI); in canReplaceGEPIdxWithZero()
844 if (Idx == GEPI->getNumOperands()) in canReplaceGEPIdxWithZero()
846 if (isa<Constant>(GEPI->getOperand(Idx))) in canReplaceGEPIdxWithZero()
849 SmallVector<Value *, 4> Ops(GEPI->idx_begin(), GEPI->idx_begin() + Idx); in canReplaceGEPIdxWithZero()
850 Type *SourceElementType = GEPI->getSourceElementType(); in canReplaceGEPIdxWithZero()
[all …]
/netbsd-src/external/apache2/llvm/dist/llvm/include/llvm/Analysis/
H A DPtrUseVisitor.h174 bool adjustOffsetForGEP(GetElementPtrInst &GEPI);
266 void visitGetElementPtrInst(GetElementPtrInst &GEPI) { in visitGetElementPtrInst() argument
267 if (GEPI.use_empty()) in visitGetElementPtrInst()
271 if (!adjustOffsetForGEP(GEPI)) { in visitGetElementPtrInst()
277 enqueueUsers(GEPI); in visitGetElementPtrInst()
/netbsd-src/external/apache2/llvm/dist/llvm/lib/Analysis/
H A DPtrUseVisitor.cpp33 bool detail::PtrUseVisitorBase::adjustOffsetForGEP(GetElementPtrInst &GEPI) { in adjustOffsetForGEP() argument
37 APInt TmpOffset(DL.getIndexTypeSizeInBits(GEPI.getType()), 0); in adjustOffsetForGEP()
38 if (GEPI.accumulateConstantOffset(DL, TmpOffset)) { in adjustOffsetForGEP()
H A DPHITransAddr.cpp240 if (GetElementPtrInst *GEPI = dyn_cast<GetElementPtrInst>(U)) in PHITranslateSubExpr() local
241 if (GEPI->getType() == GEP->getType() && in PHITranslateSubExpr()
242 GEPI->getNumOperands() == GEPOps.size() && in PHITranslateSubExpr()
243 GEPI->getParent()->getParent() == CurBB->getParent() && in PHITranslateSubExpr()
244 (!DT || DT->dominates(GEPI->getParent(), PredBB))) { in PHITranslateSubExpr()
245 if (std::equal(GEPOps.begin(), GEPOps.end(), GEPI->op_begin())) in PHITranslateSubExpr()
246 return GEPI; in PHITranslateSubExpr()
/netbsd-src/external/apache2/llvm/dist/llvm/lib/Transforms/Scalar/
H A DScalarizer.cpp198 bool visitGetElementPtrInst(GetElementPtrInst &GEPI);
630 bool ScalarizerVisitor::visitGetElementPtrInst(GetElementPtrInst &GEPI) { in visitGetElementPtrInst() argument
631 VectorType *VT = dyn_cast<VectorType>(GEPI.getType()); in visitGetElementPtrInst()
635 IRBuilder<> Builder(&GEPI); in visitGetElementPtrInst()
637 unsigned NumIndices = GEPI.getNumIndices(); in visitGetElementPtrInst()
641 Value *Op0 = GEPI.getOperand(0); in visitGetElementPtrInst()
644 Scatterer Base = scatter(&GEPI, Op0); in visitGetElementPtrInst()
649 Value *Op = GEPI.getOperand(I + 1); in visitGetElementPtrInst()
656 Ops[I] = scatter(&GEPI, Op); in visitGetElementPtrInst()
666 Res[I] = Builder.CreateGEP(GEPI.getSourceElementType(), Base[I], Indices, in visitGetElementPtrInst()
[all …]
H A DSROA.cpp718 void visitGetElementPtrInst(GetElementPtrInst &GEPI) { in visitGetElementPtrInst() argument
719 if (GEPI.use_empty()) in visitGetElementPtrInst()
720 return markAsDead(GEPI); in visitGetElementPtrInst()
722 if (SROAStrictInbounds && GEPI.isInBounds()) { in visitGetElementPtrInst()
731 const DataLayout &DL = GEPI.getModule()->getDataLayout(); in visitGetElementPtrInst()
732 for (gep_type_iterator GTI = gep_type_begin(GEPI), in visitGetElementPtrInst()
733 GTE = gep_type_end(GEPI); in visitGetElementPtrInst()
759 return markAsDead(GEPI); in visitGetElementPtrInst()
763 return Base::visitGetElementPtrInst(GEPI); in visitGetElementPtrInst()
3483 bool foldGEPSelect(GetElementPtrInst &GEPI) { in foldGEPSelect() argument
[all …]
/netbsd-src/external/apache2/llvm/dist/llvm/lib/Transforms/IPO/
H A DGlobalOpt.cpp384 gep_type_iterator GEPI = gep_type_begin(U), E = gep_type_end(U); in isSafeSROAGEP() local
385 ++GEPI; // Skip over the pointer index. in isSafeSROAGEP()
392 for (; GEPI != E; ++GEPI) { in isSafeSROAGEP()
393 if (GEPI.isStruct()) in isSafeSROAGEP()
396 ConstantInt *IdxVal = dyn_cast<ConstantInt>(GEPI.getOperand()); in isSafeSROAGEP()
397 if (!IdxVal || (GEPI.isBoundedSequential() && in isSafeSROAGEP()
398 IdxVal->getZExtValue() >= GEPI.getSequentialNumElements())) in isSafeSROAGEP()
621 GetElementPtrInst *GEPI = cast<GetElementPtrInst>(GEP); in SRAGlobal() local
624 for (unsigned i = 3, e = GEPI->getNumOperands(); i != e; ++i) in SRAGlobal()
625 Idxs.push_back(GEPI->getOperand(i)); in SRAGlobal()
[all …]
/netbsd-src/external/apache2/llvm/dist/llvm/lib/Transforms/Utils/
H A DPromoteMemoryToRegister.cpp85 } else if (const GetElementPtrInst *GEPI = dyn_cast<GetElementPtrInst>(U)) { in isAllocaPromotable() local
86 if (!GEPI->hasAllZeroIndices()) in isAllocaPromotable()
88 if (!onlyUsedByLifetimeMarkersOrDroppableInsts(GEPI)) in isAllocaPromotable()
/netbsd-src/external/apache2/llvm/dist/llvm/lib/CodeGen/
H A DCodeGenPrepare.cpp7590 static bool tryUnmergingGEPsAcrossIndirectBr(GetElementPtrInst *GEPI, in tryUnmergingGEPsAcrossIndirectBr() argument
7592 BasicBlock *SrcBlock = GEPI->getParent(); in tryUnmergingGEPsAcrossIndirectBr()
7598 if (!GEPSequentialConstIndexed(GEPI)) in tryUnmergingGEPsAcrossIndirectBr()
7600 ConstantInt *GEPIIdx = cast<ConstantInt>(GEPI->getOperand(1)); in tryUnmergingGEPsAcrossIndirectBr()
7606 Value *GEPIOp = GEPI->getOperand(0); in tryUnmergingGEPsAcrossIndirectBr()
7615 if (find_if(GEPI->users(), [&](User *Usr) { in tryUnmergingGEPsAcrossIndirectBr()
7622 }) == GEPI->users().end()) in tryUnmergingGEPsAcrossIndirectBr()
7629 if (Usr == GEPI) continue; in tryUnmergingGEPsAcrossIndirectBr()
7671 UGEPI->setOperand(0, GEPI); in tryUnmergingGEPsAcrossIndirectBr()
7679 if (!GEPI->isInBounds()) { in tryUnmergingGEPsAcrossIndirectBr()
[all …]
/netbsd-src/external/apache2/llvm/dist/llvm/lib/IR/
H A DInstructions.cpp1698 GetElementPtrInst::GetElementPtrInst(const GetElementPtrInst &GEPI) in GetElementPtrInst() argument
1699 : Instruction(GEPI.getType(), GetElementPtr, in GetElementPtrInst()
1701 GEPI.getNumOperands(), in GetElementPtrInst()
1702 GEPI.getNumOperands()), in GetElementPtrInst()
1703 SourceElementType(GEPI.SourceElementType), in GetElementPtrInst()
1704 ResultElementType(GEPI.ResultElementType) { in GetElementPtrInst()
1705 std::copy(GEPI.op_begin(), GEPI.op_end(), op_begin()); in GetElementPtrInst()
1706 SubclassOptionalData = GEPI.SubclassOptionalData; in GetElementPtrInst()
H A DConstants.cpp1467 gep_type_iterator GEPI = gep_type_begin(this), E = gep_type_end(this); in isGEPWithNoNotionalOverIndexing() local
1472 for (; GEPI != E; ++GEPI, ++OI) { in isGEPWithNoNotionalOverIndexing()
1476 if (!CI || (GEPI.isBoundedSequential() && in isGEPWithNoNotionalOverIndexing()
1478 CI->getZExtValue() >= GEPI.getSequentialNumElements()))) in isGEPWithNoNotionalOverIndexing()
/netbsd-src/external/apache2/llvm/dist/llvm/lib/Transforms/Coroutines/
H A DCoroFrame.cpp1322 void visitGetElementPtrInst(GetElementPtrInst &GEPI) { in visitGetElementPtrInst()
1324 Base::visitGetElementPtrInst(GEPI); in visitGetElementPtrInst()
1325 handleAlias(GEPI); in visitGetElementPtrInst()
/netbsd-src/external/apache2/llvm/dist/llvm/lib/Transforms/Instrumentation/
H A DDataFlowSanitizer.cpp776 void visitGetElementPtrInst(GetElementPtrInst &GEPI);
2780 void DFSanVisitor::visitGetElementPtrInst(GetElementPtrInst &GEPI) { in visitGetElementPtrInst() argument
2781 visitInstOperands(GEPI); in visitGetElementPtrInst()
/netbsd-src/external/apache2/llvm/dist/llvm/lib/Transforms/Vectorize/
H A DSLPVectorizer.cpp8221 auto *GEPI = GEPList[I]; in vectorizeGEPIndices() local
8222 if (!Candidates.count(GEPI)) in vectorizeGEPIndices()
8229 Candidates.remove(GEPI); in vectorizeGEPIndices()
8231 } else if (GEPI->idx_begin()->get() == GEPJ->idx_begin()->get()) { in vectorizeGEPIndices()
/netbsd-src/external/apache2/llvm/dist/llvm/include/llvm/IR/
H A DInstructions.h921 GetElementPtrInst(const GetElementPtrInst &GEPI);