Home
last modified time | relevance | path

Searched refs:GetElementPtrInst (Results 1 – 25 of 157) sorted by relevance

1234567

/openbsd-src/gnu/llvm/llvm/include/llvm/Transforms/Scalar/
H A DNaryReassociate.h93 class GetElementPtrInst; variable
120 Instruction *tryReassociateGEP(GetElementPtrInst *GEP);
129 GetElementPtrInst *tryReassociateGEPAtIndex(GetElementPtrInst *GEP,
134 GetElementPtrInst *tryReassociateGEPAtIndex(GetElementPtrInst *GEP,
178 bool requiresSignExtension(Value *Index, GetElementPtrInst *GEP);
/openbsd-src/gnu/llvm/llvm/lib/Transforms/Scalar/
H A DSeparateConstOffsetFromGEP.cpp238 static Value *Extract(Value *Idx, GetElementPtrInst *GEP,
244 static int64_t Find(Value *Idx, GetElementPtrInst *GEP,
387 bool splitGEP(GetElementPtrInst *GEP);
396 void lowerToSingleIndexGEPs(GetElementPtrInst *Variadic,
406 void lowerToArithmetics(GetElementPtrInst *Variadic,
414 int64_t accumulateByteOffset(GetElementPtrInst *GEP, bool &NeedsExtraction);
431 bool canonicalizeArrayIndicesToPointerSize(GetElementPtrInst *GEP);
458 void swapGEPOperand(GetElementPtrInst *First, GetElementPtrInst *Second);
461 bool isLegalToSwapOperand(GetElementPtrInst *First, GetElementPtrInst *Second,
767 Value *ConstantOffsetExtractor::Extract(Value *Idx, GetElementPtrInst *GEP, in Extract()
[all …]
H A DStraightLineStrengthReduce.cpp213 void allocateCandidatesAndFindBasisForGEP(GetElementPtrInst *GEP);
234 GetElementPtrInst *GEP);
285 static bool isGEPFoldable(GetElementPtrInst *GEP, in isGEPFoldable()
307 return isGEPFoldable(cast<GetElementPtrInst>(C.Ins), TTI); in isFoldable()
312 static bool hasOnlyOneNonZeroIndex(GetElementPtrInst *GEP) { in hasOnlyOneNonZeroIndex()
334 hasOnlyOneNonZeroIndex(cast<GetElementPtrInst>(C.Ins))); in isSimplestForm()
392 allocateCandidatesAndFindBasisForGEP(cast<GetElementPtrInst>(I)); in allocateCandidatesAndFindBasis()
496 GetElementPtrInst *GEP) { in factorArrayIndex()
529 GetElementPtrInst *GEP) { in allocateCandidatesAndFindBasisForGEP()
595 cast<GetElementPtrInst>(Basis.Ins)->getResultElementType())); in emitBump()
[all …]
H A DNaryReassociate.cpp308 return tryReassociateGEP(cast<GetElementPtrInst>(I)); in tryReassociate()
328 static bool isGEPFoldable(GetElementPtrInst *GEP, in isGEPFoldable()
335 Instruction *NaryReassociatePass::tryReassociateGEP(GetElementPtrInst *GEP) { in tryReassociateGEP()
353 GetElementPtrInst *GEP) { in requiresSignExtension()
359 GetElementPtrInst *
360 NaryReassociatePass::tryReassociateGEPAtIndex(GetElementPtrInst *GEP, in tryReassociateGEPAtIndex()
394 GetElementPtrInst *
395 NaryReassociatePass::tryReassociateGEPAtIndex(GetElementPtrInst *GEP, in tryReassociateGEPAtIndex()
459 GetElementPtrInst *NewGEP = cast<GetElementPtrInst>( in tryReassociateGEPAtIndex()
H A DGVNHoist.cpp936 if (const GetElementPtrInst *GepOp = in allGepOperandsAvailable()
937 dyn_cast<GetElementPtrInst>(Inst)) { in allGepOperandsAvailable()
964 if (GetElementPtrInst *GepOp = dyn_cast<GetElementPtrInst>(Op)) in makeGepsAvailable()
978 const GetElementPtrInst *OtherGep; in makeGepsAvailable()
980 OtherGep = cast<GetElementPtrInst>(OtherLd->getPointerOperand()); in makeGepsAvailable()
982 OtherGep = cast<GetElementPtrInst>( in makeGepsAvailable()
1071 GetElementPtrInst *Gep = nullptr; in makeGepOperandsAvailable()
1074 Gep = dyn_cast<GetElementPtrInst>(Ld->getPointerOperand()); in makeGepOperandsAvailable()
1076 Gep = dyn_cast<GetElementPtrInst>(St->getPointerOperand()); in makeGepOperandsAvailable()
1080 if (isa<GetElementPtrInst>(Val)) { in makeGepOperandsAvailable()
[all …]
H A DMergedLoadStoreMotion.cpp229 auto *GEP0 = dyn_cast<GetElementPtrInst>(S0->getPointerOperand()); in canSinkStoresAndGEPs()
230 auto *GEP1 = dyn_cast<GetElementPtrInst>(S1->getPointerOperand()); in canSinkStoresAndGEPs()
267 auto *GEP0 = cast<GetElementPtrInst>(Ptr0); in sinkStoresAndGEPs()
268 auto *GEP1 = cast<GetElementPtrInst>(Ptr1); in sinkStoresAndGEPs()
/openbsd-src/gnu/llvm/llvm/lib/Analysis/
H A DPHITransAddr.cpp30 isa<GetElementPtrInst>(Inst)) in CanPHITrans()
214 if (GetElementPtrInst *GEP = dyn_cast<GetElementPtrInst>(Inst)) { in PHITranslateSubExpr()
241 if (GetElementPtrInst *GEPI = dyn_cast<GetElementPtrInst>(U)) in PHITranslateSubExpr()
397 if (GetElementPtrInst *GEP = dyn_cast<GetElementPtrInst>(Inst)) { in InsertPHITranslatedSubExpr()
407 GetElementPtrInst *Result = GetElementPtrInst::Create( in InsertPHITranslatedSubExpr()
H A DPtrUseVisitor.cpp32 bool detail::PtrUseVisitorBase::adjustOffsetForGEP(GetElementPtrInst &GEPI) { in adjustOffsetForGEP()
/openbsd-src/gnu/llvm/llvm/lib/CodeGen/
H A DShadowStackGCLowering.cpp81 static GetElementPtrInst *CreateGEP(LLVMContext &Context, IRBuilder<> &B,
84 static GetElementPtrInst *CreateGEP(LLVMContext &Context, IRBuilder<> &B,
261 GetElementPtrInst *ShadowStackGCLowering::CreateGEP(LLVMContext &Context, in CreateGEP()
271 assert(isa<GetElementPtrInst>(Val) && "Unexpected folded constant"); in CreateGEP()
273 return dyn_cast<GetElementPtrInst>(Val); in CreateGEP()
276 GetElementPtrInst *ShadowStackGCLowering::CreateGEP(LLVMContext &Context, in CreateGEP()
283 assert(isa<GetElementPtrInst>(Val) && "Unexpected folded constant"); in CreateGEP()
285 return dyn_cast<GetElementPtrInst>(Val); in CreateGEP()
/openbsd-src/gnu/llvm/llvm/lib/Transforms/Utils/
H A DRelLookupTableConverter.cpp36 GetElementPtrInst *GEP = in shouldConvertToRelLookupTable()
37 dyn_cast<GetElementPtrInst>(GV.use_begin()->getUser()); in shouldConvertToRelLookupTable()
131 GetElementPtrInst *GEP = in convertToRelLookupTable()
132 cast<GetElementPtrInst>(LookupTable.use_begin()->getUser()); in convertToRelLookupTable()
/openbsd-src/gnu/llvm/llvm/include/llvm/Analysis/
H A DDelinearization.h24 class GetElementPtrInst; variable
124 const GetElementPtrInst *GEP,
H A DPtrUseVisitor.h167 bool adjustOffsetForGEP(GetElementPtrInst &GEPI);
259 void visitGetElementPtrInst(GetElementPtrInst &GEPI) { in visitGetElementPtrInst()
H A DObjCARCAnalysisUtils.h141 (isa<GetElementPtrInst>(I) && in IsNoopInstruction()
142 cast<GetElementPtrInst>(I)->hasAllZeroIndices()); in IsNoopInstruction()
/openbsd-src/gnu/llvm/llvm/lib/Transforms/InstCombine/
H A DInstCombineLoadStoreAlloca.cpp87 if (auto *GEP = dyn_cast<GetElementPtrInst>(I)) { in isOnlyCopiedFromConstantMemory()
225 Instruction *GEP = GetElementPtrInst::CreateInBounds( in simplifyAllocaArraySize()
336 } else if (isa<GetElementPtrInst, BitCastInst>(Inst)) { in collectUsersRecursive()
381 } else if (auto *GEP = dyn_cast<GetElementPtrInst>(I)) { in replace()
387 GetElementPtrInst::Create(GEP->getSourceElementType(), V, Indices); in replace()
908 GetElementPtrInst *GEPI, Instruction *MemI, in canReplaceGEPIdxWithZero()
915 auto FirstNZIdx = [](const GetElementPtrInst *GEPI) { in canReplaceGEPIdxWithZero()
944 Type *AllocTy = GetElementPtrInst::getIndexedType(SourceElementType, Ops); in canReplaceGEPIdxWithZero()
985 if (GetElementPtrInst *GEPI = dyn_cast<GetElementPtrInst>(Ptr)) { in replaceGEPIdxWithZero()
1005 if (GetElementPtrInst *GEPI = dyn_cast<GetElementPtrInst>(Ptr)) in canSimplifyNullStoreOrGEP()
[all …]
H A DInstCombinePHI.cpp124 } else if (GetElementPtrInst *GI = dyn_cast<GetElementPtrInst>(U)) { in foldIntegerTypedPHI()
503 GetElementPtrInst *FirstInst =cast<GetElementPtrInst>(PN.getIncomingValue(0)); in foldPHIArgGEPIntoPHI()
520 GetElementPtrInst *GEP = dyn_cast<GetElementPtrInst>(V); in foldPHIArgGEPIntoPHI()
597 GetElementPtrInst *InGEP = cast<GetElementPtrInst>(InVal); in foldPHIArgGEPIntoPHI()
606 GetElementPtrInst *NewGEP = in foldPHIArgGEPIntoPHI()
607 GetElementPtrInst::Create(FirstInst->getSourceElementType(), Base, in foldPHIArgGEPIntoPHI()
657 if (GetElementPtrInst *GEP = dyn_cast<GetElementPtrInst>(L->getOperand(0))) in isSafeAndProfitableToSinkLoad()
871 if (isa<GetElementPtrInst>(FirstInst)) in foldPHIArgOpIntoPHI()
1440 (isa<BinaryOperator>(PHIUser) || isa<GetElementPtrInst>(PHIUser)) && in visitPHINode()
/openbsd-src/gnu/llvm/llvm/lib/Target/ARM/
H A DMVEGatherScatterLowering.cpp96 GetElementPtrInst *GEP, IRBuilder<> &Builder);
148 Value *foldGEP(GetElementPtrInst *GEP, Value *&Offsets, unsigned &Scale,
231 if (auto *GEP = dyn_cast<GetElementPtrInst>(Ptr)) { in decomposePtr()
256 GetElementPtrInst *GEP, in decomposeGEP()
744 GetElementPtrInst *GEP = dyn_cast<GetElementPtrInst>(Ptr); in tryCreateIncrementingGatScat()
949 if (isa<GetElementPtrInst>(U) || in hasAllGatScatUsers()
1182 Value *MVEGatherScatterLowering::foldGEP(GetElementPtrInst *GEP, in foldGEP()
1192 if (GetElementPtrInst *BaseGEP = dyn_cast<GetElementPtrInst>(GEPPtr)) { in foldGEP()
1210 GetElementPtrInst *GEP = dyn_cast<GetElementPtrInst>(Address); in optimiseAddress()
1214 if (GEP->hasOneUse() && isa<GetElementPtrInst>(GEP->getPointerOperand())) { in optimiseAddress()
[all …]
/openbsd-src/gnu/llvm/llvm/lib/Target/NVPTX/
H A DNVPTXLowerArgs.cpp180 if (auto *GEP = dyn_cast<GetElementPtrInst>(I.OldInstruction)) { in convertToParamAS()
182 auto *NewGEP = GetElementPtrInst::Create(GEP->getSourceElementType(), in convertToParamAS()
286 if (auto *I = dyn_cast<GetElementPtrInst>(CurUser)) { in adjustByValArgAlignment()
322 if (isa<GetElementPtrInst>(V) || isa<BitCastInst>(V) || isa<LoadInst>(V)) in handleByValParam()
/openbsd-src/gnu/llvm/llvm/include/llvm/Transforms/Utils/
H A DFunctionComparator.h347 int cmpGEPs(const GetElementPtrInst *GEPL, in cmpGEPs()
348 const GetElementPtrInst *GEPR) const { in cmpGEPs()
/openbsd-src/gnu/llvm/llvm/lib/IR/
H A DInstruction.cpp203 cast<GetElementPtrInst>(this)->setIsInBounds(false); in dropPoisonGeneratingFlags()
367 if (auto *SrcGEP = dyn_cast<GetElementPtrInst>(V)) in copyIRFlags()
368 if (auto *DestGEP = dyn_cast<GetElementPtrInst>(this)) in copyIRFlags()
392 if (auto *SrcGEP = dyn_cast<GetElementPtrInst>(V)) in andIRFlags()
393 if (auto *DestGEP = dyn_cast<GetElementPtrInst>(this)) in andIRFlags()
545 if (const GetElementPtrInst *GEP = dyn_cast<GetElementPtrInst>(I1)) in haveSameSpecialState()
547 cast<GetElementPtrInst>(I2)->getSourceElementType(); in haveSameSpecialState()
/openbsd-src/gnu/llvm/llvm/lib/Target/Hexagon/
H A DHexagonCommonGEP.cpp124 bool isHandledGepForm(GetElementPtrInst *GepI);
125 void processGepInst(GetElementPtrInst *GepI, ValueToNodeMap &NM);
335 bool HexagonCommonGEP::isHandledGepForm(GetElementPtrInst *GepI) { in isHandledGepForm()
345 void HexagonCommonGEP::processGepInst(GetElementPtrInst *GepI, in processGepInst()
372 if (isa<GetElementPtrInst>(*UI)) { in processGepInst()
373 GetElementPtrInst *UserG = cast<GetElementPtrInst>(*UI); in processGepInst()
397 PtrTy = GetElementPtrInst::getTypeAtIndex(PtrTy, Op); in processGepInst()
423 if (auto *GepI = dyn_cast<GetElementPtrInst>(&J)) in collect()
1086 GetElementPtrInst *NewInst = nullptr; in fabricateGEP()
1112 NewInst = GetElementPtrInst::Create(InpTy, Input, IdxList, "cgep", &*At); in fabricateGEP()
/openbsd-src/gnu/llvm/llvm/include/llvm/Transforms/Vectorize/
H A DSLPVectorizer.h36 class GetElementPtrInst; variable
61 using GEPList = SmallVector<GetElementPtrInst *, 8>;
/openbsd-src/gnu/llvm/llvm/lib/Target/AMDGPU/
H A DAMDGPUPromoteAlloca.cpp339 const std::map<GetElementPtrInst *, Value *> &GEPIdx) { in calculateVectorIndex() argument
340 auto *GEP = dyn_cast<GetElementPtrInst>(Ptr->stripPointerCasts()); in calculateVectorIndex()
349 static Value *GEPToVectorIndex(GetElementPtrInst *GEP, AllocaInst *Alloca, in GEPToVectorIndex()
425 std::map<GetElementPtrInst*, Value*> GEPVectorIdx; in tryPromoteAllocaToVector()
472 if (auto *GEP = dyn_cast<GetElementPtrInst>(Inst)) { in tryPromoteAllocaToVector()
503 GetElementPtrInst *GEP = dyn_cast<GetElementPtrInst>(Ptr); in tryPromoteAllocaToVector()
745 if (GetElementPtrInst *GEP = dyn_cast<GetElementPtrInst>(UseInst)) { in collectUsesWithPtrTypes()
H A DAMDGPUPrintfRuntimeBinding.cpp350 GetElementPtrInst *BufferIdx = GetElementPtrInst::Create( in lowerPrintfForGpu()
361 BufferIdx = GetElementPtrInst::Create(I8Ty, pcall, in lowerPrintfForGpu()
453 BufferIdx = GetElementPtrInst::Create(I8Ty, BufferIdx, BuffOffset, in lowerPrintfForGpu()
/openbsd-src/gnu/llvm/llvm/lib/Target/RISCV/
H A DRISCVGatherScatterLowering.cpp46 DenseMap<GetElementPtrInst *, std::pair<Value *, Value *>> StridedAddrs;
71 std::pair<Value *, Value *> determineBaseAndStride(GetElementPtrInst *GEP,
337 RISCVGatherScatterLowering::determineBaseAndStride(GetElementPtrInst *GEP, in determineBaseAndStride()
459 auto *GEP = dyn_cast<GetElementPtrInst>(Ptr); in tryCreateStridedLoadStore()
/openbsd-src/gnu/llvm/llvm/lib/Target/DirectX/DirectXIRPasses/
H A DPointerTypeAnalysis.cpp32 if (auto *Inst = dyn_cast<GetElementPtrInst>(V)) { in classifyPointerType()
50 } else if (const auto *Inst = dyn_cast<GetElementPtrInst>(User)) { in classifyPointerType()

1234567