HomeSort by relevance Sort by last modified time
    Searched refs:GEP (Results 1 - 25 of 57) sorted by null

1 2 3

  /external/llvm/lib/Target/NVPTX/
NVPTXFavorNonGenericAddrSpaces.cpp 14 // the base pointer of a GEP.
20 // %1 = gep [10 x float]* %0, i64 0, i64 %i
24 // and the GEP to expose more optimization opportunities to function
27 // %0 = gep [10 x float] addrspace(3)* @a, i64 0, i64 %i
35 // %0 = gep [10 x float] addrspace(3)* @a, i64 0, i64 %i
71 /// Transforms "gep (addrspacecast X), indices" into "addrspacecast (gep X,
75 bool hoistAddrSpaceCastFromGEP(GEPOperator *GEP);
112 GEPOperator *GEP) {
113 Operator *Cast = dyn_cast<Operator>(GEP->getPointerOperand())
    [all...]
NVVMReflect.cpp 156 const ConstantExpr *GEP = cast<ConstantExpr>(Str);
158 const Value *Sym = GEP->getOperand(0);
  /external/llvm/include/llvm/IR/
GetElementPtrTypeIterator.h 85 inline gep_type_iterator gep_type_begin(const User *GEP) {
87 (GEP->getOperand(0)->getType()->getScalarType(), GEP->op_begin()+1);
89 inline gep_type_iterator gep_type_end(const User *GEP) {
90 return gep_type_iterator::end(GEP->op_end());
92 inline gep_type_iterator gep_type_begin(const User &GEP) {
94 (GEP.getOperand(0)->getType()->getScalarType(), GEP.op_begin()+1);
96 inline gep_type_iterator gep_type_end(const User &GEP) {
97 return gep_type_iterator::end(GEP.op_end())
    [all...]
  /external/llvm/lib/Transforms/Scalar/
SeparateConstOffsetFromGEP.cpp 25 // gep %a, 0, %x, %y; load
26 // gep %a, 0, %x, %y + 1; load
27 // gep %a, 0, %x + 1, %y; load
28 // gep %a, 0, %x + 1, %y + 1; load
31 // unable to reuse (gep %a, 0, %x, %y). As a result, this misoptimization incurs
35 // each GEP, wasting tons of registers. It emits the following PTX for the
51 // It works by splitting each GEP into a variadic base and a constant offset.
59 // base = gep a, 0, x, y
99 "disable-separate-const-offset-from-gep", cl::init(false),
100 cl::desc("Do not separate the constant offset from a GEP instruction")
    [all...]
LoadCombine.cpp 97 if (auto *GEP = dyn_cast<GetElementPtrInst>(POP.Pointer)) {
98 unsigned BitWidth = DL->getPointerTypeSizeInBits(GEP->getType());
100 if (GEP->accumulateConstantOffset(*DL, Offset))
105 POP.Pointer = GEP->getPointerOperand();
  /external/llvm/include/llvm/Transforms/Utils/
Local.h 187 Value *EmitGEPOffset(IRBuilderTy *Builder, const DataLayout &TD, User *GEP,
189 GEPOperator *GEPOp = cast<GEPOperator>(GEP);
190 Type *IntPtrTy = TD.getIntPtrType(GEP->getType());
193 // If the GEP is inbounds, we know that none of the addressing operations will
201 gep_type_iterator GTI = gep_type_begin(GEP);
202 for (User::op_iterator i = GEP->op_begin() + 1, e = GEP->op_end(); i != e;
220 GEP->getName()+".offs");
228 Result = Builder->CreateAdd(Result, Scale, GEP->getName()+".offs");
237 GEP->getName()+".idx", isInBounds /*NUW*/)
    [all...]
  /external/llvm/lib/Target/R600/
AMDGPUTargetTransformInfo.cpp 103 const GetElementPtrInst *GEP = dyn_cast<GetElementPtrInst>(I);
104 if (!GEP)
106 const Value *Ptr = GEP->getPointerOperand();
AMDGPUPromoteAlloca.cpp 115 GetElementPtrInst *GEP = cast<GetElementPtrInst>(Ptr);
117 return GEPIdx[GEP];
120 static Value* GEPToVectorIndex(GetElementPtrInst *GEP) {
122 if (GEP->getNumOperands() != 3)
125 ConstantInt *I0 = dyn_cast<ConstantInt>(GEP->getOperand(1));
129 return GEP->getOperand(2);
166 GetElementPtrInst *GEP = dyn_cast<GetElementPtrInst>(AllocaUser);
167 if (!GEP) {
175 Value *Index = GEPToVectorIndex(GEP);
177 // If we can't compute a vector index from this GEP, then we can'
    [all...]
  /external/llvm/lib/Transforms/InstCombine/
InstructionCombining.cpp 98 Value *InstCombiner::EmitGEPOffset(User *GEP) {
99 return llvm::EmitGEPOffset(Builder, *getDataLayout(), GEP);
    [all...]
InstCombinePHI.cpp 137 // This is true if all GEP bases are allocas and if all indices into them are
150 GetElementPtrInst *GEP= dyn_cast<GetElementPtrInst>(PN.getIncomingValue(i));
151 if (!GEP || !GEP->hasOneUse() || GEP->getType() != FirstInst->getType() ||
152 GEP->getNumOperands() != FirstInst->getNumOperands())
155 AllInBounds &= GEP->isInBounds();
159 (!isa<AllocaInst>(GEP->getOperand(0)) ||
160 !GEP->hasAllConstantIndices()))
165 if (FirstInst->getOperand(op) == GEP->getOperand(op)
    [all...]
InstCombineLoadStoreAlloca.cpp 77 if (GetElementPtrInst *GEP = dyn_cast<GetElementPtrInst>(I)) {
78 // If the GEP has all zero indices, it doesn't offset the pointer. If it
81 std::make_pair(I, IsOffset || !GEP->hasAllZeroIndices()));
200 Instruction *GEP =
202 InsertNewInstBefore(GEP, *It);
206 return ReplaceInstUsesWith(AI, GEP);
313 // see if a trivial 'gep P, 0, 0' will help matters. Only do this for
393 // load(gep null, ...) -> unreachable
485 /// NewGEPIndices - If SrcPTy is an aggregate type, we can emit a "noop gep"
492 // see if a trivial 'gep P, 0, 0' will help matters. Only do this fo
    [all...]
InstCombineCompares.cpp 212 /// cmp pred (load (gep GV, ...)), cmpcst
215 /// we can optimize "icmp eq (load (gep "foo", 0, i)), 0" into "icmp eq i, 3".
220 FoldCmpLoadFromIndexedGlobal(GetElementPtrInst *GEP, GlobalVariable *GV,
223 if (!GEP->isInBounds() && !DL)
236 // Require: GEP GV, 0, i {{, constant indices}}
237 if (GEP->getNumOperands() < 3 ||
238 !isa<ConstantInt>(GEP->getOperand(1)) ||
239 !cast<ConstantInt>(GEP->getOperand(1))->isZero() ||
240 isa<Constant>(GEP->getOperand(2)))
249 for (unsigned i = 3, e = GEP->getNumOperands(); i != e; ++i)
    [all...]
  /external/chromium_org/third_party/mesa/src/src/gallium/drivers/radeon/
R600KernelParameters.cpp 159 getElementPtrInst* GEP = dyn_cast<getElementPtrInst>(Val);
160 getElementPtrInst::op_iterator I = GEP->op_begin();
162 for (++I; I != GEP->op_end(); ++I) {
247 GetElementPtrInst *GEP = dyn_cast<GetElementPtrInst>(V);
257 if (GEP && GEP->getType()->getAddressSpace() != Addrspace) {
258 Value *Op = GEP->getPointerOperand();
266 std::vector<Value*> Params(GEP->idx_begin(), GEP->idx_end());
270 GEP2->setIsInBounds(GEP->isInBounds())
    [all...]
  /external/mesa3d/src/gallium/drivers/radeon/
R600KernelParameters.cpp 159 getElementPtrInst* GEP = dyn_cast<getElementPtrInst>(Val);
160 getElementPtrInst::op_iterator I = GEP->op_begin();
162 for (++I; I != GEP->op_end(); ++I) {
247 GetElementPtrInst *GEP = dyn_cast<GetElementPtrInst>(V);
257 if (GEP && GEP->getType()->getAddressSpace() != Addrspace) {
258 Value *Op = GEP->getPointerOperand();
266 std::vector<Value*> Params(GEP->idx_begin(), GEP->idx_end());
270 GEP2->setIsInBounds(GEP->isInBounds())
    [all...]
  /external/llvm/lib/Analysis/
PHITransAddr.cpp 216 if (GetElementPtrInst *GEP = dyn_cast<GetElementPtrInst>(Inst)) {
219 for (unsigned i = 0, e = GEP->getNumOperands(); i != e; ++i) {
220 Value *GEPOp = PHITranslateSubExpr(GEP->getOperand(i), CurBB, PredBB, DT);
223 AnyChanged |= GEPOp != GEP->getOperand(i);
228 return GEP;
230 // Simplify the GEP to handle 'gep x, 0' -> x etc.
238 // Scan to see if we have this GEP available.
242 if (GEPI->getType() == GEP->getType() &&
397 if (GetElementPtrInst *GEP = dyn_cast<GetElementPtrInst>(Inst))
    [all...]
MemoryBuiltins.cpp 418 if (GEPOperator *GEP = dyn_cast<GEPOperator>(V))
419 return visitGEPOperator(*GEP);
537 SizeOffsetType ObjectSizeOffsetVisitor::visitGEPOperator(GEPOperator &GEP) {
538 SizeOffsetType PtrData = compute(GEP.getPointerOperand());
540 if (!bothKnown(PtrData) || !GEP.accumulateConstantOffset(*DL, Offset))
653 } else if (GEPOperator *GEP = dyn_cast<GEPOperator>(V)) {
654 Result = visitGEPOperator(*GEP);
733 ObjectSizeOffsetEvaluator::visitGEPOperator(GEPOperator &GEP) {
734 SizeOffsetEvalType PtrData = compute_(GEP.getPointerOperand());
738 Value *Offset = EmitGEPOffset(&Builder, *DL, &GEP, /*NoAssumptions=*/true)
    [all...]
ValueTracking.cpp     [all...]
  /external/llvm/lib/IR/
Value.cpp 388 if (GEPOperator *GEP = dyn_cast<GEPOperator>(V)) {
392 if (!GEP->hasAllZeroIndices())
396 if (!GEP->hasAllConstantIndices())
400 if (!GEP->isInBounds())
404 V = GEP->getPointerOperand();
449 if (GEPOperator *GEP = dyn_cast<GEPOperator>(V)) {
450 if (!GEP->isInBounds())
453 if (!GEP->accumulateConstantOffset(DL, GEPOffset))
456 V = GEP->getPointerOperand();
512 if (const GEPOperator *GEP = dyn_cast<GEPOperator>(V))
    [all...]
  /external/llvm/lib/Transforms/IPO/
ArgumentPromotion.cpp 76 /// A vector used to hold the indices of a single GEP instruction
321 // We can only promote this argument if all of the uses are loads, or are GEP
358 if (GetElementPtrInst *GEP = dyn_cast<GetElementPtrInst>(V)) {
359 V = GEP->getPointerOperand();
362 Indices.reserve(GEP->getNumIndices());
363 for (User::op_iterator II = GEP->idx_begin(), IE = GEP->idx_end();
368 // We found a non-constant GEP index for this argument? Bail out
377 // Direct loads are equivalent to a GEP with a single 0 index.
383 // not (GEP+)loads, or any (GEP+)loads that are not safe to promote
    [all...]
  /external/llvm/lib/CodeGen/
GlobalMerge.cpp 222 Constant *GEP = ConstantExpr::getInBoundsGetElementPtr(MergedGV, Idx);
223 Globals[k]->replaceAllUsesWith(GEP);
228 auto *PTy = cast<PointerType>(GEP->getType());
230 Linkage, Name, GEP, &M);
  /external/llvm/lib/Transforms/Utils/
CodeExtractor.cpp 367 GetElementPtrInst *GEP =
369 RewriteVal = new LoadInst(GEP, "loadgep_" + inputs[i]->getName(), TI);
468 GetElementPtrInst *GEP =
471 codeReplacer->getInstList().push_back(GEP);
472 StoreInst *SI = new StoreInst(StructValues[i], GEP);
494 GetElementPtrInst *GEP
497 codeReplacer->getInstList().push_back(GEP);
498 Output = GEP;
609 GetElementPtrInst *GEP =
613 new StoreInst(outputs[out], GEP, NTRet)
    [all...]
  /external/llvm/lib/Analysis/IPA/
InlineCost.cpp 101 bool isGEPOffsetConstant(GetElementPtrInst &GEP);
102 bool accumulateGEPOffset(GEPOperator &GEP, APInt &Offset);
226 /// \brief Check whether a GEP's indices are all constant.
229 bool CallAnalyzer::isGEPOffsetConstant(GetElementPtrInst &GEP) {
230 for (User::op_iterator I = GEP.idx_begin(), E = GEP.idx_end(); I != E; ++I)
237 /// \brief Accumulate a constant GEP offset into an APInt if possible.
241 bool CallAnalyzer::accumulateGEPOffset(GEPOperator &GEP, APInt &Offset) {
248 for (gep_type_iterator GTI = gep_type_begin(GEP), GTE = gep_type_end(GEP);
    [all...]
  /external/llvm/unittests/Transforms/Utils/
Cloning.cpp 139 GetElementPtrInst *GEP = GetElementPtrInst::Create(V, ops);
140 EXPECT_FALSE(this->clone(GEP)->isInBounds());
142 GEP->setIsInBounds();
143 EXPECT_TRUE(this->clone(GEP)->isInBounds());
  /external/llvm/include/llvm/Analysis/
MemoryBuiltins.h 201 SizeOffsetType visitGEPOperator(GEPOperator &GEP);
266 SizeOffsetEvalType visitGEPOperator(GEPOperator &GEP);
  /external/llvm/unittests/Linker/
LinkModulesTest.cpp 76 Value *GEP = Builder.CreateGEP(GV, GEPIndices, "switch.gep");
77 Value *Load = Builder.CreateLoad(GEP, "switch.load");

Completed in 499 milliseconds

1 2 3