/freebsd/contrib/llvm-project/llvm/lib/Target/BPF/ |
H A D | BPFPreserveStaticOffset.cpp | 195 SmallVector<GetElementPtrInst *> Members; 278 static GetElementPtrInst *reconstructGEP(CallInst *Call, int Delta) { in reconstructGEP() 284 GetElementPtrInst::Create(GEPPointeeType, Call->getOperand(Delta), in reconstructGEP() 291 static void reconstructCommon(CallInst *Call, GetElementPtrInst *GEP, T *Insn, in reconstructCommon() 303 std::pair<GetElementPtrInst *, LoadInst *> 305 GetElementPtrInst *GEP = reconstructGEP(Call, 0); in reconstructLoad() 314 std::pair<GetElementPtrInst *, StoreInst *> 316 GetElementPtrInst *GEP = reconstructGEP(Call, 1); in reconstructStore() 332 static bool foldGEPChainAsStructAccess(SmallVector<GetElementPtrInst *> &GEPs, in foldGEPChainAsStructAccess() 337 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 | 92 static std::pair<GetElementPtrInst *, LoadInst *> 95 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 | 238 static Value *Extract(Value *Idx, GetElementPtrInst *GEP, 244 static int64_t Find(Value *Idx, GetElementPtrInst *GEP); 392 bool splitGEP(GetElementPtrInst *GEP); 397 bool reorderGEP(GetElementPtrInst *GEP, TargetTransformInfo &TTI); 406 void lowerToSingleIndexGEPs(GetElementPtrInst *Variadic, 416 void lowerToArithmetics(GetElementPtrInst *Variadic, 424 int64_t accumulateByteOffset(GetElementPtrInst *GEP, bool &NeedsExtraction); 441 bool canonicalizeArrayIndicesToIndexSize(GetElementPtrInst *GEP); 468 void swapGEPOperand(GetElementPtrInst *First, GetElementPtrInst *Second); 471 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() 459 GetElementPtrInst *NewGEP = cast<GetElementPtrInst>( in tryReassociateGEPAtIndex()
|
H A D | StraightLineStrengthReduce.cpp | 213 void allocateCandidatesAndFindBasisForGEP(GetElementPtrInst *GEP); 234 GetElementPtrInst *GEP); 281 static bool isGEPFoldable(GetElementPtrInst *GEP, in isGEPFoldable() 303 return isGEPFoldable(cast<GetElementPtrInst>(C.Ins), TTI); in isFoldable() 308 static bool hasOnlyOneNonZeroIndex(GetElementPtrInst *GEP) { in hasOnlyOneNonZeroIndex() 330 hasOnlyOneNonZeroIndex(cast<GetElementPtrInst>(C.Ins))); in isSimplestForm() 388 allocateCandidatesAndFindBasisForGEP(cast<GetElementPtrInst>(I)); in allocateCandidatesAndFindBasis() 490 GetElementPtrInst *GEP) { in factorArrayIndex() 523 GetElementPtrInst *GEP) { in allocateCandidatesAndFindBasisForGEP() 655 bool InBounds = cast<GetElementPtrInst>(C.Ins)->isInBounds(); in rewriteCandidateWithBasis()
|
H A D | GVNHoist.cpp | 893 if (const GetElementPtrInst *GepOp = in allGepOperandsAvailable() 894 dyn_cast<GetElementPtrInst>(Inst)) { in allGepOperandsAvailable() 921 if (GetElementPtrInst *GepOp = dyn_cast<GetElementPtrInst>(Op)) in makeGepsAvailable() 935 const GetElementPtrInst *OtherGep; in makeGepsAvailable() 937 OtherGep = cast<GetElementPtrInst>(OtherLd->getPointerOperand()); in makeGepsAvailable() 939 OtherGep = cast<GetElementPtrInst>( in makeGepsAvailable() 1036 GetElementPtrInst *Gep = nullptr; in makeGepOperandsAvailable() 1039 Gep = dyn_cast<GetElementPtrInst>(Ld->getPointerOperand()); in makeGepOperandsAvailable() 1041 Gep = dyn_cast<GetElementPtrInst>(St->getPointerOperand()); in makeGepOperandsAvailable() 1045 if (isa<GetElementPtrInst>(Val)) { in makeGepOperandsAvailable() [all …]
|
H A D | MergedLoadStoreMotion.cpp | 234 auto *GEP0 = dyn_cast<GetElementPtrInst>(S0->getPointerOperand()); in canSinkStoresAndGEPs() 235 auto *GEP1 = dyn_cast<GetElementPtrInst>(S1->getPointerOperand()); in canSinkStoresAndGEPs() 279 auto *GEP0 = cast<GetElementPtrInst>(Ptr0); in sinkStoresAndGEPs() 280 auto *GEP1 = cast<GetElementPtrInst>(Ptr1); in sinkStoresAndGEPs()
|
/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() 228 if (GetElementPtrInst *GEPI = dyn_cast<GetElementPtrInst>(U)) in translateSubExpr() 380 if (GetElementPtrInst *GEP = dyn_cast<GetElementPtrInst>(Inst)) { in insertTranslatedSubExpr() 389 GetElementPtrInst *Result = GetElementPtrInst::Create( in insertTranslatedSubExpr()
|
/freebsd/contrib/llvm-project/llvm/lib/Transforms/Vectorize/ |
H A D | LoopIdiomVectorize.cpp | 123 GetElementPtrInst *GEPA, GetElementPtrInst *GEPB, 127 GetElementPtrInst *GEPA, 128 GetElementPtrInst *GEPB, Value *ExtStart, 131 GetElementPtrInst *GEPA, 132 GetElementPtrInst *GEPB, Value *ExtStart, 135 void transformByteCompare(GetElementPtrInst *GEPA, GetElementPtrInst *GEPB, 301 GetElementPtrInst *GEPA = dyn_cast<GetElementPtrInst>(A); in recognizeByteCompare() 302 GetElementPtrInst *GEPB = dyn_cast<GetElementPtrInst>(B); in recognizeByteCompare() 377 IRBuilder<> &Builder, DomTreeUpdater &DTU, GetElementPtrInst *GEPA, in createMaskedFindMismatch() 378 GetElementPtrInst *GEPB, Value *ExtStart, Value *ExtEnd) { in createMaskedFindMismatch() [all …]
|
/freebsd/contrib/llvm-project/llvm/lib/CodeGen/ |
H A D | ShadowStackGCLowering.cpp | 80 static GetElementPtrInst *CreateGEP(LLVMContext &Context, IRBuilder<> &B, 83 static GetElementPtrInst *CreateGEP(LLVMContext &Context, IRBuilder<> &B, 303 GetElementPtrInst * in runOnFunction() 312 assert(isa<GetElementPtrInst>(Val) && "Unexpected folded constant"); in runOnFunction() 314 return dyn_cast<GetElementPtrInst>(Val); in runOnFunction() 317 GetElementPtrInst *ShadowStackGCLoweringImpl::CreateGEP(LLVMContext &Context, in runOnFunction() 326 assert(isa<GetElementPtrInst>(Val) && "Unexpected folded constant"); in runOnFunction() 328 return dyn_cast<GetElementPtrInst>(Val); in runOnFunction()
|
/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() 131 GetElementPtrInst *GEP = in convertToRelLookupTable() 132 cast<GetElementPtrInst>(LookupTable.use_begin()->getUser()); in convertToRelLookupTable()
|
/freebsd/contrib/llvm-project/llvm/lib/Transforms/InstCombine/ |
H A D | InstCombineLoadStoreAlloca.cpp | 94 if (auto *GEP = dyn_cast<GetElementPtrInst>(I)) { in isOnlyCopiedFromConstantMemory() 335 } else if (isa<GetElementPtrInst>(Inst)) { in collectUsersRecursive() 386 } else if (auto *GEP = dyn_cast<GetElementPtrInst>(I)) { in replace() 391 GetElementPtrInst::Create(GEP->getSourceElementType(), V, Indices); in replace() 891 GetElementPtrInst *GEPI, Instruction *MemI, in canReplaceGEPIdxWithZero() 898 auto FirstNZIdx = [](const GetElementPtrInst *GEPI) { in canReplaceGEPIdxWithZero() 927 Type *AllocTy = GetElementPtrInst::getIndexedType(SourceElementType, Ops); in canReplaceGEPIdxWithZero() 967 if (GetElementPtrInst *GEPI = dyn_cast<GetElementPtrInst>(Ptr)) { in replaceGEPIdxWithZero() 986 if (GetElementPtrInst *GEPI = dyn_cast<GetElementPtrInst>(Ptr)) in canSimplifyNullStoreOrGEP() 993 if (GetElementPtrInst *GEPI = dyn_cast<GetElementPtrInst>(Op)) { in canSimplifyNullLoadOrGEP() [all …]
|
H A D | InstCombinePHI.cpp | 124 } else if (GetElementPtrInst *GI = dyn_cast<GetElementPtrInst>(U)) { in foldIntegerTypedPHI() 503 GetElementPtrInst *FirstInst =cast<GetElementPtrInst>(PN.getIncomingValue(0)); in foldPHIArgGEPIntoPHI() 521 GetElementPtrInst *GEP = dyn_cast<GetElementPtrInst>(V); in foldPHIArgGEPIntoPHI() 598 GetElementPtrInst *InGEP = cast<GetElementPtrInst>(InVal); in foldPHIArgGEPIntoPHI() 607 GetElementPtrInst *NewGEP = in foldPHIArgGEPIntoPHI() 608 GetElementPtrInst::Create(FirstInst->getSourceElementType(), Base, in foldPHIArgGEPIntoPHI() 657 if (GetElementPtrInst *GEP = dyn_cast<GetElementPtrInst>(L->getOperand(0))) in isSafeAndProfitableToSinkLoad() 872 if (isa<GetElementPtrInst>(FirstInst)) in foldPHIArgOpIntoPHI() 1497 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 | 167 bool adjustOffsetForGEP(GetElementPtrInst &GEPI); 259 void visitGetElementPtrInst(GetElementPtrInst &GEPI) { in visitGetElementPtrInst()
|
H A D | ObjCARCAnalysisUtils.h | 141 (isa<GetElementPtrInst>(I) && in IsNoopInstruction() 142 cast<GetElementPtrInst>(I)->hasAllZeroIndices()); in IsNoopInstruction()
|
/freebsd/contrib/llvm-project/llvm/lib/Target/ARM/ |
H A D | MVEGatherScatterLowering.cpp | 96 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() 955 if (isa<GetElementPtrInst>(U) || in hasAllGatScatUsers() 1188 Value *MVEGatherScatterLowering::foldGEP(GetElementPtrInst *GEP, in foldGEP() 1198 if (GetElementPtrInst *BaseGEP = dyn_cast<GetElementPtrInst>(GEPPtr)) { in foldGEP() 1216 GetElementPtrInst *GEP = dyn_cast<GetElementPtrInst>(Address); in optimiseAddress() 1220 if (GEP->hasOneUse() && isa<GetElementPtrInst>(GEP->getPointerOperand())) { in optimiseAddress() [all …]
|
/freebsd/contrib/llvm-project/llvm/lib/Target/Hexagon/ |
H A D | HexagonCommonGEP.cpp | 124 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()
|
/freebsd/contrib/llvm-project/llvm/lib/Target/AMDGPU/ |
H A D | AMDGPUPromoteAlloca.cpp | 260 if (isa<GetElementPtrInst>(U.getUser())) in collectAllocaUses() 278 if (isa<GetElementPtrInst>(Inst)) in sortAllocasToPromote() 390 const std::map<GetElementPtrInst *, Value *> &GEPIdx) { in calculateVectorIndex() argument 391 auto *GEP = dyn_cast<GetElementPtrInst>(Ptr->stripPointerCasts()); in calculateVectorIndex() 400 static Value *GEPToVectorIndex(GetElementPtrInst *GEP, AllocaInst *Alloca, in GEPToVectorIndex() 452 std::map<GetElementPtrInst *, Value *> &GEPVectorIdx, Value *CurVal, in promoteAllocaUserToVector() argument 760 std::map<GetElementPtrInst *, Value *> GEPVectorIdx; in tryPromoteAllocaToVector() 815 if (auto *GEP = dyn_cast<GetElementPtrInst>(Inst)) { in tryPromoteAllocaToVector() 849 GetElementPtrInst *GEP = dyn_cast<GetElementPtrInst>(Ptr); in tryPromoteAllocaToVector() 1215 if (GetElementPtrInst *GEP = dyn_cast<GetElementPtrInst>(UseInst)) { in collectUsesWithPtrTypes()
|
H A D | AMDGPUPrintfRuntimeBinding.cpp | 319 GetElementPtrInst *BufferIdx = GetElementPtrInst::Create( in lowerPrintfForGpu() 331 BufferIdx = GetElementPtrInst::Create(I8Ty, pcall, in lowerPrintfForGpu() 417 BufferIdx = GetElementPtrInst::Create( in lowerPrintfForGpu()
|
/freebsd/contrib/llvm-project/llvm/include/llvm/Transforms/Utils/ |
H A D | FunctionComparator.h | 344 int cmpGEPs(const GetElementPtrInst *GEPL, 345 const GetElementPtrInst *GEPR) const {
|
/freebsd/contrib/llvm-project/llvm/include/llvm/Transforms/Vectorize/ |
H A D | SLPVectorizer.h | 36 class GetElementPtrInst; variable 61 using GEPList = SmallVector<GetElementPtrInst *, 8>;
|
/freebsd/contrib/llvm-project/llvm/lib/Target/NVPTX/ |
H A D | NVPTXLowerArgs.cpp | 236 if (auto *GEP = dyn_cast<GetElementPtrInst>(I.OldInstruction)) { in INITIALIZE_PASS_DEPENDENCY() 238 auto *NewGEP = GetElementPtrInst::Create( in INITIALIZE_PASS_DEPENDENCY() 379 if (auto *I = dyn_cast<GetElementPtrInst>(CurUser)) { in adjustByValArgAlignment() 423 if (isa<GetElementPtrInst>(V) || isa<BitCastInst>(V) || isa<LoadInst>(V)) in handleByValParam()
|