Home
last modified time | relevance | path

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

/freebsd-13.1/contrib/llvm-project/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()
/freebsd-13.1/contrib/llvm-project/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()
/freebsd-13.1/contrib/llvm-project/llvm/lib/Transforms/InstCombine/
H A DInstCombineLoadStoreAlloca.cpp834 if (GEPI->getNumOperands() < 2) in canReplaceGEPIdxWithZero()
842 Value *V = GEPI->getOperand(I); in canReplaceGEPIdxWithZero()
855 Idx = FirstNZIdx(GEPI); in canReplaceGEPIdxWithZero()
856 if (Idx == GEPI->getNumOperands()) in canReplaceGEPIdxWithZero()
858 if (isa<Constant>(GEPI->getOperand(Idx))) in canReplaceGEPIdxWithZero()
861 SmallVector<Value *, 4> Ops(GEPI->idx_begin(), GEPI->idx_begin() + Idx); in canReplaceGEPIdxWithZero()
894 if (Idx+1 != GEPI->getNumOperands() && !GEPI->isInBounds()) in canReplaceGEPIdxWithZero()
912 Instruction *NewGEPI = GEPI->clone(); in replaceGEPIdxWithZero()
915 NewGEPI->insertBefore(GEPI); in replaceGEPIdxWithZero()
930 Ptr = GEPI->getOperand(0); in canSimplifyNullStoreOrGEP()
[all …]
/freebsd-13.1/contrib/llvm-project/llvm/lib/Transforms/Scalar/
H A DScalarizer.cpp198 bool visitGetElementPtrInst(GetElementPtrInst &GEPI);
636 VectorType *VT = dyn_cast<VectorType>(GEPI.getType()); in visitGetElementPtrInst()
640 IRBuilder<> Builder(&GEPI); in visitGetElementPtrInst()
642 unsigned NumIndices = GEPI.getNumIndices(); in visitGetElementPtrInst()
646 Value *Op0 = GEPI.getOperand(0); in visitGetElementPtrInst()
649 Scatterer Base = scatter(&GEPI, Op0); in visitGetElementPtrInst()
654 Value *Op = GEPI.getOperand(I + 1); in visitGetElementPtrInst()
661 Ops[I] = scatter(&GEPI, Op); in visitGetElementPtrInst()
672 GEPI.getName() + ".i" + Twine(I)); in visitGetElementPtrInst()
673 if (GEPI.isInBounds()) in visitGetElementPtrInst()
[all …]
H A DSROA.cpp719 if (GEPI.use_empty()) in visitGetElementPtrInst()
720 return markAsDead(GEPI); in visitGetElementPtrInst()
759 return markAsDead(GEPI); in visitGetElementPtrInst()
3508 IRBuilderTy Builder(&GEPI); in foldGEPSelect()
3531 Visited.erase(&GEPI); in foldGEPSelect()
3533 GEPI.eraseFromParent(); in foldGEPSelect()
3589 Visited.erase(&GEPI); in foldGEPPhi()
3591 GEPI.eraseFromParent(); in foldGEPPhi()
3604 foldGEPSelect(GEPI)) in visitGetElementPtrInst()
3608 foldGEPPhi(GEPI)) in visitGetElementPtrInst()
[all …]
/freebsd-13.1/contrib/llvm-project/llvm/lib/Transforms/IPO/
H A DGlobalOpt.cpp385 ++GEPI; // Skip over the pointer index. in isSafeSROAGEP()
392 for (; GEPI != E; ++GEPI) { in isSafeSROAGEP()
393 if (GEPI.isStruct()) in isSafeSROAGEP()
625 Idxs.push_back(GEPI->getOperand(i)); in SRAGlobal()
628 GEPI); in SRAGlobal()
651 GEPI->eraseFromParent(); in SRAGlobal()
785 Idxs.reserve(GEPI->getNumOperands()-1); in OptimizeAwayTrappingUsesOfValue()
786 for (User::op_iterator i = GEPI->op_begin() + 1, e = GEPI->op_end(); in OptimizeAwayTrappingUsesOfValue()
794 GEPI, ConstantExpr::getGetElementPtr(GEPI->getSourceElementType(), in OptimizeAwayTrappingUsesOfValue()
796 if (GEPI->use_empty()) { in OptimizeAwayTrappingUsesOfValue()
[all …]
/freebsd-13.1/contrib/llvm-project/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()
/freebsd-13.1/contrib/llvm-project/llvm/lib/CodeGen/
H A DCodeGenPrepare.cpp7628 if (!GEPSequentialConstIndexed(GEPI)) in tryUnmergingGEPsAcrossIndirectBr()
7636 Value *GEPIOp = GEPI->getOperand(0); in tryUnmergingGEPsAcrossIndirectBr()
7652 }) == GEPI->users().end()) in tryUnmergingGEPsAcrossIndirectBr()
7659 if (Usr == GEPI) continue; in tryUnmergingGEPsAcrossIndirectBr()
7701 UGEPI->setOperand(0, GEPI); in tryUnmergingGEPsAcrossIndirectBr()
7709 if (!GEPI->isInBounds()) { in tryUnmergingGEPsAcrossIndirectBr()
7879 if (GEPI->hasAllZeroIndices()) { in optimizeInst()
7881 Instruction *NC = new BitCastInst(GEPI->getOperand(0), GEPI->getType(), in optimizeInst()
7882 GEPI->getName(), GEPI); in optimizeInst()
7884 GEPI->replaceAllUsesWith(NC); in optimizeInst()
[all …]
/freebsd-13.1/contrib/llvm-project/llvm/lib/IR/
H A DInstructions.cpp1711 GetElementPtrInst::GetElementPtrInst(const GetElementPtrInst &GEPI) in GetElementPtrInst() argument
1712 : Instruction(GEPI.getType(), GetElementPtr, in GetElementPtrInst()
1714 GEPI.getNumOperands(), in GetElementPtrInst()
1715 GEPI.getNumOperands()), in GetElementPtrInst()
1716 SourceElementType(GEPI.SourceElementType), in GetElementPtrInst()
1717 ResultElementType(GEPI.ResultElementType) { in GetElementPtrInst()
1718 std::copy(GEPI.op_begin(), GEPI.op_end(), op_begin()); in GetElementPtrInst()
1719 SubclassOptionalData = GEPI.SubclassOptionalData; in GetElementPtrInst()
H A DConstants.cpp1469 gep_type_iterator GEPI = gep_type_begin(this), E = gep_type_end(this); in isGEPWithNoNotionalOverIndexing() local
1474 for (; GEPI != E; ++GEPI, ++OI) { in isGEPWithNoNotionalOverIndexing()
1478 if (!CI || (GEPI.isBoundedSequential() && in isGEPWithNoNotionalOverIndexing()
1480 CI->getZExtValue() >= GEPI.getSequentialNumElements()))) in isGEPWithNoNotionalOverIndexing()
/freebsd-13.1/contrib/llvm-project/llvm/lib/Transforms/Instrumentation/
H A DDataFlowSanitizer.cpp745 void visitGetElementPtrInst(GetElementPtrInst &GEPI);
2605 void DFSanVisitor::visitGetElementPtrInst(GetElementPtrInst &GEPI) { in visitGetElementPtrInst() argument
2607 visitInstOperands(GEPI); in visitGetElementPtrInst()
2613 Value *BasePointer = GEPI.getPointerOperand(); in visitGetElementPtrInst()
2614 DFSF.setShadow(&GEPI, DFSF.getShadow(BasePointer)); in visitGetElementPtrInst()
2616 DFSF.setOrigin(&GEPI, DFSF.getOrigin(BasePointer)); in visitGetElementPtrInst()
/freebsd-13.1/contrib/llvm-project/llvm/lib/Transforms/Coroutines/
H A DCoroFrame.cpp1344 void visitGetElementPtrInst(GetElementPtrInst &GEPI) { in visitGetElementPtrInst()
1346 Base::visitGetElementPtrInst(GEPI); in visitGetElementPtrInst()
1347 handleAlias(GEPI); in visitGetElementPtrInst()
/freebsd-13.1/contrib/llvm-project/llvm/lib/Transforms/Vectorize/
H A DSLPVectorizer.cpp8702 auto *GEPI = GEPList[I]; in vectorizeGEPIndices() local
8703 if (!Candidates.count(GEPI)) in vectorizeGEPIndices()
8710 Candidates.remove(GEPI); in vectorizeGEPIndices()
8712 } else if (GEPI->idx_begin()->get() == GEPJ->idx_begin()->get()) { in vectorizeGEPIndices()
/freebsd-13.1/contrib/llvm-project/llvm/include/llvm/IR/
H A DInstructions.h932 GetElementPtrInst(const GetElementPtrInst &GEPI);