| /freebsd/contrib/llvm-project/llvm/lib/Target/BPF/ |
| H A D | BPFPreserveStaticOffset.cpp | 193 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 D | BPFASpaceCastSimplifyPass.cpp | 30 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 D | BPF.h | 95 static std::pair<GetElementPtrInst *, LoadInst *> 98 static std::pair<GetElementPtrInst *, StoreInst *>
|
| /freebsd/contrib/llvm-project/llvm/include/llvm/Transforms/Scalar/ |
| H A D | NaryReassociate.h | 93 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 D | SeparateConstOffsetFromGEP.cpp | 240 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 D | NaryReassociate.cpp | 308 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 D | StraightLineStrengthReduce.cpp | 217 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 D | GVNHoist.cpp | 891 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 D | MergedLoadStoreMotion.cpp | 235 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 D | DXILFlattenArrays.cpp | 60 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 D | DXILDataScalarization.cpp | 70 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 D | PHITransAddr.cpp | 30 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 D | ShadowStackGCLowering.cpp | 79 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 D | LoopIdiomVectorize.cpp | 153 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 D | RelLookupTableConverter.cpp | 36 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 D | InstCombineLoadStoreAlloca.cpp | 87 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 D | InstCombinePHI.cpp | 152 } 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 D | Delinearization.h | 24 class GetElementPtrInst; variable 125 const GetElementPtrInst *GEP,
|
| H A D | PtrUseVisitor.h | 177 bool adjustOffsetForGEP(GetElementPtrInst &GEPI); 272 void visitGetElementPtrInst(GetElementPtrInst &GEPI) { in visitGetElementPtrInst()
|
| /freebsd/contrib/llvm-project/llvm/lib/Target/ARM/ |
| H A D | MVEGatherScatterLowering.cpp | 95 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 D | HexagonCommonGEP.cpp | 117 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 D | AMDGPUPromoteAlloca.cpp | 247 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 D | AMDGPUPrintfRuntimeBinding.cpp | 312 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 D | FunctionComparator.h | 348 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 D | SLPVectorizer.h | 36 class GetElementPtrInst; variable 61 using GEPList = SmallVector<GetElementPtrInst *, 8>;
|