| /freebsd-12.1/contrib/llvm/include/llvm/Analysis/ |
| H A D | PtrUseVisitor.h | 176 bool adjustOffsetForGEP(GetElementPtrInst &GEPI); 264 void visitGetElementPtrInst(GetElementPtrInst &GEPI) { in visitGetElementPtrInst() argument 265 if (GEPI.use_empty()) in visitGetElementPtrInst() 269 if (!adjustOffsetForGEP(GEPI)) { in visitGetElementPtrInst() 275 enqueueUsers(GEPI); in visitGetElementPtrInst()
|
| /freebsd-12.1/contrib/llvm/lib/Transforms/InstCombine/ |
| H A D | InstCombineLoadStoreAlloca.cpp | 882 if (GEPI->getNumOperands() < 2) in canReplaceGEPIdxWithZero() 890 Value *V = GEPI->getOperand(I); in canReplaceGEPIdxWithZero() 903 Idx = FirstNZIdx(GEPI); in canReplaceGEPIdxWithZero() 904 if (Idx == GEPI->getNumOperands()) in canReplaceGEPIdxWithZero() 906 if (isa<Constant>(GEPI->getOperand(Idx))) in canReplaceGEPIdxWithZero() 909 SmallVector<Value *, 4> Ops(GEPI->idx_begin(), GEPI->idx_begin() + Idx); in canReplaceGEPIdxWithZero() 937 if (Idx+1 != GEPI->getNumOperands() && !GEPI->isInBounds()) in canReplaceGEPIdxWithZero() 955 Instruction *NewGEPI = GEPI->clone(); in replaceGEPIdxWithZero() 958 NewGEPI->insertBefore(GEPI); in replaceGEPIdxWithZero() 973 Ptr = GEPI->getOperand(0); in canSimplifyNullStoreOrGEP() [all …]
|
| /freebsd-12.1/contrib/llvm/lib/Transforms/IPO/ |
| H A D | GlobalOpt.cpp | 381 for (; GEPI != E; ++GEPI) { in isSafeSROAGEP() 382 if (GEPI.isStruct()) in isSafeSROAGEP() 582 NewTy, NewPtr, Idxs, GEPI->getName() + "." + Twine(Val), GEPI); in SRAGlobal() 588 GEPI->eraseFromParent(); in SRAGlobal() 725 for (User::op_iterator i = GEPI->op_begin() + 1, e = GEPI->op_end(); in OptimizeAwayTrappingUsesOfValue() 734 if (GEPI->use_empty()) { in OptimizeAwayTrappingUsesOfValue() 1032 if (GEPI->hasAllZeroIndices() && GEPI->hasOneUse()) in ReplaceUsesOfMallocWithGlobal() 1214 assert(GEPI->getNumOperands() >= 3 && isa<ConstantInt>(GEPI->getOperand(2)) in RewriteHeapSROALoadUser() 1225 GEPIdx.append(GEPI->op_begin()+3, GEPI->op_end()); in RewriteHeapSROALoadUser() 1228 GEPI->getName(), GEPI); in RewriteHeapSROALoadUser() [all …]
|
| /freebsd-12.1/contrib/llvm/lib/Analysis/ |
| H A D | PHITransAddr.cpp | 241 if (GetElementPtrInst *GEPI = dyn_cast<GetElementPtrInst>(U)) in PHITranslateSubExpr() local 242 if (GEPI->getType() == GEP->getType() && in PHITranslateSubExpr() 243 GEPI->getNumOperands() == GEPOps.size() && in PHITranslateSubExpr() 244 GEPI->getParent()->getParent() == CurBB->getParent() && in PHITranslateSubExpr() 245 (!DT || DT->dominates(GEPI->getParent(), PredBB))) { in PHITranslateSubExpr() 246 if (std::equal(GEPOps.begin(), GEPOps.end(), GEPI->op_begin())) in PHITranslateSubExpr() 247 return GEPI; in PHITranslateSubExpr()
|
| H A D | PtrUseVisitor.cpp | 34 bool detail::PtrUseVisitorBase::adjustOffsetForGEP(GetElementPtrInst &GEPI) { in adjustOffsetForGEP() argument 38 return GEPI.accumulateConstantOffset(DL, Offset); in adjustOffsetForGEP()
|
| /freebsd-12.1/contrib/llvm/lib/Transforms/Scalar/ |
| H A D | Scalarizer.cpp | 178 bool visitGetElementPtrInst(GetElementPtrInst &GEPI); 562 VectorType *VT = dyn_cast<VectorType>(GEPI.getType()); in visitGetElementPtrInst() 566 IRBuilder<> Builder(&GEPI); in visitGetElementPtrInst() 568 unsigned NumIndices = GEPI.getNumIndices(); in visitGetElementPtrInst() 572 Value *Op0 = GEPI.getOperand(0); in visitGetElementPtrInst() 575 Scatterer Base = scatter(&GEPI, Op0); in visitGetElementPtrInst() 580 Value *Op = GEPI.getOperand(I + 1); in visitGetElementPtrInst() 587 Ops[I] = scatter(&GEPI, Op); in visitGetElementPtrInst() 598 GEPI.getName() + ".i" + Twine(I)); in visitGetElementPtrInst() 599 if (GEPI.isInBounds()) in visitGetElementPtrInst() [all …]
|
| H A D | SROA.cpp | 724 void visitGetElementPtrInst(GetElementPtrInst &GEPI) { in visitGetElementPtrInst() argument 725 if (GEPI.use_empty()) in visitGetElementPtrInst() 726 return markAsDead(GEPI); in visitGetElementPtrInst() 728 if (SROAStrictInbounds && GEPI.isInBounds()) { in visitGetElementPtrInst() 737 const DataLayout &DL = GEPI.getModule()->getDataLayout(); in visitGetElementPtrInst() 738 for (gep_type_iterator GTI = gep_type_begin(GEPI), in visitGetElementPtrInst() 739 GTE = gep_type_end(GEPI); in visitGetElementPtrInst() 763 return markAsDead(GEPI); in visitGetElementPtrInst() 767 return Base::visitGetElementPtrInst(GEPI); in visitGetElementPtrInst() 3380 bool visitGetElementPtrInst(GetElementPtrInst &GEPI) { in visitGetElementPtrInst() argument [all …]
|
| /freebsd-12.1/contrib/llvm/lib/Transforms/Utils/ |
| H A D | PromoteMemoryToRegister.cpp | 92 } else if (const GetElementPtrInst *GEPI = dyn_cast<GetElementPtrInst>(U)) { in isAllocaPromotable() local 93 if (GEPI->getType() != Type::getInt8PtrTy(U->getContext(), AS)) in isAllocaPromotable() 95 if (!GEPI->hasAllZeroIndices()) in isAllocaPromotable() 97 if (!onlyUsedByLifetimeMarkers(GEPI)) in isAllocaPromotable()
|
| /freebsd-12.1/contrib/llvm/lib/CodeGen/ |
| H A D | CodeGenPrepare.cpp | 6565 if (!GEPSequentialConstIndexed(GEPI)) in tryUnmergingGEPsAcrossIndirectBr() 6572 Value *GEPIOp = GEPI->getOperand(0); in tryUnmergingGEPsAcrossIndirectBr() 6588 }) == GEPI->users().end()) in tryUnmergingGEPsAcrossIndirectBr() 6595 if (Usr == GEPI) continue; in tryUnmergingGEPsAcrossIndirectBr() 6635 UGEPI->setOperand(0, GEPI); in tryUnmergingGEPsAcrossIndirectBr() 6643 if (!GEPI->isInBounds()) { in tryUnmergingGEPsAcrossIndirectBr() 6758 if (GEPI->hasAllZeroIndices()) { in optimizeInst() 6760 Instruction *NC = new BitCastInst(GEPI->getOperand(0), GEPI->getType(), in optimizeInst() 6761 GEPI->getName(), GEPI); in optimizeInst() 6763 GEPI->replaceAllUsesWith(NC); in optimizeInst() [all …]
|
| /freebsd-12.1/contrib/llvm/lib/IR/ |
| H A D | Instructions.cpp | 1451 GetElementPtrInst::GetElementPtrInst(const GetElementPtrInst &GEPI) in GetElementPtrInst() argument 1452 : Instruction(GEPI.getType(), GetElementPtr, in GetElementPtrInst() 1454 GEPI.getNumOperands(), in GetElementPtrInst() 1455 GEPI.getNumOperands()), in GetElementPtrInst() 1456 SourceElementType(GEPI.SourceElementType), in GetElementPtrInst() 1457 ResultElementType(GEPI.ResultElementType) { in GetElementPtrInst() 1458 std::copy(GEPI.op_begin(), GEPI.op_end(), op_begin()); in GetElementPtrInst() 1459 SubclassOptionalData = GEPI.SubclassOptionalData; in GetElementPtrInst()
|
| H A D | Constants.cpp | 1156 gep_type_iterator GEPI = gep_type_begin(this), E = gep_type_end(this); in isGEPWithNoNotionalOverIndexing() local 1161 for (; GEPI != E; ++GEPI, ++OI) { in isGEPWithNoNotionalOverIndexing() 1165 if (!CI || (GEPI.isBoundedSequential() && in isGEPWithNoNotionalOverIndexing() 1167 CI->getZExtValue() >= GEPI.getSequentialNumElements()))) in isGEPWithNoNotionalOverIndexing()
|
| /freebsd-12.1/contrib/llvm/lib/Transforms/Instrumentation/ |
| H A D | DataFlowSanitizer.cpp | 442 void visitGetElementPtrInst(GetElementPtrInst &GEPI); 1386 void DFSanVisitor::visitGetElementPtrInst(GetElementPtrInst &GEPI) { in visitGetElementPtrInst() argument 1387 visitOperandShadowInst(GEPI); in visitGetElementPtrInst()
|
| /freebsd-12.1/contrib/llvm/lib/Transforms/Vectorize/ |
| H A D | SLPVectorizer.cpp | 6405 auto *GEPI = cast<GetElementPtrInst>(GEPList[I]); in vectorizeGEPIndices() local 6406 if (!Candidates.count(GEPI)) in vectorizeGEPIndices() 6415 } else if (GEPI->idx_begin()->get() == GEPJ->idx_begin()->get()) { in vectorizeGEPIndices()
|
| /freebsd-12.1/contrib/llvm/include/llvm/IR/ |
| H A D | Instructions.h | 858 GetElementPtrInst(const GetElementPtrInst &GEPI);
|