| /openbsd-src/gnu/llvm/llvm/lib/Analysis/ |
| H A D | PtrUseVisitor.cpp | 32 bool detail::PtrUseVisitorBase::adjustOffsetForGEP(GetElementPtrInst &GEPI) { in adjustOffsetForGEP() argument 36 APInt TmpOffset(DL.getIndexTypeSizeInBits(GEPI.getType()), 0); in adjustOffsetForGEP() 37 if (GEPI.accumulateConstantOffset(DL, TmpOffset)) { in adjustOffsetForGEP()
|
| 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->getSourceElementType() == GEP->getSourceElementType() && in PHITranslateSubExpr() 244 GEPI->getNumOperands() == GEPOps.size() && in PHITranslateSubExpr() 245 GEPI->getParent()->getParent() == CurBB->getParent() && in PHITranslateSubExpr() 246 (!DT || DT->dominates(GEPI->getParent(), PredBB))) { in PHITranslateSubExpr() 247 if (std::equal(GEPOps.begin(), GEPOps.end(), GEPI->op_begin())) in PHITranslateSubExpr() 248 return GEPI; in PHITranslateSubExpr()
|
| H A D | InstructionSimplify.cpp | 6659 auto *GEPI = cast<GetElementPtrInst>(I); in simplifyInstructionWithOperands() local 6660 return simplifyGEPInst(GEPI->getSourceElementType(), NewOps[0], in simplifyInstructionWithOperands() 6661 ArrayRef(NewOps).slice(1), GEPI->isInBounds(), Q); in simplifyInstructionWithOperands()
|
| H A D | ScalarEvolution.cpp | 3761 auto *GEPI = dyn_cast<Instruction>(GEP); in getGEPExpr() local 3764 return GEPI && isSCEVExprNeverPoison(GEPI); in getGEPExpr()
|
| /openbsd-src/gnu/llvm/llvm/include/llvm/Analysis/ |
| H A D | PtrUseVisitor.h | 167 bool adjustOffsetForGEP(GetElementPtrInst &GEPI); 259 void visitGetElementPtrInst(GetElementPtrInst &GEPI) { in visitGetElementPtrInst() argument 260 if (GEPI.use_empty()) in visitGetElementPtrInst() 264 if (!adjustOffsetForGEP(GEPI)) { in visitGetElementPtrInst() 270 enqueueUsers(GEPI); in visitGetElementPtrInst()
|
| /openbsd-src/gnu/llvm/llvm/lib/Transforms/InstCombine/ |
| H A D | InstCombineLoadStoreAlloca.cpp | 908 GetElementPtrInst *GEPI, Instruction *MemI, in canReplaceGEPIdxWithZero() argument 910 if (GEPI->getNumOperands() < 2) in canReplaceGEPIdxWithZero() 915 auto FirstNZIdx = [](const GetElementPtrInst *GEPI) { in canReplaceGEPIdxWithZero() argument 917 for (unsigned IE = GEPI->getNumOperands(); I != IE; ++I) { in canReplaceGEPIdxWithZero() 918 Value *V = GEPI->getOperand(I); in canReplaceGEPIdxWithZero() 931 Idx = FirstNZIdx(GEPI); in canReplaceGEPIdxWithZero() 932 if (Idx == GEPI->getNumOperands()) in canReplaceGEPIdxWithZero() 934 if (isa<Constant>(GEPI->getOperand(Idx))) in canReplaceGEPIdxWithZero() 937 SmallVector<Value *, 4> Ops(GEPI->idx_begin(), GEPI->idx_begin() + Idx); in canReplaceGEPIdxWithZero() 938 Type *SourceElementType = GEPI->getSourceElementType(); in canReplaceGEPIdxWithZero() [all …]
|
| /openbsd-src/gnu/llvm/llvm/lib/Transforms/Scalar/ |
| H A D | Scalarizer.cpp | 221 bool visitGetElementPtrInst(GetElementPtrInst &GEPI); 682 bool ScalarizerVisitor::visitGetElementPtrInst(GetElementPtrInst &GEPI) { in visitGetElementPtrInst() argument 683 auto *VT = dyn_cast<FixedVectorType>(GEPI.getType()); in visitGetElementPtrInst() 687 IRBuilder<> Builder(&GEPI); in visitGetElementPtrInst() 689 unsigned NumIndices = GEPI.getNumIndices(); in visitGetElementPtrInst() 693 Value *Op0 = GEPI.getOperand(0); in visitGetElementPtrInst() 696 Scatterer Base = scatter(&GEPI, Op0); in visitGetElementPtrInst() 701 Value *Op = GEPI.getOperand(I + 1); in visitGetElementPtrInst() 708 Ops[I] = scatter(&GEPI, Op); in visitGetElementPtrInst() 718 Res[I] = Builder.CreateGEP(GEPI.getSourceElementType(), Base[I], Indices, in visitGetElementPtrInst() [all …]
|
| H A D | SROA.cpp | 825 void visitGetElementPtrInst(GetElementPtrInst &GEPI) { in visitGetElementPtrInst() argument 826 if (GEPI.use_empty()) in visitGetElementPtrInst() 827 return markAsDead(GEPI); in visitGetElementPtrInst() 829 if (SROAStrictInbounds && GEPI.isInBounds()) { in visitGetElementPtrInst() 838 const DataLayout &DL = GEPI.getModule()->getDataLayout(); in visitGetElementPtrInst() 839 for (gep_type_iterator GTI = gep_type_begin(GEPI), in visitGetElementPtrInst() 840 GTE = gep_type_end(GEPI); in visitGetElementPtrInst() 866 return markAsDead(GEPI); in visitGetElementPtrInst() 870 return Base::visitGetElementPtrInst(GEPI); in visitGetElementPtrInst() 3819 bool foldGEPSelect(GetElementPtrInst &GEPI) { in foldGEPSelect() argument [all …]
|
| H A D | NewGVN.cpp | 1202 } else if (auto *GEPI = dyn_cast<GetElementPtrInst>(I)) { in createExpression() local 1203 Value *V = simplifyGEPInst(GEPI->getSourceElementType(), *E->op_begin(), in createExpression() 1205 GEPI->isInBounds(), Q); in createExpression()
|
| /openbsd-src/gnu/llvm/llvm/lib/Transforms/IPO/ |
| H A D | GlobalOpt.cpp | 626 } else if (const GetElementPtrInst *GEPI = dyn_cast<GetElementPtrInst>(U)) { in AllUsesOfValueWillTrapIfNull() local 627 if (!AllUsesOfValueWillTrapIfNull(GEPI, PHIs)) return false; in AllUsesOfValueWillTrapIfNull() 746 } else if (GetElementPtrInst *GEPI = dyn_cast<GetElementPtrInst>(I)) { in OptimizeAwayTrappingUsesOfValue() local 749 Idxs.reserve(GEPI->getNumOperands()-1); in OptimizeAwayTrappingUsesOfValue() 750 for (User::op_iterator i = GEPI->op_begin() + 1, e = GEPI->op_end(); in OptimizeAwayTrappingUsesOfValue() 756 if (Idxs.size() == GEPI->getNumOperands()-1) in OptimizeAwayTrappingUsesOfValue() 758 GEPI, ConstantExpr::getGetElementPtr(GEPI->getSourceElementType(), in OptimizeAwayTrappingUsesOfValue() 760 if (GEPI->use_empty()) { in OptimizeAwayTrappingUsesOfValue() 762 GEPI->eraseFromParent(); in OptimizeAwayTrappingUsesOfValue() 1026 if (auto *GEPI = dyn_cast<GetElementPtrInst>(U)) { in valueIsOnlyUsedLocallyOrStoredToOneGlobal() local [all …]
|
| /openbsd-src/gnu/llvm/llvm/lib/Transforms/Instrumentation/ |
| H A D | SanitizerBinaryMetadata.cpp | 317 if (auto *GEPI = dyn_cast<GetElementPtrInst>(U)) { in hasUseAfterReturnUnsafeUses() local 318 if (!hasUseAfterReturnUnsafeUses(*GEPI)) in hasUseAfterReturnUnsafeUses()
|
| H A D | DataFlowSanitizer.cpp | 792 void visitGetElementPtrInst(GetElementPtrInst &GEPI); 2778 void DFSanVisitor::visitGetElementPtrInst(GetElementPtrInst &GEPI) { in visitGetElementPtrInst() argument 2781 StripPointerGEPsAndCasts(GEPI.getPointerOperand()))) { in visitGetElementPtrInst() 2782 visitInstOperands(GEPI); in visitGetElementPtrInst() 2788 Value *BasePointer = GEPI.getPointerOperand(); in visitGetElementPtrInst() 2789 DFSF.setShadow(&GEPI, DFSF.getShadow(BasePointer)); in visitGetElementPtrInst() 2791 DFSF.setOrigin(&GEPI, DFSF.getOrigin(BasePointer)); in visitGetElementPtrInst()
|
| /openbsd-src/gnu/llvm/llvm/lib/Transforms/Utils/ |
| H A D | PromoteMemoryToRegister.cpp | 85 } else if (const GetElementPtrInst *GEPI = dyn_cast<GetElementPtrInst>(U)) { in isAllocaPromotable() local 86 if (!GEPI->hasAllZeroIndices()) in isAllocaPromotable() 88 if (!onlyUsedByLifetimeMarkersOrDroppableInsts(GEPI)) in isAllocaPromotable()
|
| /openbsd-src/gnu/llvm/llvm/lib/CodeGen/ |
| H A D | CodeGenPrepare.cpp | 7853 static bool tryUnmergingGEPsAcrossIndirectBr(GetElementPtrInst *GEPI, in tryUnmergingGEPsAcrossIndirectBr() argument 7855 BasicBlock *SrcBlock = GEPI->getParent(); in tryUnmergingGEPsAcrossIndirectBr() 7861 if (!GEPSequentialConstIndexed(GEPI)) in tryUnmergingGEPsAcrossIndirectBr() 7863 ConstantInt *GEPIIdx = cast<ConstantInt>(GEPI->getOperand(1)); in tryUnmergingGEPsAcrossIndirectBr() 7869 Value *GEPIOp = GEPI->getOperand(0); in tryUnmergingGEPsAcrossIndirectBr() 7878 if (llvm::none_of(GEPI->users(), [&](User *Usr) { in tryUnmergingGEPsAcrossIndirectBr() 7892 if (Usr == GEPI) in tryUnmergingGEPsAcrossIndirectBr() 7935 UGEPI->setOperand(0, GEPI); in tryUnmergingGEPsAcrossIndirectBr() 7942 if (!GEPI->isInBounds()) { in tryUnmergingGEPsAcrossIndirectBr() 8124 if (GetElementPtrInst *GEPI = dyn_cast<GetElementPtrInst>(I)) { in optimizeInst() local [all …]
|
| /openbsd-src/gnu/llvm/llvm/lib/Target/AMDGPU/ |
| H A D | AMDGPUInstructionSelector.cpp | 3786 const GEPInfo &GEPI = AddrInfo[0]; in selectSmrdOffset() local 3788 AMDGPU::getSMRDEncodedOffset(STI, GEPI.Imm, false); in selectSmrdOffset() 3791 if (GEPI.SgprParts.size() == 1 && GEPI.Imm != 0 && EncodedImm && in selectSmrdOffset() 3807 if (Offset && GEPI.SgprParts.size() == 1 && EncodedImm) { in selectSmrdOffset() 3808 Base = GEPI.SgprParts[0]; in selectSmrdOffset() 3814 if (SOffset && GEPI.SgprParts.size() == 1 && isUInt<32>(GEPI.Imm) && in selectSmrdOffset() 3815 GEPI.Imm != 0) { in selectSmrdOffset() 3820 Base = GEPI.SgprParts[0]; in selectSmrdOffset() 3823 .addImm(GEPI.Imm); in selectSmrdOffset() 3827 if (SOffset && GEPI.SgprParts.size() && GEPI.Imm == 0) { in selectSmrdOffset() [all …]
|
| /openbsd-src/gnu/llvm/llvm/lib/IR/ |
| H A D | Instructions.cpp | 1849 GetElementPtrInst::GetElementPtrInst(const GetElementPtrInst &GEPI) in GetElementPtrInst() argument 1850 : Instruction(GEPI.getType(), GetElementPtr, in GetElementPtrInst() 1852 GEPI.getNumOperands(), in GetElementPtrInst() 1853 GEPI.getNumOperands()), in GetElementPtrInst() 1854 SourceElementType(GEPI.SourceElementType), in GetElementPtrInst() 1855 ResultElementType(GEPI.ResultElementType) { in GetElementPtrInst() 1856 std::copy(GEPI.op_begin(), GEPI.op_end(), op_begin()); in GetElementPtrInst() 1857 SubclassOptionalData = GEPI.SubclassOptionalData; in GetElementPtrInst()
|
| /openbsd-src/gnu/llvm/llvm/lib/Transforms/Coroutines/ |
| H A D | CoroFrame.cpp | 1397 void visitGetElementPtrInst(GetElementPtrInst &GEPI) { in visitGetElementPtrInst() 1399 Base::visitGetElementPtrInst(GEPI); in visitGetElementPtrInst() 1400 handleAlias(GEPI); in visitGetElementPtrInst()
|
| /openbsd-src/gnu/llvm/llvm/lib/Transforms/Vectorize/ |
| H A D | SLPVectorizer.cpp | 13820 auto *GEPI = GEPList[I]; in vectorizeGEPIndices() local 13821 if (!Candidates.count(GEPI)) in vectorizeGEPIndices() 13828 Candidates.remove(GEPI); in vectorizeGEPIndices() 13830 } else if (GEPI->idx_begin()->get() == GEPJ->idx_begin()->get()) { in vectorizeGEPIndices()
|
| /openbsd-src/gnu/llvm/llvm/include/llvm/IR/ |
| H A D | Instructions.h | 944 GetElementPtrInst(const GetElementPtrInst &GEPI);
|