Home
last modified time | relevance | path

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

12345678

/freebsd/contrib/llvm-project/llvm/lib/Target/BPF/
H A DBPFPreserveStaticOffset.cpp193 SmallVector<GetElementPtrInst *> Members;
275 static GetElementPtrInst *reconstructGEP(CallInst *Call, int Delta) { in reconstructGEP()
281 GetElementPtrInst::Create(GEPPointeeType, Call->getOperand(Delta), in reconstructGEP()
288 static void reconstructCommon(CallInst *Call, GetElementPtrInst *GEP, T *Insn, in reconstructCommon()
300 std::pair<GetElementPtrInst *, LoadInst *>
302 GetElementPtrInst *GEP = reconstructGEP(Call, 0); in reconstructLoad()
311 std::pair<GetElementPtrInst *, StoreInst *>
313 GetElementPtrInst *GEP = reconstructGEP(Call, 1); in reconstructStore()
329 static bool foldGEPChainAsStructAccess(SmallVector<GetElementPtrInst *> &GEPs, in foldGEPChainAsStructAccess()
334 if (!all_of(GEPs, [=](GetElementPtrInst *GEP) { in foldGEPChainAsStructAccess()
[all …]
H A DBPFASpaceCastSimplifyPass.cpp30 auto *GEP = dyn_cast<GetElementPtrInst>(OuterCast->getPointerOperand()); in match()
51 GetElementPtrInst *rewrite() { in rewrite()
52 auto *GEP = cast<GetElementPtrInst>(OuterCast->getPointerOperand()); in rewrite()
55 auto *NewGEP = cast<GetElementPtrInst>(GEP->clone()); in rewrite()
85 GetElementPtrInst *NewGEP = InsnChain.rewrite(); in run()
H A DBPF.h95 static std::pair<GetElementPtrInst *, LoadInst *>
98 static std::pair<GetElementPtrInst *, StoreInst *>
/freebsd/contrib/llvm-project/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);
/freebsd/contrib/llvm-project/llvm/lib/Transforms/Scalar/
H A DSeparateConstOffsetFromGEP.cpp240 static Value *Extract(Value *Idx, GetElementPtrInst *GEP,
246 static int64_t Find(Value *Idx, GetElementPtrInst *GEP);
394 bool splitGEP(GetElementPtrInst *GEP);
399 bool reorderGEP(GetElementPtrInst *GEP, TargetTransformInfo &TTI);
408 void lowerToSingleIndexGEPs(GetElementPtrInst *Variadic,
418 void lowerToArithmetics(GetElementPtrInst *Variadic,
426 int64_t accumulateByteOffset(GetElementPtrInst *GEP, bool &NeedsExtraction);
443 bool canonicalizeArrayIndicesToIndexSize(GetElementPtrInst *GEP);
470 void swapGEPOperand(GetElementPtrInst *First, GetElementPtrInst *Second);
473 bool isLegalToSwapOperand(GetElementPtrInst *First, GetElementPtrInst *Second,
[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()
457 GetElementPtrInst *NewGEP = cast<GetElementPtrInst>( in tryReassociateGEPAtIndex()
H A DStraightLineStrengthReduce.cpp217 void allocateCandidatesAndFindBasisForGEP(GetElementPtrInst *GEP);
238 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()
494 GetElementPtrInst *GEP) { in factorArrayIndex()
527 GetElementPtrInst *GEP) { in allocateCandidatesAndFindBasisForGEP()
662 bool InBounds = cast<GetElementPtrInst>(C.Ins)->isInBounds(); in rewriteCandidateWithBasis()
H A DGVNHoist.cpp891 if (const GetElementPtrInst *GepOp = in allGepOperandsAvailable()
892 dyn_cast<GetElementPtrInst>(Inst)) { in allGepOperandsAvailable()
919 if (GetElementPtrInst *GepOp = dyn_cast<GetElementPtrInst>(Op)) in makeGepsAvailable()
933 const GetElementPtrInst *OtherGep; in makeGepsAvailable()
935 OtherGep = cast<GetElementPtrInst>(OtherLd->getPointerOperand()); in makeGepsAvailable()
937 OtherGep = cast<GetElementPtrInst>( in makeGepsAvailable()
1034 GetElementPtrInst *Gep = nullptr; in makeGepOperandsAvailable()
1037 Gep = dyn_cast<GetElementPtrInst>(Ld->getPointerOperand()); in makeGepOperandsAvailable()
1039 Gep = dyn_cast<GetElementPtrInst>(St->getPointerOperand()); in makeGepOperandsAvailable()
1043 if (isa<GetElementPtrInst>(Val)) { in makeGepOperandsAvailable()
[all …]
H A DMergedLoadStoreMotion.cpp235 auto *GEP0 = dyn_cast<GetElementPtrInst>(S0->getPointerOperand()); in canSinkStoresAndGEPs()
236 auto *GEP1 = dyn_cast<GetElementPtrInst>(S1->getPointerOperand()); in canSinkStoresAndGEPs()
281 auto *GEP0 = cast<GetElementPtrInst>(Ptr0); in sinkStoresAndGEPs()
282 auto *GEP1 = cast<GetElementPtrInst>(Ptr1); in sinkStoresAndGEPs()
/freebsd/contrib/llvm-project/llvm/lib/Target/DirectX/
H A DDXILFlattenArrays.cpp60 bool visitGetElementPtrInst(GetElementPtrInst &GEPI);
159 GetElementPtrInst *OldGEP = in visitLoadInst()
160 cast<GetElementPtrInst>(CE->getAsInstruction()); in visitLoadInst()
182 GetElementPtrInst *OldGEP = in visitStoreInst()
183 cast<GetElementPtrInst>(CE->getAsInstruction()); in visitStoreInst()
215 bool DXILFlattenArraysVisitor::visitGetElementPtrInst(GetElementPtrInst &GEP) { in visitGetElementPtrInst()
231 GetElementPtrInst *OldGEPI = in visitGetElementPtrInst()
232 cast<GetElementPtrInst>(PtrOpGEPCE->getAsInstruction()); in visitGetElementPtrInst()
240 assert(isa<GetElementPtrInst>(NewGEP) && in visitGetElementPtrInst()
242 GetElementPtrInst *NewGEPI = cast<GetElementPtrInst>(NewGEP); in visitGetElementPtrInst()
[all …]
H A DDXILDataScalarization.cpp70 bool visitGetElementPtrInst(GetElementPtrInst &GEPI);
149 GetElementPtrInst *OldGEP = cast<GetElementPtrInst>(CE->getAsInstruction()); in visitLoadInst()
169 GetElementPtrInst *OldGEP = cast<GetElementPtrInst>(CE->getAsInstruction()); in visitStoreInst()
303 bool DataScalarizerVisitor::visitGetElementPtrInst(GetElementPtrInst &GEPI) { in visitGetElementPtrInst()
/freebsd/contrib/llvm-project/llvm/lib/Analysis/
H A DPHITransAddr.cpp30 if (isa<PHINode>(Inst) || isa<GetElementPtrInst>(Inst) || isa<CastInst>(Inst)) in canPHITrans()
201 if (GetElementPtrInst *GEP = dyn_cast<GetElementPtrInst>(Inst)) { in translateSubExpr()
231 if (GetElementPtrInst *GEPI = dyn_cast<GetElementPtrInst>(U)) in translateSubExpr()
383 if (GetElementPtrInst *GEP = dyn_cast<GetElementPtrInst>(Inst)) { in insertTranslatedSubExpr()
392 GetElementPtrInst *Result = GetElementPtrInst::Create( in insertTranslatedSubExpr()
/freebsd/contrib/llvm-project/llvm/lib/CodeGen/
H A DShadowStackGCLowering.cpp79 static GetElementPtrInst *CreateGEP(LLVMContext &Context, IRBuilder<> &B,
82 static GetElementPtrInst *CreateGEP(LLVMContext &Context, IRBuilder<> &B,
301 GetElementPtrInst *
310 assert(isa<GetElementPtrInst>(Val) && "Unexpected folded constant"); in CreateGEP()
312 return dyn_cast<GetElementPtrInst>(Val); in CreateGEP()
315 GetElementPtrInst *ShadowStackGCLoweringImpl::CreateGEP(LLVMContext &Context, in CreateGEP()
324 assert(isa<GetElementPtrInst>(Val) && "Unexpected folded constant"); in CreateGEP()
326 return dyn_cast<GetElementPtrInst>(Val); in CreateGEP()
/freebsd/contrib/llvm-project/llvm/lib/Transforms/Vectorize/
H A DLoopIdiomVectorize.cpp153 GetElementPtrInst *GEPA, GetElementPtrInst *GEPB,
157 GetElementPtrInst *GEPA,
158 GetElementPtrInst *GEPB, Value *ExtStart,
161 GetElementPtrInst *GEPA,
162 GetElementPtrInst *GEPB, Value *ExtStart,
165 void transformByteCompare(GetElementPtrInst *GEPA, GetElementPtrInst *GEPB,
350 GetElementPtrInst *GEPA = dyn_cast<GetElementPtrInst>(A); in recognizeByteCompare()
351 GetElementPtrInst *GEPB = dyn_cast<GetElementPtrInst>(B); in recognizeByteCompare()
426 IRBuilder<> &Builder, DomTreeUpdater &DTU, GetElementPtrInst *GEPA, in createMaskedFindMismatch()
427 GetElementPtrInst *GEPB, Value *ExtStart, Value *ExtEnd) { in createMaskedFindMismatch()
[all …]
/freebsd/contrib/llvm-project/llvm/lib/Transforms/Utils/
H A DRelLookupTableConverter.cpp36 GetElementPtrInst *GEP = in shouldConvertToRelLookupTable()
37 dyn_cast<GetElementPtrInst>(GV.use_begin()->getUser()); in shouldConvertToRelLookupTable()
152 GetElementPtrInst *GEP = in convertToRelLookupTable()
153 cast<GetElementPtrInst>(LookupTable.use_begin()->getUser()); in convertToRelLookupTable()
/freebsd/contrib/llvm-project/llvm/lib/Transforms/InstCombine/
H A DInstCombineLoadStoreAlloca.cpp87 if (auto *GEP = dyn_cast<GetElementPtrInst>(I)) { in isOnlyCopiedFromConstantMemory()
327 } else if (auto *GEP = dyn_cast<GetElementPtrInst>(Inst)) { in collectUsers()
413 } else if (auto *GEP = dyn_cast<GetElementPtrInst>(I)) { in replace()
418 GetElementPtrInst::Create(GEP->getSourceElementType(), V, Indices); in replace()
899 GetElementPtrInst *GEPI, Instruction *MemI, in canReplaceGEPIdxWithZero()
906 auto FirstNZIdx = [](const GetElementPtrInst *GEPI) { in canReplaceGEPIdxWithZero()
935 Type *AllocTy = GetElementPtrInst::getIndexedType(SourceElementType, Ops); in canReplaceGEPIdxWithZero()
975 if (GetElementPtrInst *GEPI = dyn_cast<GetElementPtrInst>(Ptr)) { in replaceGEPIdxWithZero()
994 if (GetElementPtrInst *GEPI = dyn_cast<GetElementPtrInst>(Ptr)) in canSimplifyNullStoreOrGEP()
1001 if (GetElementPtrInst *GEPI = dyn_cast<GetElementPtrInst>(Op)) { in canSimplifyNullLoadOrGEP()
[all …]
H A DInstCombinePHI.cpp152 } else if (GetElementPtrInst *GI = dyn_cast<GetElementPtrInst>(U)) { in foldIntegerTypedPHI()
535 GetElementPtrInst *FirstInst =cast<GetElementPtrInst>(PN.getIncomingValue(0)); in foldPHIArgGEPIntoPHI()
553 GetElementPtrInst *GEP = dyn_cast<GetElementPtrInst>(V); in foldPHIArgGEPIntoPHI()
630 GetElementPtrInst *InGEP = cast<GetElementPtrInst>(InVal); in foldPHIArgGEPIntoPHI()
639 GetElementPtrInst *NewGEP = in foldPHIArgGEPIntoPHI()
640 GetElementPtrInst::Create(FirstInst->getSourceElementType(), Base, in foldPHIArgGEPIntoPHI()
689 if (GetElementPtrInst *GEP = dyn_cast<GetElementPtrInst>(L->getOperand(0))) in isSafeAndProfitableToSinkLoad()
895 if (isa<GetElementPtrInst>(FirstInst)) in foldPHIArgOpIntoPHI()
1494 isa<GetElementPtrInst>(PHIUser)) && in visitPHINode()
/freebsd/contrib/llvm-project/llvm/include/llvm/Analysis/
H A DDelinearization.h24 class GetElementPtrInst; variable
125 const GetElementPtrInst *GEP,
H A DPtrUseVisitor.h177 bool adjustOffsetForGEP(GetElementPtrInst &GEPI);
272 void visitGetElementPtrInst(GetElementPtrInst &GEPI) { in visitGetElementPtrInst()
/freebsd/contrib/llvm-project/llvm/lib/Target/ARM/
H A DMVEGatherScatterLowering.cpp95 GetElementPtrInst *GEP, IRBuilder<> &Builder);
147 Value *foldGEP(GetElementPtrInst *GEP, Value *&Offsets, unsigned &Scale,
230 if (auto *GEP = dyn_cast<GetElementPtrInst>(Ptr)) { in decomposePtr()
255 GetElementPtrInst *GEP, in decomposeGEP()
743 GetElementPtrInst *GEP = dyn_cast<GetElementPtrInst>(Ptr); in tryCreateIncrementingGatScat()
954 if (isa<GetElementPtrInst>(U) || in hasAllGatScatUsers()
1186 Value *MVEGatherScatterLowering::foldGEP(GetElementPtrInst *GEP, in foldGEP()
1196 if (GetElementPtrInst *BaseGEP = dyn_cast<GetElementPtrInst>(GEPPtr)) { in foldGEP()
1214 GetElementPtrInst *GEP = dyn_cast<GetElementPtrInst>(Address); in optimiseAddress()
1218 if (GEP->hasOneUse() && isa<GetElementPtrInst>(GEP->getPointerOperand())) { in optimiseAddress()
[all …]
/freebsd/contrib/llvm-project/llvm/lib/Target/Hexagon/
H A DHexagonCommonGEP.cpp117 bool isHandledGepForm(GetElementPtrInst *GepI);
118 void processGepInst(GetElementPtrInst *GepI, ValueToNodeMap &NM);
328 bool HexagonCommonGEP::isHandledGepForm(GetElementPtrInst *GepI) { in isHandledGepForm()
338 void HexagonCommonGEP::processGepInst(GetElementPtrInst *GepI, in processGepInst()
365 if (isa<GetElementPtrInst>(*UI)) { in processGepInst()
366 GetElementPtrInst *UserG = cast<GetElementPtrInst>(*UI); in processGepInst()
390 PtrTy = GetElementPtrInst::getTypeAtIndex(PtrTy, Op); in processGepInst()
416 if (auto *GepI = dyn_cast<GetElementPtrInst>(&J)) in collect()
1081 GetElementPtrInst *NewInst = nullptr; in fabricateGEP()
1107 NewInst = GetElementPtrInst::Create(InpTy, Input, IdxList, "cgep", At); in fabricateGEP()
/freebsd/contrib/llvm-project/llvm/lib/Target/AMDGPU/
H A DAMDGPUPromoteAlloca.cpp247 if (isa<GetElementPtrInst>(U.getUser())) in collectAllocaUses()
265 if (isa<GetElementPtrInst>(Inst)) in sortAllocasToPromote()
387 Value *Ptr, const std::map<GetElementPtrInst *, WeakTrackingVH> &GEPIdx) { in calculateVectorIndex() argument
388 auto *GEP = dyn_cast<GetElementPtrInst>(Ptr->stripPointerCasts()); in calculateVectorIndex()
400 static Value *GEPToVectorIndex(GetElementPtrInst *GEP, AllocaInst *Alloca, in GEPToVectorIndex()
427 while (auto *CurGEP = dyn_cast<GetElementPtrInst>(CurPtr)) { in GEPToVectorIndex()
499 std::map<GetElementPtrInst *, WeakTrackingVH> &GEPVectorIdx, Value *CurVal, in promoteAllocaUserToVector() argument
846 std::map<GetElementPtrInst *, WeakTrackingVH> GEPVectorIdx; in tryPromoteAllocaToVector()
911 if (auto *GEP = dyn_cast<GetElementPtrInst>(Inst)) { in tryPromoteAllocaToVector()
944 GetElementPtrInst *GEP = dyn_cast<GetElementPtrInst>(Ptr); in tryPromoteAllocaToVector()
[all …]
H A DAMDGPUPrintfRuntimeBinding.cpp312 GetElementPtrInst *BufferIdx = GetElementPtrInst::Create( in lowerPrintfForGpu()
324 BufferIdx = GetElementPtrInst::Create(I8Ty, pcall, in lowerPrintfForGpu()
410 BufferIdx = GetElementPtrInst::Create( in lowerPrintfForGpu()
/freebsd/contrib/llvm-project/llvm/include/llvm/Transforms/Utils/
H A DFunctionComparator.h348 int cmpGEPs(const GetElementPtrInst *GEPL, in cmpGEPs()
349 const GetElementPtrInst *GEPR) const { in cmpGEPs()
/freebsd/contrib/llvm-project/llvm/include/llvm/Transforms/Vectorize/
H A DSLPVectorizer.h36 class GetElementPtrInst; variable
61 using GEPList = SmallVector<GetElementPtrInst *, 8>;

12345678