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

1234

/freebsd-12-stable/contrib/llvm-project/llvm/lib/Analysis/
H A DConstantFolding.cpp309 auto *GEP = dyn_cast<GEPOperator>(CE);
310 if (!GEP)
313 unsigned BitWidth = DL.getIndexTypeSizeInBits(GEP->getType());
321 if (!GEP->accumulateConstantOffset(DL, TmpOffset))
820 /// If we can symbolically evaluate the GEP constant expression, do so.
821 Constant *SymbolicallyEvaluateGEP(const GEPOperator *GEP, argument
825 const GEPOperator *InnermostGEP = GEP;
826 bool InBounds = GEP->isInBounds();
828 Type *SrcElemTy = GEP->getSourceElementType();
829 Type *ResElemTy = GEP
[all...]
H A DCaptureTracking.cpp37 // An inbounds GEP can either be a valid pointer (pointing into
39 // address space. So for an inbounds GEP there is no way to let
40 // the pointer escape using clever GEP hacking because doing so
42 // and thus make the GEP result a poison value. Similarly, other
45 if (auto *GEP = dyn_cast<GetElementPtrInst>(O))
46 if (GEP->isInBounds())
H A DVectorUtils.cpp126 /// Find the operand of the GEP that should be checked for consecutive
140 // If it's a type with the same allocation size as the result of the GEP we
150 /// If the argument is a GEP, then returns the operand identified by
154 GetElementPtrInst *GEP = dyn_cast<GetElementPtrInst>(Ptr); local
155 if (!GEP)
158 unsigned InductionOperand = getGEPInductionOperand(GEP);
162 for (unsigned i = 0, e = GEP->getNumOperands(); i != e; ++i)
164 !SE->isLoopInvariant(SE->getSCEV(GEP->getOperand(i)), Lp))
166 return GEP->getOperand(InductionOperand);
H A DValueTracking.cpp1922 /// Test whether a GEP's result is known to be non-null.
1924 /// Uses properties inherent in a GEP to try to determine whether it is known
1928 static bool isGEPKnownNonNull(const GEPOperator *GEP, unsigned Depth, argument
1931 if (const Instruction *I = dyn_cast<Instruction>(GEP))
1934 if (!GEP->isInBounds() ||
1935 NullPointerIsDefined(F, GEP->getPointerAddressSpace()))
1939 assert(GEP->getType()->isPointerTy() && "We only support plain pointer GEP");
1942 // inbounds GEP in address space zero.
1943 if (isKnownNonZero(GEP
3616 isGEPBasedOnPointerToString(const GEPOperator *GEP, unsigned CharSize) argument
5892 getOffsetFromIndex(const GEPOperator *GEP, unsigned Idx, const DataLayout &DL) argument
[all...]
/freebsd-12-stable/contrib/llvm-project/llvm/lib/Transforms/IPO/
H A DGlobalOpt.cpp175 if (GetElementPtrInst *GEP = dyn_cast<GetElementPtrInst>(I)) {
176 if (!GEP->hasAllConstantIndices())
320 } else if (GetElementPtrInst *GEP = dyn_cast<GetElementPtrInst>(U)) {
325 if (!isa<ConstantExpr>(GEP->getOperand(0))) {
327 ConstantFoldInstruction(GEP, DL, &GetTLI(*GEP->getFunction())));
331 // If the initializer is an all-null value and we have an inbounds GEP,
332 // we already know what the result of any load from that GEP is.
334 if (Init && isa<ConstantAggregateZero>(Init) && GEP->isInBounds())
335 SubInit = Constant::getNullValue(GEP
[all...]
/freebsd-12-stable/contrib/llvm-project/llvm/lib/Transforms/InstCombine/
H A DInstCombineLoadStoreAlloca.cpp84 if (auto *GEP = dyn_cast<GetElementPtrInst>(I)) {
85 // If the GEP has all zero indices, it doesn't offset the pointer. If it
87 ValuesToInspect.emplace_back(I, IsOffset || !GEP->hasAllZeroIndices());
215 Instruction *GEP = GetElementPtrInst::CreateInBounds( local
217 IC.InsertNewInstBefore(GEP, *It);
221 return IC.replaceInstUsesWith(AI, GEP);
248 // the new pointer. If during the chasing it sees bitcast or GEP, it will
249 // create new bitcast or GEP with the new pointer and use them in the load
306 } else if (auto *GEP = dyn_cast<GetElementPtrInst>(I)) {
307 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...]
H A DInstCombineCasts.cpp1808 if (GetElementPtrInst *GEP = dyn_cast<GetElementPtrInst>(Src)) {
1811 if (GEP->hasAllZeroIndices() &&
1812 // If CI is an addrspacecast and GEP changes the poiner type, merging
1813 // GEP into CI would undo canonicalizing addrspacecast with different
1816 GEP->getType() == GEP->getPointerOperandType())) {
1820 Worklist.Add(GEP);
1821 CI.setOperand(0, GEP->getOperand(0));
2438 GetElementPtrInst *GEP = local
2442 // allocated object and apply "inbounds" to the GEP
[all...]
/freebsd-12-stable/contrib/llvm-project/llvm/lib/Target/AMDGPU/
H A DAMDGPUTargetTransformInfo.cpp138 const GetElementPtrInst *GEP = dyn_cast<GetElementPtrInst>(&I); local
139 if (!GEP)
142 unsigned AS = GEP->getAddressSpace();
155 const Value *Ptr = GEP->getPointerOperand();
172 (!isa<GlobalVariable>(GEP->getPointerOperand()) &&
173 !isa<Argument>(GEP->getPointerOperand())))
177 // Check if GEP depends on a value defined by this loop itself.
179 for (const Value *Op : GEP->operands()) {
209 << *L << " due to " << *GEP << '\n'); local
/freebsd-12-stable/contrib/llvm-project/llvm/lib/Target/BPF/
H A DBPFAbstractMemberAccess.cpp149 void traceGEP(GetElementPtrInst *GEP, CallInst *Parent,
305 auto *GEP = GetElementPtrInst::CreateInBounds(Call->getArgOperand(0), local
307 Call->replaceAllUsesWith(GEP);
338 // addr = GEP(base, dimenion's zero's, index)
344 // addr = GEP(base, 0, gep_index)
469 void BPFAbstractMemberAccess::traceGEP(GetElementPtrInst *GEP, CallInst *Parent, argument
471 for (User *U : GEP->users()) {
883 // For any original GEP Call and Base %2 like
902 auto *GEP = GetElementPtrInst::Create(Type::getInt8Ty(BB->getContext()), local
904 BB->getInstList().insert(Call->getIterator(), GEP);
[all...]
/freebsd-12-stable/contrib/llvm-project/llvm/lib/Transforms/Instrumentation/
H A DSanitizerCoverage.cpp124 cl::desc("Tracing of GEP instructions"),
322 auto GEP = IRB.CreateGEP(Int8Ty, SecStartI8Ptr, local
324 return std::make_pair(IRB.CreatePointerCast(GEP, Ty), SecEndPtr);
627 if (GetElementPtrInst *GEP = dyn_cast<GetElementPtrInst>(&Inst))
628 GepTraceTargets.push_back(GEP);
804 for (auto GEP : GepTraceTargets) {
805 IRBuilder<> IRB(GEP);
806 for (auto I = GEP->idx_begin(); I != GEP->idx_end(); ++I)
/freebsd-12-stable/contrib/llvm-project/llvm/lib/Transforms/Scalar/
H A DInferAddressSpaces.cpp357 if (auto *GEP = dyn_cast<GetElementPtrInst>(&I)) {
358 if (!GEP->getType()->isVectorTy())
359 PushPtrOperand(GEP->getPointerOperand());
484 GetElementPtrInst *GEP = cast<GetElementPtrInst>(I); local
486 GEP->getSourceElementType(), NewPointerOperands[0],
487 SmallVector<Value *, 4>(GEP->idx_begin(), GEP->idx_end()));
488 NewGEP->setIsInBounds(GEP->isInBounds());
H A DLowerMatrixIntrinsics.cpp97 // Get pointer to the start of the selected column. Skip GEP creation,
568 Value *GEP = local
571 Value *Column = createColumnLoad(GEP, VType->getElementType(), Builder);
595 Value *GEP = local
598 createColumnStore(C.value(), GEP, VType->getElementType(), Builder);
H A DRewriteStatepointsForGC.cpp468 if (auto *GEP = dyn_cast<GetElementPtrInst>(I))
469 return findBaseDefiningValue(GEP->getPointerOperand());
538 if (GetElementPtrInst *GEP = dyn_cast<GetElementPtrInst>(I))
539 // The base of this GEP is the base
540 return findBaseDefiningValue(GEP->getPointerOperand());
1930 // (currently it is GEP's and casts). The returned root is examined by the
1936 if (GetElementPtrInst *GEP = dyn_cast<GetElementPtrInst>(CurrentValue)) {
1937 ChainToBase.push_back(GEP);
1939 GEP->getPointerOperand());
1971 } else if (GetElementPtrInst *GEP
[all...]
/freebsd-12-stable/contrib/llvm-project/clang/lib/CodeGen/
H A DCGBuilder.h262 auto *GEP = cast<llvm::GetElementPtrInst>(CreateConstInBoundsGEP2_32( local
267 if (!GEP->accumulateConstantOffset(DL, Offset))
268 llvm_unreachable("offset of GEP with constants is always computable");
269 return Address(GEP, Addr.getAlignment().alignmentAtOffset(
/freebsd-12-stable/contrib/llvm-project/llvm/include/llvm/Analysis/
H A DMemoryBuiltins.h266 SizeOffsetType visitGEPOperator(GEPOperator &GEP);
335 SizeOffsetEvalType visitGEPOperator(GEPOperator &GEP);
H A DTargetTransformInfoImpl.h54 llvm_unreachable("Use getGEPCost for GEP operations!");
764 // Handle the case where the GEP instruction has a single operand,
771 // We assume that the cost of Scalar GEP with constant index and the
772 // cost of Vector GEP with splat constant index are the same.
779 assert(ConstIdx && "Unexpected GEP index");
873 if (const GEPOperator *GEP = dyn_cast<GEPOperator>(U)) {
874 return static_cast<T *>(this)->getGEPCost(GEP->getSourceElementType(),
875 GEP->getPointerOperand(),
/freebsd-12-stable/contrib/llvm-project/llvm/lib/Transforms/Utils/
H A DCodeExtractor.cpp937 GetElementPtrInst *GEP = GetElementPtrInst::Create( local
939 RewriteVal = new LoadInst(StructTy->getElementType(i), GEP,
1120 GetElementPtrInst *GEP = GetElementPtrInst::Create( local
1122 codeReplacer->getInstList().push_back(GEP);
1123 StoreInst *SI = new StoreInst(StructValues[i], GEP);
1159 GetElementPtrInst *GEP = GetElementPtrInst::Create( local
1161 codeReplacer->getInstList().push_back(GEP);
1162 Output = GEP;
1262 GetElementPtrInst *GEP = GetElementPtrInst::Create( local
1265 new StoreInst(outputs[i], GEP, InsertBefor
[all...]
H A DValueMapper.cpp919 if (auto *GEP = dyn_cast<GetElementPtrInst>(I)) {
920 GEP->setSourceElementType(
921 TypeMapper->remapType(GEP->getSourceElementType()));
922 GEP->setResultElementType(
923 TypeMapper->remapType(GEP->getResultElementType()));
/freebsd-12-stable/contrib/llvm-project/llvm/lib/Transforms/Vectorize/
H A DVPlan.h762 /// A recipe for handling GEP instructions.
765 GetElementPtrInst *GEP;
770 VPWidenGEPRecipe(GetElementPtrInst *GEP, Loop *OrigLoop)
771 : VPRecipeBase(VPWidenGEPSC), GEP(GEP),
772 IsIndexLoopInvariant(GEP->getNumIndices(), false) {
773 IsPtrLoopInvariant = OrigLoop->isLoopInvariant(GEP->getPointerOperand());
774 for (auto Index : enumerate(GEP->indices()))
/freebsd-12-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-12-stable/contrib/llvm-project/llvm/lib/CodeGen/
H A DGlobalMerge.cpp540 Constant *GEP = local
542 Globals[k]->replaceAllUsesWith(GEP);
552 Linkage, Name, GEP, &M);
H A DCodeGenPrepare.cpp227 cl::desc("Enable splitting large offset of GEP."));
296 /// Keep track of new GEP base after splitting the GEPs having large offset.
922 // Accepts a GEP and extracts the operands into a vector provided they're all
924 static bool getGEPSmallConstantIntOffsetV(GetElementPtrInst *GEP, argument
926 for (unsigned i = 1; i < GEP->getNumOperands(); i++) {
928 auto Op = dyn_cast<ConstantInt>(GEP->getOperand(i));
933 for (unsigned i = 1; i < GEP->getNumOperands(); i++)
934 OffsetV.push_back(GEP->getOperand(i));
2876 // A GEP which has too large offset to be folded into the addressing mode.
4240 // Scan the GEP
4295 auto *GEP = cast<GetElementPtrInst>(AddrInst); local
4835 GetElementPtrInst *GEP = LargeOffsetGEP.first; local
5426 GetElementPtrInst *GEP = LargeOffsetGEP->first; local
6886 GEPSequentialConstIndexed(GetElementPtrInst *GEP) argument
[all...]
/freebsd-12-stable/contrib/llvm-project/llvm/lib/IR/
H A DVerifier.cpp464 void visitGetElementPtrInst(GetElementPtrInst &GEP);
3303 void Verifier::visitGetElementPtrInst(GetElementPtrInst &GEP) { argument
3304 Type *TargetTy = GEP.getPointerOperandType()->getScalarType();
3307 "GEP base pointer is not a vector or a vector of pointers", &GEP); local
3308 Assert(GEP.getSourceElementType()->isSized(), "GEP into unsized type!", &GEP);
3310 SmallVector<Value*, 16> Idxs(GEP.idx_begin(), GEP
3313 "GEP indexes must be integers", &GEP); local
[all...]
H A DSafepointIRVerifier.cpp345 if (const auto *GEP = dyn_cast<GetElementPtrInst>(V)) {
346 Worklist.push_back(GEP->getPointerOperand());
694 // GEP/bitcast of unrelocated pointer is legal by itself but this def

Completed in 268 milliseconds

1234