Home
last modified time | relevance | path

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

1234567

/llvm-project-15.0.7/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);
/llvm-project-15.0.7/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,
458 void swapGEPOperand(GetElementPtrInst *First, GetElementPtrInst *Second);
461 bool isLegalToSwapOperand(GetElementPtrInst *First, GetElementPtrInst *Second,
795 GetElementPtrInst *GEP) { in canonicalizeArrayIndicesToPointerSize()
1128 NewGEP = GetElementPtrInst::Create( in splitGEP()
1170 if (GetElementPtrInst *GEP = dyn_cast<GetElementPtrInst>(&I)) in run()
[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()
529 GetElementPtrInst *GEP) { in allocateCandidatesAndFindBasisForGEP()
595 cast<GetElementPtrInst>(Basis.Ins)->getResultElementType())); in emitBump()
679 bool InBounds = cast<GetElementPtrInst>(C.Ins)->isInBounds(); in rewriteCandidateWithBasis()
[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()
458 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()
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()
1095 if (Val && isa<GetElementPtrInst>(Val)) in makeGepOperandsAvailable()
[all …]
/llvm-project-15.0.7/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()
398 if (GetElementPtrInst *GEP = dyn_cast<GetElementPtrInst>(Inst)) { in InsertPHITranslatedSubExpr()
408 GetElementPtrInst *Result = GetElementPtrInst::Create( in InsertPHITranslatedSubExpr()
H A DPtrUseVisitor.cpp32 bool detail::PtrUseVisitorBase::adjustOffsetForGEP(GetElementPtrInst &GEPI) { in adjustOffsetForGEP()
/llvm-project-15.0.7/llvm/lib/CodeGen/
H A DShadowStackGCLowering.cpp80 static GetElementPtrInst *CreateGEP(LLVMContext &Context, IRBuilder<> &B,
83 static GetElementPtrInst *CreateGEP(LLVMContext &Context, IRBuilder<> &B,
260 GetElementPtrInst *ShadowStackGCLowering::CreateGEP(LLVMContext &Context, in CreateGEP()
270 assert(isa<GetElementPtrInst>(Val) && "Unexpected folded constant"); in CreateGEP()
272 return dyn_cast<GetElementPtrInst>(Val); in CreateGEP()
275 GetElementPtrInst *ShadowStackGCLowering::CreateGEP(LLVMContext &Context, in CreateGEP()
282 assert(isa<GetElementPtrInst>(Val) && "Unexpected folded constant"); in CreateGEP()
284 return dyn_cast<GetElementPtrInst>(Val); in CreateGEP()
/llvm-project-15.0.7/llvm/unittests/Analysis/
H A DBasicAliasAnalysisTest.cpp118 cast<GetElementPtrInst>(B.CreateGEP(B.getInt8Ty(), I8, ArbitraryI32)); in TEST_F()
154 cast<GetElementPtrInst>(B.CreateGEP(B.getInt8Ty(), Ptr, B.getInt32(1))); in TEST_F()
159 cast<GetElementPtrInst>(B.CreateGEP(B.getInt8Ty(), Ptr, B.getInt32(1))); in TEST_F()
189 cast<GetElementPtrInst>(B.CreateGEP(B.getInt8Ty(), Ptr, B.getInt32(1))); in TEST_F()
191 cast<GetElementPtrInst>(B.CreateGEP(B.getInt8Ty(), Ptr, B.getInt32(1))); in TEST_F()
/llvm-project-15.0.7/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()
/llvm-project-15.0.7/llvm/lib/Transforms/InstCombine/
H A DInstCombineLoadStoreAlloca.cpp68 if (auto *GEP = dyn_cast<GetElementPtrInst>(I)) { in isOnlyCopiedFromConstantMemory()
200 Instruction *GEP = GetElementPtrInst::CreateInBounds( in simplifyAllocaArraySize()
259 } else if (isa<GetElementPtrInst>(Inst) || isa<BitCastInst>(Inst)) { in collectUsers()
296 } else if (auto *GEP = dyn_cast<GetElementPtrInst>(I)) { in replace()
302 GetElementPtrInst::Create(GEP->getSourceElementType(), V, Indices); in replace()
819 auto FirstNZIdx = [](const GetElementPtrInst *GEPI) { in canReplaceGEPIdxWithZero()
889 if (GetElementPtrInst *GEPI = dyn_cast<GetElementPtrInst>(Ptr)) { in replaceGEPIdxWithZero()
909 if (GetElementPtrInst *GEPI = dyn_cast<GetElementPtrInst>(Ptr)) in canSimplifyNullStoreOrGEP()
916 if (GetElementPtrInst *GEPI = dyn_cast<GetElementPtrInst>(Op)) { in canSimplifyNullLoadOrGEP()
1267 isa<GetElementPtrInst>(A)) in equivalentAddressValues()
[all …]
H A DInstCombinePHI.cpp123 } else if (GetElementPtrInst *GI = dyn_cast<GetElementPtrInst>(U)) { in foldIntegerTypedPHI()
496 GetElementPtrInst *FirstInst =cast<GetElementPtrInst>(PN.getIncomingValue(0)); in foldPHIArgGEPIntoPHI()
513 GetElementPtrInst *GEP = dyn_cast<GetElementPtrInst>(V); in foldPHIArgGEPIntoPHI()
590 GetElementPtrInst *InGEP = cast<GetElementPtrInst>(InVal); in foldPHIArgGEPIntoPHI()
599 GetElementPtrInst *NewGEP = in foldPHIArgGEPIntoPHI()
600 GetElementPtrInst::Create(FirstInst->getSourceElementType(), Base, in foldPHIArgGEPIntoPHI()
650 if (GetElementPtrInst *GEP = dyn_cast<GetElementPtrInst>(L->getOperand(0))) in isSafeAndProfitableToSinkLoad()
864 if (isa<GetElementPtrInst>(FirstInst)) in foldPHIArgOpIntoPHI()
1433 (isa<BinaryOperator>(PHIUser) || isa<GetElementPtrInst>(PHIUser)) && in visitPHINode()
/llvm-project-15.0.7/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()
/llvm-project-15.0.7/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 …]
/llvm-project-15.0.7/llvm/lib/Target/NVPTX/
H A DNVPTXLowerArgs.cpp179 if (auto *GEP = dyn_cast<GetElementPtrInst>(I.OldInstruction)) { in convertToParamAS()
181 auto *NewGEP = GetElementPtrInst::Create(GEP->getSourceElementType(), in convertToParamAS()
285 if (auto *I = dyn_cast<GetElementPtrInst>(CurUser)) { in adjustByValArgAlignment()
321 if (isa<GetElementPtrInst>(V) || isa<BitCastInst>(V) || isa<LoadInst>(V)) in handleByValParam()
/llvm-project-15.0.7/llvm/lib/Target/DirectX/
H A DPointerTypeAnalysis.cpp27 if (auto *Inst = dyn_cast<GetElementPtrInst>(V)) { in classifyPointerType()
39 } else if (const auto *Inst = dyn_cast<GetElementPtrInst>(User)) { in classifyPointerType()
/llvm-project-15.0.7/llvm/include/llvm/Transforms/Utils/
H A DFunctionComparator.h347 int cmpGEPs(const GetElementPtrInst *GEPL, in cmpGEPs()
348 const GetElementPtrInst *GEPR) const { in cmpGEPs()
/llvm-project-15.0.7/llvm/lib/IR/
H A DInstruction.cpp165 cast<GetElementPtrInst>(this)->setIsInBounds(false); in dropPoisonGeneratingFlags()
317 if (auto *SrcGEP = dyn_cast<GetElementPtrInst>(V)) in copyIRFlags()
318 if (auto *DestGEP = dyn_cast<GetElementPtrInst>(this)) in copyIRFlags()
342 if (auto *SrcGEP = dyn_cast<GetElementPtrInst>(V)) in andIRFlags()
343 if (auto *DestGEP = dyn_cast<GetElementPtrInst>(this)) in andIRFlags()
495 if (const GetElementPtrInst *GEP = dyn_cast<GetElementPtrInst>(I1)) in haveSameSpecialState()
497 cast<GetElementPtrInst>(I2)->getSourceElementType(); in haveSameSpecialState()
/llvm-project-15.0.7/llvm/include/llvm/Transforms/Vectorize/
H A DSLPVectorizer.h35 class GetElementPtrInst; variable
59 using GEPList = SmallVector<GetElementPtrInst *, 8>;
/llvm-project-15.0.7/llvm/unittests/IR/
H A DInstructionsTest.cpp489 GetElementPtrInst *Gep0 = GetElementPtrInst::Create(I32Ty, PtrVecA, C2xi32a); in TEST()
490 GetElementPtrInst *Gep1 = GetElementPtrInst::Create(I32Ty, PtrVecA, C2xi32b); in TEST()
491 GetElementPtrInst *Gep2 = GetElementPtrInst::Create(I32Ty, PtrVecB, C2xi32a); in TEST()
492 GetElementPtrInst *Gep3 = GetElementPtrInst::Create(I32Ty, PtrVecB, C2xi32b); in TEST()
520 GetElementPtrInst *GepII0 = GetElementPtrInst::Create(I32Ty, Gep0, C2xi32b); in TEST()
521 GetElementPtrInst *GepII1 = GetElementPtrInst::Create(I32Ty, Gep1, C2xi32a); in TEST()
522 GetElementPtrInst *GepII2 = GetElementPtrInst::Create(I32Ty, Gep2, C2xi32b); in TEST()
523 GetElementPtrInst *GepII3 = GetElementPtrInst::Create(I32Ty, Gep3, C2xi32a); in TEST()
854 auto *GI = cast<GetElementPtrInst>( in TEST_F()
874 ASSERT_TRUE(isa<GetElementPtrInst>(V)); in TEST()
[all …]
/llvm-project-15.0.7/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()
/llvm-project-15.0.7/llvm/unittests/Transforms/Utils/
H A DScalarEvolutionExpanderTest.cpp105 GetElementPtrInst *Gep0 = in TEST_F()
106 GetElementPtrInst::Create(I32Ty, Alloca, Ci32, "gep0", Br); in TEST_F()
109 GetElementPtrInst *Gep1 = in TEST_F()
110 GetElementPtrInst::Create(I8Ty, CastA, Ci32, "gep1", Br); in TEST_F()
111 GetElementPtrInst *Gep2 = GetElementPtrInst::Create( in TEST_F()
951 auto *GEP = dyn_cast<GetElementPtrInst>(Cast->getOperand(0)); in TEST_F()
956 auto *GEP1 = dyn_cast<GetElementPtrInst>(Cast1->getOperand(0)); in TEST_F()
/llvm-project-15.0.7/llvm/lib/Target/RISCV/
H A DRISCVGatherScatterLowering.cpp43 DenseMap<GetElementPtrInst *, std::pair<Value *, Value *>> StridedAddrs;
68 std::pair<Value *, Value *> determineBaseAndStride(GetElementPtrInst *GEP,
328 RISCVGatherScatterLowering::determineBaseAndStride(GetElementPtrInst *GEP, in determineBaseAndStride()
425 auto *GEP = dyn_cast<GetElementPtrInst>(Ptr); in tryCreateStridedLoadStore()

1234567