Home
last modified time | relevance | path

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

12345

/freebsd-12.1/contrib/llvm/lib/Transforms/Scalar/
H A DSeparateConstOffsetFromGEP.cpp243 static int64_t Find(Value *Idx, GetElementPtrInst *GEP,
373 bool splitGEP(GetElementPtrInst *GEP);
392 void lowerToArithmetics(GetElementPtrInst *Variadic,
442 void swapGEPOperand(GetElementPtrInst *First, GetElementPtrInst *Second);
445 bool isLegalToSwapOperand(GetElementPtrInst *First, GetElementPtrInst *Second,
764 GetElementPtrInst *GEP) { in canonicalizeArrayIndicesToPointerSize()
873 GetElementPtrInst *FirstGEP = dyn_cast_or_null<GetElementPtrInst>(FirstResult); in lowerToSingleIndexGEPs()
874 GetElementPtrInst *SecondGEP = dyn_cast_or_null<GetElementPtrInst>(ResultPtr); in lowerToSingleIndexGEPs()
1098 NewGEP = GetElementPtrInst::Create( in splitGEP()
1129 if (GetElementPtrInst *GEP = dyn_cast<GetElementPtrInst>(I++)) in runOnFunction()
[all …]
H A DNaryReassociate.cpp292 return tryReassociateGEP(cast<GetElementPtrInst>(I)); in tryReassociate()
298 static bool isGEPFoldable(GetElementPtrInst *GEP, in isGEPFoldable()
307 Instruction *NaryReassociatePass::tryReassociateGEP(GetElementPtrInst *GEP) { in tryReassociateGEP()
325 GetElementPtrInst *GEP) { in requiresSignExtension()
331 GetElementPtrInst *
332 NaryReassociatePass::tryReassociateGEPAtIndex(GetElementPtrInst *GEP, in tryReassociateGEPAtIndex()
366 GetElementPtrInst *
367 NaryReassociatePass::tryReassociateGEPAtIndex(GetElementPtrInst *GEP, in tryReassociateGEPAtIndex()
430 GetElementPtrInst *NewGEP = in tryReassociateGEPAtIndex()
431 cast<GetElementPtrInst>(Builder.CreateGEP(Candidate, RHS)); in tryReassociateGEPAtIndex()
H A DStraightLineStrengthReduce.cpp201 void allocateCandidatesAndFindBasisForGEP(GetElementPtrInst *GEP);
222 GetElementPtrInst *GEP);
273 static bool isGEPFoldable(GetElementPtrInst *GEP, in isGEPFoldable()
297 return isGEPFoldable(cast<GetElementPtrInst>(C.Ins), TTI); in isFoldable()
302 static bool hasOnlyOneNonZeroIndex(GetElementPtrInst *GEP) { in hasOnlyOneNonZeroIndex()
324 hasOnlyOneNonZeroIndex(cast<GetElementPtrInst>(C.Ins))); in isSimplestForm()
382 allocateCandidatesAndFindBasisForGEP(cast<GetElementPtrInst>(I)); in allocateCandidatesAndFindBasis()
486 GetElementPtrInst *GEP) { in factorArrayIndex()
519 GetElementPtrInst *GEP) { in allocateCandidatesAndFindBasisForGEP()
585 cast<GetElementPtrInst>(Basis.Ins)->getResultElementType())); in emitBump()
[all …]
H A DGVNHoist.cpp834 if (const GetElementPtrInst *GepOp = in allGepOperandsAvailable()
835 dyn_cast<GetElementPtrInst>(Inst)) { in allGepOperandsAvailable()
864 if (GetElementPtrInst *GepOp = dyn_cast<GetElementPtrInst>(Op)) in makeGepsAvailable()
878 const GetElementPtrInst *OtherGep; in makeGepsAvailable()
882 OtherGep = cast<GetElementPtrInst>( in makeGepsAvailable()
979 GetElementPtrInst *Gep = nullptr; in makeGepOperandsAvailable()
982 Gep = dyn_cast<GetElementPtrInst>(Ld->getPointerOperand()); in makeGepOperandsAvailable()
984 Gep = dyn_cast<GetElementPtrInst>(St->getPointerOperand()); in makeGepOperandsAvailable()
988 if (isa<GetElementPtrInst>(Val)) { in makeGepOperandsAvailable()
1003 if (Val && isa<GetElementPtrInst>(Val)) in makeGepOperandsAvailable()
[all …]
H A DInferAddressSpaces.cpp359 if (auto *GEP = dyn_cast<GetElementPtrInst>(&I)) { in collectFlatAddressExpressions()
486 GetElementPtrInst *GEP = cast<GetElementPtrInst>(I); in cloneInstructionWithNewAddressSpace()
487 GetElementPtrInst *NewGEP = GetElementPtrInst::Create( in cloneInstructionWithNewAddressSpace()
/freebsd-12.1/contrib/llvm/include/llvm/Transforms/Scalar/
H A DNaryReassociate.h94 class GetElementPtrInst; variable
121 Instruction *tryReassociateGEP(GetElementPtrInst *GEP);
130 GetElementPtrInst *tryReassociateGEPAtIndex(GetElementPtrInst *GEP,
135 GetElementPtrInst *tryReassociateGEPAtIndex(GetElementPtrInst *GEP,
166 bool requiresSignExtension(Value *Index, GetElementPtrInst *GEP);
/freebsd-12.1/contrib/llvm/lib/Analysis/
H A DPHITransAddr.cpp28 isa<GetElementPtrInst>(Inst)) in CanPHITrans()
215 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.cpp34 bool detail::PtrUseVisitorBase::adjustOffsetForGEP(GetElementPtrInst &GEPI) { in adjustOffsetForGEP()
/freebsd-12.1/contrib/llvm/lib/CodeGen/
H A DShadowStackGCLowering.cpp78 static GetElementPtrInst *CreateGEP(LLVMContext &Context, IRBuilder<> &B,
81 static GetElementPtrInst *CreateGEP(LLVMContext &Context, IRBuilder<> &B,
256 GetElementPtrInst *ShadowStackGCLowering::CreateGEP(LLVMContext &Context, in CreateGEP()
266 assert(isa<GetElementPtrInst>(Val) && "Unexpected folded constant"); in CreateGEP()
268 return dyn_cast<GetElementPtrInst>(Val); in CreateGEP()
271 GetElementPtrInst *ShadowStackGCLowering::CreateGEP(LLVMContext &Context, in CreateGEP()
278 assert(isa<GetElementPtrInst>(Val) && "Unexpected folded constant"); in CreateGEP()
280 return dyn_cast<GetElementPtrInst>(Val); in CreateGEP()
H A DCodeGenPrepare.cpp886 static bool getGEPSmallConstantIntOffsetV(GetElementPtrInst *GEP, in getGEPSmallConstantIntOffsetV()
4019 auto *GEP = cast<GetElementPtrInst>(AddrInst); in matchOperationAddr()
4022 !isa<GetElementPtrInst>(BaseI))) { in matchOperationAddr()
4558 GetElementPtrInst *GEP = LargeOffsetGEP.first; in optimizeMemoryInst()
5143 GetElementPtrInst *GEP = LargeOffsetGEP->first; in splitLargeGEPOffsets()
6591 std::vector<GetElementPtrInst *> UGEPIs; in tryUnmergingGEPsAcrossIndirectBr()
6604 if (!isa<GetElementPtrInst>(Usr)) in tryUnmergingGEPsAcrossIndirectBr()
6606 auto *UGEPI = cast<GetElementPtrInst>(Usr); in tryUnmergingGEPsAcrossIndirectBr()
6626 for (GetElementPtrInst *UGEPI : UGEPIs) { in tryUnmergingGEPsAcrossIndirectBr()
6634 for (GetElementPtrInst *UGEPI : UGEPIs) { in tryUnmergingGEPsAcrossIndirectBr()
[all …]
/freebsd-12.1/contrib/llvm/lib/Target/AMDGPU/
H A DAMDGPUPromoteAlloca.cpp302 const std::map<GetElementPtrInst *, Value *> &GEPIdx) { in calculateVectorIndex() argument
303 GetElementPtrInst *GEP = cast<GetElementPtrInst>(Ptr); in calculateVectorIndex()
309 static Value* GEPToVectorIndex(GetElementPtrInst *GEP) { in GEPToVectorIndex()
335 return isa<GetElementPtrInst>(LI->getPointerOperand()) && LI->isSimple(); in canVectorizeInst()
348 return (SI->getPointerOperand() == User) && isa<GetElementPtrInst>(User) && SI->isSimple(); in canVectorizeInst()
379 std::map<GetElementPtrInst*, Value*> GEPVectorIdx; in tryPromoteAllocaToVector()
382 GetElementPtrInst *GEP = dyn_cast<GetElementPtrInst>(AllocaUser); in tryPromoteAllocaToVector()
583 if (GetElementPtrInst *GEP = dyn_cast<GetElementPtrInst>(UseInst)) { in collectUsesWithPtrTypes()
H A DAMDGPUAnnotateUniformValues.cpp38 DenseMap<Value*, GetElementPtrInst*> noClobberClones;
148 PtrI = GetElementPtrInst::Create( in visitLoadInst()
/freebsd-12.1/contrib/llvm/lib/Transforms/InstCombine/
H A DInstCombinePHI.cpp114 } else if (GetElementPtrInst *GI = dyn_cast<GetElementPtrInst>(U)) { in FoldIntegerTypedPHI()
378 GetElementPtrInst *FirstInst =cast<GetElementPtrInst>(PN.getIncomingValue(0)); in FoldPHIArgGEPIntoPHI()
395 GetElementPtrInst *GEP= dyn_cast<GetElementPtrInst>(PN.getIncomingValue(i)); in FoldPHIArgGEPIntoPHI()
468 GetElementPtrInst *InGEP =cast<GetElementPtrInst>(PN.getIncomingValue(i)); in FoldPHIArgGEPIntoPHI()
478 GetElementPtrInst *NewGEP = in FoldPHIArgGEPIntoPHI()
479 GetElementPtrInst::Create(FirstInst->getSourceElementType(), Base, in FoldPHIArgGEPIntoPHI()
524 if (GetElementPtrInst *GEP = dyn_cast<GetElementPtrInst>(L->getOperand(0))) in isSafeAndProfitableToSinkLoad()
733 if (isa<GetElementPtrInst>(FirstInst)) in FoldPHIArgOpIntoPHI()
1163 (isa<BinaryOperator>(PHIUser) || isa<GetElementPtrInst>(PHIUser)) && in visitPHINode()
H A DInstCombineLoadStoreAlloca.cpp85 if (auto *GEP = dyn_cast<GetElementPtrInst>(I)) { in isOnlyCopiedFromConstantGlobal()
278 } else if (isa<GetElementPtrInst>(Inst) || isa<BitCastInst>(Inst)) { in findLoadAndReplace()
307 } else if (auto *GEP = dyn_cast<GetElementPtrInst>(I)) { in replace()
312 auto *NewI = GetElementPtrInst::Create( in replace()
887 auto FirstNZIdx = [](const GetElementPtrInst *GEPI) { in canReplaceGEPIdxWithZero()
911 GetElementPtrInst::getIndexedType(GEPI->getSourceElementType(), Ops); in canReplaceGEPIdxWithZero()
952 if (GetElementPtrInst *GEPI = dyn_cast<GetElementPtrInst>(Ptr)) { in replaceGEPIdxWithZero()
972 if (GetElementPtrInst *GEPI = dyn_cast<GetElementPtrInst>(Ptr)) in canSimplifyNullStoreOrGEP()
979 if (GetElementPtrInst *GEPI = dyn_cast<GetElementPtrInst>(Op)) { in canSimplifyNullLoadOrGEP()
1340 isa<GetElementPtrInst>(A)) in equivalentAddressValues()
[all …]
/freebsd-12.1/contrib/llvm/lib/Transforms/IPO/
H A DArgumentPromotion.cpp172 SrcTy = cast<GetElementPtrInst>(UI)->getSourceElementType(); in doPromotion()
197 Params.push_back(GetElementPtrInst::getIndexedType( in doPromotion()
264 Value *Idx = GetElementPtrInst::Create( in doPromotion()
297 V = GetElementPtrInst::Create(ArgIndex.first, V, Ops, in doPromotion()
394 Value *Idx = GetElementPtrInst::Create( in doPromotion()
434 GetElementPtrInst *GEP = cast<GetElementPtrInst>(I->user_back()); in doPromotion()
610 if (GetElementPtrInst *GEP = dyn_cast<GetElementPtrInst>(V)) { in isSafeToPromoteArgument()
648 } else if (GetElementPtrInst *GEP = dyn_cast<GetElementPtrInst>(UR)) { in isSafeToPromoteArgument()
795 if (isa<GetElementPtrInst>(V) || isa<PHINode>(V)) { in canPaddingBeAccessed()
H A DGlobalOpt.cpp174 if (GetElementPtrInst *GEP = dyn_cast<GetElementPtrInst>(I)) { in IsSafeComputationToRemove()
318 } else if (GetElementPtrInst *GEP = dyn_cast<GetElementPtrInst>(U)) { in CleanupConstantGlobalUsers()
421 if (!isa<GetElementPtrInst>(U) && in GlobalUsersSafeToSRA()
576 GetElementPtrInst *GEPI = cast<GetElementPtrInst>(GEP); in SRAGlobal()
581 NewPtr = GetElementPtrInst::Create( in SRAGlobal()
587 if (GetElementPtrInst *GEPI = dyn_cast<GetElementPtrInst>(GEP)) in SRAGlobal()
641 } else if (const GetElementPtrInst *GEPI = dyn_cast<GetElementPtrInst>(U)) { in AllUsesOfValueWillTrapIfNull()
721 } else if (GetElementPtrInst *GEPI = dyn_cast<GetElementPtrInst>(I)) { in OptimizeAwayTrappingUsesOfValue()
1029 } else if (GetElementPtrInst *GEPI = dyn_cast<GetElementPtrInst>(U)) { in ReplaceUsesOfMallocWithGlobal()
1068 if (const GetElementPtrInst *GEPI = dyn_cast<GetElementPtrInst>(UI)) { in LoadUsesSimpleEnoughForHeapSRA()
[all …]
/freebsd-12.1/contrib/llvm/lib/IR/
H A DOperator.cpp24 if (auto *I = dyn_cast<GetElementPtrInst>(this)) in getSourceElementType()
30 if (auto *I = dyn_cast<GetElementPtrInst>(this)) in getResultElementType()
H A DInstruction.cpp139 cast<GetElementPtrInst>(this)->setIsInBounds(false); in dropPoisonGeneratingFlags()
261 if (auto *SrcGEP = dyn_cast<GetElementPtrInst>(V)) in copyIRFlags()
262 if (auto *DestGEP = dyn_cast<GetElementPtrInst>(this)) in copyIRFlags()
286 if (auto *SrcGEP = dyn_cast<GetElementPtrInst>(V)) in andIRFlags()
287 if (auto *DestGEP = dyn_cast<GetElementPtrInst>(this)) in andIRFlags()
/freebsd-12.1/contrib/llvm/lib/Target/PowerPC/
H A DPPCLoopPreIncPrep.cpp149 if (GetElementPtrInst *GEP = dyn_cast<GetElementPtrInst>(StrippedBasePtr)) in IsPtrInBounds()
447 GetElementPtrInst *PtrInc = GetElementPtrInst::Create( in runOnLoop()
496 GetElementPtrInst *NewPtr = GetElementPtrInst::Create( in runOnLoop()
/freebsd-12.1/contrib/llvm/include/llvm/Transforms/Utils/
H A DFunctionComparator.h347 int cmpGEPs(const GetElementPtrInst *GEPL, in cmpGEPs()
348 const GetElementPtrInst *GEPR) const { in cmpGEPs()
/freebsd-12.1/contrib/llvm/lib/Target/Hexagon/
H A DHexagonCommonGEP.cpp123 bool isHandledGepForm(GetElementPtrInst *GepI);
124 void processGepInst(GetElementPtrInst *GepI, ValueToNodeMap &NM);
333 bool HexagonCommonGEP::isHandledGepForm(GetElementPtrInst *GepI) { in isHandledGepForm()
343 void HexagonCommonGEP::processGepInst(GetElementPtrInst *GepI, in processGepInst()
369 if (isa<GetElementPtrInst>(*UI)) { in processGepInst()
370 GetElementPtrInst *UserG = cast<GetElementPtrInst>(*UI); in processGepInst()
421 if (!isa<GetElementPtrInst>(J)) in collect()
423 GetElementPtrInst *GepI = cast<GetElementPtrInst>(J); in collect()
1100 GetElementPtrInst *NewInst = nullptr; in fabricateGEP()
1130 NewInst = GetElementPtrInst::Create(ElTy, Input, A, "cgep", &*At); in fabricateGEP()
/freebsd-12.1/contrib/llvm/include/llvm/Analysis/
H A DPtrUseVisitor.h176 bool adjustOffsetForGEP(GetElementPtrInst &GEPI);
264 void visitGetElementPtrInst(GetElementPtrInst &GEPI) { in visitGetElementPtrInst()
H A DObjCARCAnalysisUtils.h148 (isa<GetElementPtrInst>(I) && in IsNoopInstruction()
149 cast<GetElementPtrInst>(I)->hasAllZeroIndices()); in IsNoopInstruction()
/freebsd-12.1/contrib/llvm/include/llvm/IR/
H A DInstructions.h854 class GetElementPtrInst : public Instruction {
858 GetElementPtrInst(const GetElementPtrInst &GEPI);
877 GetElementPtrInst *cloneImpl() const;
914 static GetElementPtrInst *CreateInBounds(Value *Ptr,
921 static GetElementPtrInst *
925 GetElementPtrInst *GEP =
942 GetElementPtrInst *GEP =
1083 struct OperandTraits<GetElementPtrInst> :
1087 GetElementPtrInst::GetElementPtrInst(Type *PointeeType, Value *Ptr,
1101 GetElementPtrInst::GetElementPtrInst(Type *PointeeType, Value *Ptr,
[all …]
/freebsd-12.1/contrib/llvm/lib/Transforms/Utils/
H A DCodeExtractor.cpp846 GetElementPtrInst *GEP = GetElementPtrInst::Create( in constructFunction()
939 GetElementPtrInst *GEP = GetElementPtrInst::Create( in emitCallAndSwitchStatement()
973 GetElementPtrInst *GEP = GetElementPtrInst::Create( in emitCallAndSwitchStatement()
1013 GetElementPtrInst *GEP = GetElementPtrInst::Create( in emitCallAndSwitchStatement()

12345