Searched refs:GEP (Results 26 - 50 of 103) sorted by relevance

12345

/freebsd-13-stable/contrib/llvm-project/llvm/lib/Transforms/InstCombine/
H A DInstCombineLoadStoreAlloca.cpp70 if (auto *GEP = dyn_cast<GetElementPtrInst>(I)) {
71 // If the GEP has all zero indices, it doesn't offset the pointer. If it
73 ValuesToInspect.emplace_back(I, IsOffset || !GEP->hasAllZeroIndices());
200 Instruction *GEP = GetElementPtrInst::CreateInBounds( local
202 IC.InsertNewInstBefore(GEP, *It);
206 return IC.replaceInstUsesWith(AI, GEP);
232 // the new pointer. If during the chasing it sees bitcast or GEP, it will
233 // create new bitcast or GEP with the new pointer and use them in the load
291 } else if (auto *GEP = dyn_cast<GetElementPtrInst>(I)) {
292 auto *V = getReplacement(GEP
[all...]
H A DInstCombineCompares.cpp145 Instruction *InstCombiner::foldCmpLoadFromIndexedGlobal(GetElementPtrInst *GEP, argument
161 // Require: GEP GV, 0, i {{, constant indices}}
162 if (GEP->getNumOperands() < 3 ||
163 !isa<ConstantInt>(GEP->getOperand(1)) ||
164 !cast<ConstantInt>(GEP->getOperand(1))->isZero() ||
165 isa<Constant>(GEP->getOperand(2)))
174 for (unsigned i = 3, e = GEP->getNumOperands(); i != e; ++i) {
175 ConstantInt *Idx = dyn_cast<ConstantInt>(GEP->getOperand(i));
308 Value *Idx = GEP->getOperand(2);
311 // index down like the GEP woul
425 evaluateGEPOffsetExpression(User *GEP, InstCombiner &IC, const DataLayout &DL) argument
744 Value *GEP = Builder.CreateInBoundsGEP( local
[all...]
/freebsd-13-stable/contrib/llvm-project/llvm/lib/Transforms/Scalar/
H A DInferAddressSpaces.cpp432 if (auto *GEP = dyn_cast<GetElementPtrInst>(&I)) {
433 if (!GEP->getType()->isVectorTy())
434 PushPtrOperand(GEP->getPointerOperand());
583 GetElementPtrInst *GEP = cast<GetElementPtrInst>(I); local
585 GEP->getSourceElementType(), NewPointerOperands[0],
586 SmallVector<Value *, 4>(GEP->idx_begin(), GEP->idx_end()));
587 NewGEP->setIsInBounds(GEP->isInBounds());
H A DRewriteStatepointsForGC.cpp473 if (auto *GEP = dyn_cast<GetElementPtrInst>(I))
474 return findBaseDefiningValue(GEP->getPointerOperand());
543 if (GetElementPtrInst *GEP = dyn_cast<GetElementPtrInst>(I))
544 // The base of this GEP is the base
545 return findBaseDefiningValue(GEP->getPointerOperand());
1988 // (currently it is GEP's and casts). The returned root is examined by the
1994 if (GetElementPtrInst *GEP = dyn_cast<GetElementPtrInst>(CurrentValue)) {
1995 ChainToBase.push_back(GEP);
1997 GEP->getPointerOperand());
2031 } else if (GetElementPtrInst *GEP
[all...]
/freebsd-13-stable/contrib/llvm-project/llvm/lib/Target/BPF/
H A DBPFAbstractMemberAccess.cpp149 void traceGEP(GetElementPtrInst *GEP, CallInst *Parent,
307 auto *GEP = GetElementPtrInst::CreateInBounds(Call->getArgOperand(0), local
309 Call->replaceAllUsesWith(GEP);
340 // addr = GEP(base, dimenion's zero's, index)
346 // addr = GEP(base, 0, gep_index)
471 void BPFAbstractMemberAccess::traceGEP(GetElementPtrInst *GEP, CallInst *Parent, argument
473 for (User *U : GEP->users()) {
889 // For any original GEP Call and Base %2 like
907 auto *GEP = GetElementPtrInst::Create(Type::getInt8Ty(BB->getContext()), local
909 BB->getInstList().insert(Call->getIterator(), GEP);
[all...]
/freebsd-13-stable/contrib/llvm-project/llvm/lib/Analysis/
H A DCaptureTracking.cpp52 // An inbounds GEP can either be a valid pointer (pointing into
54 // address space. So for an inbounds GEP there is no way to let
55 // the pointer escape using clever GEP hacking because doing so
57 // and thus make the GEP result a poison value. Similarly, other
60 if (auto *GEP = dyn_cast<GetElementPtrInst>(O))
61 if (GEP->isInBounds())
H A DInlineCost.cpp330 bool isGEPFree(GetElementPtrInst &GEP);
332 bool accumulateGEPOffset(GEPOperator &GEP, APInt &Offset);
805 /// Accumulate a constant GEP offset into an APInt if possible.
809 bool CallAnalyzer::accumulateGEPOffset(GEPOperator &GEP, APInt &Offset) { argument
810 unsigned IntPtrWidth = DL.getIndexTypeSizeInBits(GEP.getType());
813 for (gep_type_iterator GTI = gep_type_begin(GEP), GTE = gep_type_end(GEP);
838 /// Use TTI to check whether a GEP is free.
841 bool CallAnalyzer::isGEPFree(GetElementPtrInst &GEP) { argument
843 Operands.push_back(GEP
[all...]
H A DConstantFolding.cpp313 auto *GEP = dyn_cast<GEPOperator>(CE);
314 if (!GEP)
317 unsigned BitWidth = DL.getIndexTypeSizeInBits(GEP->getType());
325 if (!GEP->accumulateConstantOffset(DL, TmpOffset))
847 /// If we can symbolically evaluate the GEP constant expression, do so.
848 Constant *SymbolicallyEvaluateGEP(const GEPOperator *GEP, argument
852 const GEPOperator *InnermostGEP = GEP;
853 bool InBounds = GEP->isInBounds();
855 Type *SrcElemTy = GEP->getSourceElementType();
856 Type *ResElemTy = GEP
[all...]
H A DVectorUtils.cpp127 /// Find the operand of the GEP that should be checked for consecutive
141 // If it's a type with the same allocation size as the result of the GEP we
151 /// If the argument is a GEP, then returns the operand identified by
155 GetElementPtrInst *GEP = dyn_cast<GetElementPtrInst>(Ptr); local
156 if (!GEP)
159 unsigned InductionOperand = getGEPInductionOperand(GEP);
163 for (unsigned i = 0, e = GEP->getNumOperands(); i != e; ++i)
165 !SE->isLoopInvariant(SE->getSCEV(GEP->getOperand(i)), Lp))
167 return GEP->getOperand(InductionOperand);
H A DLoopAccessAnalysis.cpp968 if (GetElementPtrInst *GEP = dyn_cast<GetElementPtrInst>(Ptr))
969 return GEP->isInBounds();
988 // The arithmetic implied by an inbounds GEP can't overflow.
989 auto *GEP = dyn_cast<GetElementPtrInst>(Ptr);
990 if (!GEP || !GEP->isInBounds())
995 for (Value *Index : make_range(GEP->idx_begin(), GEP->idx_end()))
1005 // The index in GEP is signed. It is non-wrapping if it's derived from a NSW
H A DValueTracking.cpp2113 /// Test whether a GEP's result is known to be non-null.
2115 /// Uses properties inherent in a GEP to try to determine whether it is known
2119 static bool isGEPKnownNonNull(const GEPOperator *GEP, unsigned Depth, argument
2122 if (const Instruction *I = dyn_cast<Instruction>(GEP))
2125 if (!GEP->isInBounds() ||
2126 NullPointerIsDefined(F, GEP->getPointerAddressSpace()))
2130 assert(GEP->getType()->isPointerTy() && "We only support plain pointer GEP");
2133 // inbounds GEP in address space zero.
2134 if (isKnownNonZero(GEP
3879 isGEPBasedOnPointerToString(const GEPOperator *GEP, unsigned CharSize) argument
6437 getOffsetFromIndex(const GEPOperator *GEP, unsigned Idx, const DataLayout &DL) argument
[all...]
/freebsd-13-stable/contrib/llvm-project/llvm/lib/Target/AMDGPU/
H A DAMDGPUTargetTransformInfo.cpp153 const GetElementPtrInst *GEP = dyn_cast<GetElementPtrInst>(&I); local
154 if (!GEP)
157 unsigned AS = GEP->getAddressSpace();
170 const Value *Ptr = GEP->getPointerOperand();
187 (!isa<GlobalVariable>(GEP->getPointerOperand()) &&
188 !isa<Argument>(GEP->getPointerOperand())))
195 // Check if GEP depends on a value defined by this loop itself.
197 for (const Value *Op : GEP->operands()) {
227 << *L << " due to " << *GEP << '\n'); local
232 // If we got a GEP i
[all...]
/freebsd-13-stable/contrib/llvm-project/clang/lib/CodeGen/
H A DCGBuilder.h257 auto *GEP = cast<llvm::GetElementPtrInst>(CreateConstInBoundsGEP2_32( local
262 if (!GEP->accumulateConstantOffset(DL, Offset))
263 llvm_unreachable("offset of GEP with constants is always computable");
264 return Address(GEP, Addr.getAlignment().alignmentAtOffset(
/freebsd-13-stable/contrib/llvm-project/llvm/include/llvm/Analysis/
H A DMemoryBuiltins.h272 SizeOffsetType visitGEPOperator(GEPOperator &GEP);
341 SizeOffsetEvalType visitGEPOperator(GEPOperator &GEP);
/freebsd-13-stable/contrib/llvm-project/llvm/lib/Transforms/Instrumentation/
H A DSanitizerCoverage.cpp136 cl::desc("Tracing of GEP instructions"),
357 auto GEP = IRB.CreateGEP(Int8Ty, SecStartI8Ptr, local
359 return std::make_pair(IRB.CreatePointerCast(GEP, Ty), SecEndPtr);
675 if (GetElementPtrInst *GEP = dyn_cast<GetElementPtrInst>(&Inst))
676 GepTraceTargets.push_back(GEP);
854 for (auto GEP : GepTraceTargets) {
855 IRBuilder<> IRB(GEP);
856 for (auto I = GEP->idx_begin(); I != GEP->idx_end(); ++I)
/freebsd-13-stable/contrib/llvm-project/llvm/lib/Transforms/Utils/
H A DCodeExtractor.cpp952 GetElementPtrInst *GEP = GetElementPtrInst::Create( local
954 RewriteVal = new LoadInst(StructTy->getElementType(i), GEP,
1135 GetElementPtrInst *GEP = GetElementPtrInst::Create( local
1137 codeReplacer->getInstList().push_back(GEP);
1138 new StoreInst(StructValues[i], GEP, codeReplacer);
1173 GetElementPtrInst *GEP = GetElementPtrInst::Create( local
1175 codeReplacer->getInstList().push_back(GEP);
1176 Output = GEP;
1276 GetElementPtrInst *GEP = GetElementPtrInst::Create( local
1279 new StoreInst(outputs[i], GEP, InsertBefor
[all...]
H A DValueMapper.cpp918 if (auto *GEP = dyn_cast<GetElementPtrInst>(I)) {
919 GEP->setSourceElementType(
920 TypeMapper->remapType(GEP->getSourceElementType()));
921 GEP->setResultElementType(
922 TypeMapper->remapType(GEP->getResultElementType()));
H A DAssumeBundleBuilder.cpp76 if (auto *GEP = dyn_cast<GEPOperator>(Strip))
79 GEP->getMaxPreservedAlignment(M->getDataLayout()).value());
/freebsd-13-stable/contrib/llvm-project/llvm/lib/CodeGen/
H A DCodeGenPrepare.cpp236 cl::desc("Enable splitting large offset of GEP."));
314 /// Keep track of new GEP base after splitting the GEPs having large offset.
966 // Accepts a GEP and extracts the operands into a vector provided they're all
968 static bool getGEPSmallConstantIntOffsetV(GetElementPtrInst *GEP, argument
970 for (unsigned i = 1; i < GEP->getNumOperands(); i++) {
972 auto *Op = dyn_cast<ConstantInt>(GEP->getOperand(i));
977 for (unsigned i = 1; i < GEP->getNumOperands(); i++)
978 OffsetV.push_back(GEP->getOperand(i));
2980 // A GEP which has too large offset to be folded into the addressing mode.
4345 // Scan the GEP
4405 auto *GEP = cast<GetElementPtrInst>(AddrInst); local
4948 GetElementPtrInst *GEP = LargeOffsetGEP.first; local
5277 const GetElementPtrInst *GEP = dyn_cast<GetElementPtrInst>(Ptr); local
5652 GetElementPtrInst *GEP = LargeOffsetGEP->first; local
7273 GEPSequentialConstIndexed(GetElementPtrInst *GEP) argument
[all...]
H A DGlobalMerge.cpp541 Constant *GEP = local
543 Globals[k]->replaceAllUsesWith(GEP);
553 Linkage, Name, GEP, &M);
H A DStackProtector.cpp201 // If the GEP offset is out-of-bounds, or is non-constant and so has to be
205 const GetElementPtrInst *GEP = cast<GetElementPtrInst>(I); local
209 if (!GEP->accumulateConstantOffset(DL, Offset) || Offset.ugt(MaxOffset))
/freebsd-13-stable/contrib/llvm-project/llvm/lib/Target/X86/
H A DX86WinEHState.cpp440 if (auto *GEP = dyn_cast<GetElementPtrInst>(Link)) {
441 GEP = cast<GetElementPtrInst>(GEP->clone());
442 Builder.Insert(GEP);
443 Link = GEP;
/freebsd-13-stable/contrib/llvm-project/llvm/lib/Transforms/Vectorize/
H A DVPlan.h865 /// A recipe for handling GEP instructions.
867 GetElementPtrInst *GEP;
869 /// Hold VPValues for the base and indices of the GEP.
877 VPWidenGEPRecipe(GetElementPtrInst *GEP, iterator_range<IterT> Operands,
879 : VPRecipeBase(VPWidenGEPSC), GEP(GEP), User(Operands),
880 IsIndexLoopInvariant(GEP->getNumIndices(), false) {
881 IsPtrLoopInvariant = OrigLoop->isLoopInvariant(GEP->getPointerOperand());
882 for (auto Index : enumerate(GEP->indices()))
/freebsd-13-stable/contrib/llvm-project/llvm/lib/IR/
H A DVerifier.cpp467 void visitGetElementPtrInst(GetElementPtrInst &GEP);
3416 void Verifier::visitGetElementPtrInst(GetElementPtrInst &GEP) { argument
3417 Type *TargetTy = GEP.getPointerOperandType()->getScalarType();
3420 "GEP base pointer is not a vector or a vector of pointers", &GEP); local
3421 Assert(GEP.getSourceElementType()->isSized(), "GEP into unsized type!", &GEP);
3423 SmallVector<Value*, 16> Idxs(GEP.idx_begin(), GEP
3426 "GEP indexes must be integers", &GEP); local
[all...]
H A DSafepointIRVerifier.cpp346 if (const auto *GEP = dyn_cast<GetElementPtrInst>(V)) {
347 Worklist.push_back(GEP->getPointerOperand());
695 // GEP/bitcast of unrelocated pointer is legal by itself but this def

Completed in 322 milliseconds

12345