Home
last modified time | relevance | path

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

1234

/external/llvm/lib/Transforms/Scalar/
DSeparateConstOffsetFromGEP.cpp220 static Value *Extract(Value *Idx, GetElementPtrInst *GEP,
225 static int64_t Find(Value *Idx, GetElementPtrInst *GEP,
344 bool splitGEP(GetElementPtrInst *GEP);
352 void lowerToSingleIndexGEPs(GetElementPtrInst *Variadic,
361 void lowerToArithmetics(GetElementPtrInst *Variadic,
368 int64_t accumulateByteOffset(GetElementPtrInst *GEP, bool &NeedsExtraction);
384 bool canonicalizeArrayIndicesToPointerSize(GetElementPtrInst *GEP);
405 void swapGEPOperand(GetElementPtrInst *First, GetElementPtrInst *Second);
407 bool isLegalToSwapOperand(GetElementPtrInst *First, GetElementPtrInst *Second,
690 Value *ConstantOffsetExtractor::Extract(Value *Idx, GetElementPtrInst *GEP, in Extract()
[all …]
DNaryReassociate.cpp132 Instruction *tryReassociateGEP(GetElementPtrInst *GEP);
140 GetElementPtrInst *tryReassociateGEPAtIndex(GetElementPtrInst *GEP,
144 GetElementPtrInst *tryReassociateGEPAtIndex(GetElementPtrInst *GEP,
174 bool requiresSignExtension(Value *Index, GetElementPtrInst *GEP);
296 return tryReassociateGEP(cast<GetElementPtrInst>(I)); in tryReassociate()
303 static bool isGEPFoldable(GetElementPtrInst *GEP, in isGEPFoldable()
342 Instruction *NaryReassociate::tryReassociateGEP(GetElementPtrInst *GEP) { in tryReassociateGEP()
359 GetElementPtrInst *GEP) { in requiresSignExtension()
365 GetElementPtrInst *
366 NaryReassociate::tryReassociateGEPAtIndex(GetElementPtrInst *GEP, unsigned I, in tryReassociateGEPAtIndex()
[all …]
DStraightLineStrengthReduce.cpp173 void allocateCandidatesAndFindBasisForGEP(GetElementPtrInst *GEP);
190 GetElementPtrInst *GEP);
238 static bool isGEPFoldable(GetElementPtrInst *GEP, in isGEPFoldable()
290 return isGEPFoldable(cast<GetElementPtrInst>(C.Ins), TTI, DL); in isFoldable()
295 static bool hasOnlyOneNonZeroIndex(GetElementPtrInst *GEP) { in hasOnlyOneNonZeroIndex()
317 hasOnlyOneNonZeroIndex(cast<GetElementPtrInst>(C.Ins))); in isSimplestForm()
375 allocateCandidatesAndFindBasisForGEP(cast<GetElementPtrInst>(I)); in allocateCandidatesAndFindBasis()
479 GetElementPtrInst *GEP) { in factorArrayIndex()
512 GetElementPtrInst *GEP) { in allocateCandidatesAndFindBasisForGEP()
570 cast<GetElementPtrInst>(Basis.Ins)->getType()->getElementType())); in emitBump()
[all …]
DScalarReplAggregates.cpp158 void isSafeGEP(GetElementPtrInst *GEPI, uint64_t &Offset, AllocaInfo &Info);
175 void RewriteGEP(GetElementPtrInst *GEPI, AllocaInst *AI, uint64_t Offset,
511 if (GetElementPtrInst *GEP = dyn_cast<GetElementPtrInst>(UI)) { in CanConvertToScalar()
616 if (GetElementPtrInst *GEP = dyn_cast<GetElementPtrInst>(User)) { in ConvertUsesToScalar()
1618 } else if (GetElementPtrInst *GEPI = dyn_cast<GetElementPtrInst>(User)) { in isSafeForScalarRepl()
1684 } else if (GetElementPtrInst *GEPI = dyn_cast<GetElementPtrInst>(UI)) { in isSafePHISelectUseForScalarRepl()
1722 void SROA::isSafeGEP(GetElementPtrInst *GEPI, in isSafeGEP()
1894 if (GetElementPtrInst *GEPI = dyn_cast<GetElementPtrInst>(User)) { in RewriteForScalarRepl()
2056 void SROA::RewriteGEP(GetElementPtrInst *GEPI, AllocaInst *AI, uint64_t Offset, in RewriteGEP()
2107 Val = GetElementPtrInst::CreateInBounds(Val, NewArgs, "", GEPI); in RewriteGEP()
[all …]
/external/llvm/unittests/IR/
DInstructionsTest.cpp323 GetElementPtrInst *Gep0 = GetElementPtrInst::Create(I32Ty, PtrVecA, C2xi32a); in TEST()
324 GetElementPtrInst *Gep1 = GetElementPtrInst::Create(I32Ty, PtrVecA, C2xi32b); in TEST()
325 GetElementPtrInst *Gep2 = GetElementPtrInst::Create(I32Ty, PtrVecB, C2xi32a); in TEST()
326 GetElementPtrInst *Gep3 = GetElementPtrInst::Create(I32Ty, PtrVecB, C2xi32b); in TEST()
354 GetElementPtrInst *GepII0 = GetElementPtrInst::Create(I32Ty, Gep0, C2xi32b); in TEST()
355 GetElementPtrInst *GepII1 = GetElementPtrInst::Create(I32Ty, Gep1, C2xi32a); in TEST()
356 GetElementPtrInst *GepII2 = GetElementPtrInst::Create(I32Ty, Gep2, C2xi32b); in TEST()
357 GetElementPtrInst *GepII3 = GetElementPtrInst::Create(I32Ty, Gep3, C2xi32a); in TEST()
/external/llvm/lib/Analysis/
DPHITransAddr.cpp27 isa<GetElementPtrInst>(Inst)) in CanPHITrans()
217 if (GetElementPtrInst *GEP = dyn_cast<GetElementPtrInst>(Inst)) { in PHITranslateSubExpr()
242 if (GetElementPtrInst *GEPI = dyn_cast<GetElementPtrInst>(U)) in PHITranslateSubExpr()
399 if (GetElementPtrInst *GEP = dyn_cast<GetElementPtrInst>(Inst)) { in InsertPHITranslatedSubExpr()
409 GetElementPtrInst *Result = GetElementPtrInst::Create( in InsertPHITranslatedSubExpr()
DDelinearization.cpp78 else if (GetElementPtrInst *Gep = dyn_cast<GetElementPtrInst>(&Inst)) in getPointerOperand()
90 !isa<GetElementPtrInst>(Inst)) in print()
DPtrUseVisitor.cpp30 bool detail::PtrUseVisitorBase::adjustOffsetForGEP(GetElementPtrInst &GEPI) { in adjustOffsetForGEP()
/external/llvm/lib/CodeGen/
DShadowStackGCLowering.cpp55 static GetElementPtrInst *CreateGEP(LLVMContext &Context, IRBuilder<> &B,
58 static GetElementPtrInst *CreateGEP(LLVMContext &Context, IRBuilder<> &B,
349 GetElementPtrInst *ShadowStackGCLowering::CreateGEP(LLVMContext &Context, in CreateGEP()
359 assert(isa<GetElementPtrInst>(Val) && "Unexpected folded constant"); in CreateGEP()
361 return dyn_cast<GetElementPtrInst>(Val); in CreateGEP()
364 GetElementPtrInst *ShadowStackGCLowering::CreateGEP(LLVMContext &Context, in CreateGEP()
371 assert(isa<GetElementPtrInst>(Val) && "Unexpected folded constant"); in CreateGEP()
373 return dyn_cast<GetElementPtrInst>(Val); in CreateGEP()
/external/llvm/lib/Target/AMDGPU/
DAMDGPUPromoteAlloca.cpp111 const std::map<GetElementPtrInst *, Value *> &GEPIdx) { in calculateVectorIndex() argument
115 GetElementPtrInst *GEP = cast<GetElementPtrInst>(Ptr); in calculateVectorIndex()
121 static Value* GEPToVectorIndex(GetElementPtrInst *GEP) { in GEPToVectorIndex()
168 std::map<GetElementPtrInst*, Value*> GEPVectorIdx; in tryPromoteAllocaToVector()
171 GetElementPtrInst *GEP = dyn_cast<GetElementPtrInst>(AllocaUser); in tryPromoteAllocaToVector()
DAMDGPUTargetTransformInfo.cpp42 const GetElementPtrInst *GEP = dyn_cast<GetElementPtrInst>(&I); in getUnrollingPreferences()
/external/llvm/lib/Transforms/IPO/
DArgumentPromotion.cpp187 if (isa<GetElementPtrInst>(V) || isa<PHINode>(V)) { in canPaddingBeAccessed()
476 if (GetElementPtrInst *GEP = dyn_cast<GetElementPtrInst>(V)) { in isSafeToPromoteArgument()
513 } else if (GetElementPtrInst *GEP = dyn_cast<GetElementPtrInst>(UR)) { in isSafeToPromoteArgument()
680 SrcTy = cast<GetElementPtrInst>(UI)->getSourceElementType(); in DoPromotion()
706 Params.push_back(GetElementPtrInst::getIndexedType( in DoPromotion()
792 Value *Idx = GetElementPtrInst::Create( in DoPromotion()
823 V = GetElementPtrInst::Create(SI->first, V, Ops, in DoPromotion()
921 Value *Idx = GetElementPtrInst::Create( in DoPromotion()
961 GetElementPtrInst *GEP = cast<GetElementPtrInst>(I->user_back()); in DoPromotion()
DGlobalOpt.cpp174 if (GetElementPtrInst *GEP = dyn_cast<GetElementPtrInst>(I)) { in IsSafeComputationToRemove()
318 } else if (GetElementPtrInst *GEP = dyn_cast<GetElementPtrInst>(U)) { in CleanupConstantGlobalUsers()
378 GetElementPtrInst *GEPI = dyn_cast<GetElementPtrInst>(I); in isSafeSROAElementUse()
396 if (!isa<GetElementPtrInst>(U) && in IsUserOfGlobalSafeForSRA()
562 isa<GetElementPtrInst>(GEP)) && "NonGEP CE's are not SRAable!"); in SRAGlobal()
583 GetElementPtrInst *GEPI = cast<GetElementPtrInst>(GEP); in SRAGlobal()
588 NewPtr = GetElementPtrInst::Create( in SRAGlobal()
594 if (GetElementPtrInst *GEPI = dyn_cast<GetElementPtrInst>(GEP)) in SRAGlobal()
642 } else if (const GetElementPtrInst *GEPI = dyn_cast<GetElementPtrInst>(U)) { in AllUsesOfValueWillTrapIfNull()
718 } else if (GetElementPtrInst *GEPI = dyn_cast<GetElementPtrInst>(I)) { in OptimizeAwayTrappingUsesOfValue()
[all …]
/external/llvm/lib/Transforms/InstCombine/
DInstCombinePHI.cpp132 GetElementPtrInst *FirstInst =cast<GetElementPtrInst>(PN.getIncomingValue(0)); in FoldPHIArgGEPIntoPHI()
149 GetElementPtrInst *GEP= dyn_cast<GetElementPtrInst>(PN.getIncomingValue(i)); in FoldPHIArgGEPIntoPHI()
222 GetElementPtrInst *InGEP =cast<GetElementPtrInst>(PN.getIncomingValue(i)); in FoldPHIArgGEPIntoPHI()
232 GetElementPtrInst *NewGEP = in FoldPHIArgGEPIntoPHI()
233 GetElementPtrInst::Create(FirstInst->getSourceElementType(), Base, in FoldPHIArgGEPIntoPHI()
278 if (GetElementPtrInst *GEP = dyn_cast<GetElementPtrInst>(L->getOperand(0))) in isSafeAndProfitableToSinkLoad()
486 if (isa<GetElementPtrInst>(FirstInst)) in FoldPHIArgOpIntoPHI()
918 (isa<BinaryOperator>(PHIUser) || isa<GetElementPtrInst>(PHIUser)) && in visitPHINode()
DInstCombineLoadStoreAlloca.cpp80 if (GetElementPtrInst *GEP = dyn_cast<GetElementPtrInst>(I)) { in isOnlyCopiedFromConstantGlobal()
201 GetElementPtrInst::CreateInBounds(New, Idx, New->getName() + ".sub"); in simplifyAllocaArraySize()
665 static bool canReplaceGEPIdxWithZero(InstCombiner &IC, GetElementPtrInst *GEPI, in canReplaceGEPIdxWithZero()
672 auto FirstNZIdx = [](const GetElementPtrInst *GEPI) { in canReplaceGEPIdxWithZero()
695 Type *AllocTy = GetElementPtrInst::getIndexedType( in canReplaceGEPIdxWithZero()
741 if (GetElementPtrInst *GEPI = dyn_cast<GetElementPtrInst>(Ptr)) { in replaceGEPIdxWithZero()
813 if (GetElementPtrInst *GEPI = dyn_cast<GetElementPtrInst>(Op)) { in visitLoadInst()
1002 isa<GetElementPtrInst>(A)) in equivalentAddressValues()
1050 if (GetElementPtrInst *GEP = dyn_cast<GetElementPtrInst>(Ptr)) { in visitStoreInst()
/external/llvm/include/llvm/Analysis/
DVectorUtils.h26 class GetElementPtrInst; variable
67 unsigned getGEPInductionOperand(const GetElementPtrInst *Gep);
DPtrUseVisitor.h163 bool adjustOffsetForGEP(GetElementPtrInst &GEPI);
246 void visitGetElementPtrInst(GetElementPtrInst &GEPI) { in visitGetElementPtrInst()
DObjCARCAnalysisUtils.h134 (isa<GetElementPtrInst>(I) && in IsNoopInstruction()
135 cast<GetElementPtrInst>(I)->hasAllZeroIndices()); in IsNoopInstruction()
/external/llvm/lib/Target/PowerPC/
DPPCLoopPreIncPrep.cpp127 if (GetElementPtrInst *GEP = dyn_cast<GetElementPtrInst>(StrippedBasePtr)) in IsPtrInBounds()
351 GetElementPtrInst *PtrInc = GetElementPtrInst::Create( in runOnLoop()
400 GetElementPtrInst *NewPtr = GetElementPtrInst::Create( in runOnLoop()
/external/mesa3d/src/gallium/drivers/radeon/
DR600KernelParameters.cpp247 GetElementPtrInst *GEP = dyn_cast<GetElementPtrInst>(V); in Propagate()
268 GetElementPtrInst* GEP2 = GetElementPtrInst::Create(Op, Params, Name, in Propagate()
337 Value* ParamPtr = GetElementPtrInst::Create(ParamAddrSpacePtr, in ConstantRead()
/external/llvm/lib/Transforms/Utils/
DCodeExtractor.cpp368 GetElementPtrInst *GEP = GetElementPtrInst::Create( in constructFunction()
469 GetElementPtrInst *GEP = GetElementPtrInst::Create( in emitCallAndSwitchStatement()
494 GetElementPtrInst *GEP = GetElementPtrInst::Create( in emitCallAndSwitchStatement()
612 GetElementPtrInst *GEP = GetElementPtrInst::Create( in emitCallAndSwitchStatement()
/external/llvm/lib/Target/NVPTX/
DNVPTXFavorNonGenericAddrSpaces.cpp163 GetElementPtrInst *NewGEP = GetElementPtrInst::Create( in hoistAddrSpaceCastFromGEP()
/external/llvm/test/CodeGen/CPP/
Dgep.ll6 ; CHECK: GetElementPtrInst::Create(IntegerType::get(mod->getContext(), 32), ptr_addr,
/external/llvm/lib/Target/Hexagon/
DHexagonCommonGEP.cpp106 bool isHandledGepForm(GetElementPtrInst *GepI);
107 void processGepInst(GetElementPtrInst *GepI, ValueToNodeMap &NM);
312 bool HexagonCommonGEP::isHandledGepForm(GetElementPtrInst *GepI) { in isHandledGepForm()
323 void HexagonCommonGEP::processGepInst(GetElementPtrInst *GepI, in processGepInst()
348 if (isa<GetElementPtrInst>(*UI)) { in processGepInst()
349 GetElementPtrInst *UserG = cast<GetElementPtrInst>(*UI); in processGepInst()
401 if (!isa<GetElementPtrInst>(J)) in collect()
403 GetElementPtrInst *GepI = cast<GetElementPtrInst>(J); in collect()
1123 NewInst = GetElementPtrInst::Create(ElTy, Input, A, "cgep", &*At); in fabricateGEP()
/external/llvm/include/llvm/IR/
DInstructions.h838 class GetElementPtrInst : public Instruction {
844 GetElementPtrInst(const GetElementPtrInst &GEPI);
851 inline GetElementPtrInst(Type *PointeeType, Value *Ptr,
854 inline GetElementPtrInst(Type *PointeeType, Value *Ptr,
861 GetElementPtrInst *cloneImpl() const;
864 static GetElementPtrInst *Create(Type *PointeeType, Value *Ptr,
876 return new (Values) GetElementPtrInst(PointeeType, Ptr, IdxList, Values,
879 static GetElementPtrInst *Create(Type *PointeeType, Value *Ptr,
891 return new (Values) GetElementPtrInst(PointeeType, Ptr, IdxList, Values,
897 static GetElementPtrInst *CreateInBounds(Value *Ptr,
[all …]

1234