Searched refs:GEPI (Results 1 - 25 of 27) sorted by relevance

12

/external/llvm/lib/Analysis/
H A DPtrUseVisitor.cpp30 bool detail::PtrUseVisitorBase::adjustOffsetForGEP(GetElementPtrInst &GEPI) { argument
34 return GEPI.accumulateConstantOffset(DL, Offset);
H A DPHITransAddr.cpp243 if (GetElementPtrInst *GEPI = dyn_cast<GetElementPtrInst>(U))
244 if (GEPI->getType() == GEP->getType() &&
245 GEPI->getNumOperands() == GEPOps.size() &&
246 GEPI->getParent()->getParent() == CurBB->getParent() &&
247 (!DT || DT->dominates(GEPI->getParent(), PredBB))) {
248 if (std::equal(GEPOps.begin(), GEPOps.end(), GEPI->op_begin()))
249 return GEPI;
/external/llvm/include/llvm/Analysis/
H A DPtrUseVisitor.h163 bool adjustOffsetForGEP(GetElementPtrInst &GEPI);
246 void visitGetElementPtrInst(GetElementPtrInst &GEPI) { argument
247 if (GEPI.use_empty())
251 if (!adjustOffsetForGEP(GEPI)) {
257 enqueueUsers(GEPI);
/external/llvm/lib/Transforms/IPO/
H A DGlobalOpt.cpp337 GetElementPtrInst *GEPI = dyn_cast<GetElementPtrInst>(I);
338 if (!GEPI) return false;
340 if (GEPI->getNumOperands() < 3 || !isa<Constant>(GEPI->getOperand(1)) ||
341 !cast<Constant>(GEPI->getOperand(1))->isNullValue())
344 for (User *U : GEPI->users())
369 gep_type_iterator GEPI = gep_type_begin(U), E = gep_type_end(U);
370 ++GEPI; // Skip over the pointer index.
373 if (ArrayType *AT = dyn_cast<ArrayType>(*GEPI)) {
390 for (++GEPI; // Ski
544 GetElementPtrInst *GEPI = cast<GetElementPtrInst>(GEP); local
[all...]
/external/swiftshader/third_party/LLVM/lib/Transforms/IPO/
H A DGlobalOpt.cpp397 GetElementPtrInst *GEPI = dyn_cast<GetElementPtrInst>(I);
398 if (GEPI == 0) return false;
400 if (GEPI->getNumOperands() < 3 || !isa<Constant>(GEPI->getOperand(1)) ||
401 !cast<Constant>(GEPI->getOperand(1))->isNullValue())
404 for (Value::use_iterator I = GEPI->use_begin(), E = GEPI->use_end();
431 gep_type_iterator GEPI = gep_type_begin(U), E = gep_type_end(U);
432 ++GEPI; // Skip over the pointer index.
435 if (ArrayType *AT = dyn_cast<ArrayType>(*GEPI)) {
603 GetElementPtrInst *GEPI = cast<GetElementPtrInst>(GEP); local
[all...]
/external/llvm/lib/Transforms/InstCombine/
H A DInstCombineLoadStoreAlloca.cpp700 static bool canReplaceGEPIdxWithZero(InstCombiner &IC, GetElementPtrInst *GEPI, argument
702 if (GEPI->getNumOperands() < 2)
707 auto FirstNZIdx = [](const GetElementPtrInst *GEPI) {
709 for (unsigned IE = GEPI->getNumOperands(); I != IE; ++I) {
710 Value *V = GEPI->getOperand(I);
723 Idx = FirstNZIdx(GEPI);
724 if (Idx == GEPI->getNumOperands())
726 if (isa<Constant>(GEPI->getOperand(Idx)))
729 SmallVector<Value *, 4> Ops(GEPI->idx_begin(), GEPI
[all...]
/external/swiftshader/third_party/LLVM/lib/Analysis/
H A DPHITransAddr.cpp242 if (GetElementPtrInst *GEPI = dyn_cast<GetElementPtrInst>(*UI))
243 if (GEPI->getType() == GEP->getType() &&
244 GEPI->getNumOperands() == GEPOps.size() &&
245 GEPI->getParent()->getParent() == CurBB->getParent() &&
246 (!DT || DT->dominates(GEPI->getParent(), PredBB))) {
249 if (GEPI->getOperand(i) != GEPOps[i]) {
254 return GEPI;
H A DInlineCost.cpp120 } else if (const GetElementPtrInst *GEPI = dyn_cast<GetElementPtrInst>(II)){
123 if (GEPI->hasAllConstantIndices())
H A DValueTracking.cpp1541 if (const GetElementPtrInst *GEPI = dyn_cast<GetElementPtrInst>(V)) {
1542 GEP = GEPI;
1673 if (GetElementPtrInst *GEPI = dyn_cast<GetElementPtrInst>(V)) {
1674 GEP = GEPI;
/external/swiftshader/third_party/LLVM/lib/Transforms/Scalar/
H A DScalarReplAggregates.cpp130 void isSafeGEP(GetElementPtrInst *GEPI, uint64_t &Offset, AllocaInfo &Info);
146 void RewriteGEP(GetElementPtrInst *GEPI, AllocaInst *AI, uint64_t Offset,
1512 } else if (GetElementPtrInst *GEPI = dyn_cast<GetElementPtrInst>(User)) {
1514 isSafeGEP(GEPI, GEPOffset, Info);
1516 isSafeForScalarRepl(GEPI, GEPOffset, Info);
1576 } else if (GetElementPtrInst *GEPI = dyn_cast<GetElementPtrInst>(User)) {
1580 if (!GEPI->hasAllZeroIndices())
1582 isSafePHISelectUseForScalarRepl(GEPI, Offset, Info);
1614 void SROA::isSafeGEP(GetElementPtrInst *GEPI, argument
1616 gep_type_iterator GEPIt = gep_type_begin(GEPI),
1915 RewriteGEP(GetElementPtrInst *GEPI, AllocaInst *AI, uint64_t Offset, SmallVector<AllocaInst*, 32> &NewElts) argument
[all...]
H A DCodeGenPrepare.cpp1109 if (GetElementPtrInst *GEPI = dyn_cast<GetElementPtrInst>(I)) {
1110 if (GEPI->hasAllZeroIndices()) {
1112 Instruction *NC = new BitCastInst(GEPI->getOperand(0), GEPI->getType(),
1113 GEPI->getName(), GEPI);
1114 GEPI->replaceAllUsesWith(NC);
1115 GEPI->eraseFromParent();
/external/llvm/lib/Target/NVPTX/
H A DNVPTXFavorNonGenericAddrSpaces.cpp161 if (Instruction *GEPI = dyn_cast<Instruction>(GEP)) {
168 "", GEPI);
171 NewASC = new AddrSpaceCastInst(NewGEP, GEP->getType(), "", GEPI);
/external/llvm/lib/Transforms/Scalar/
H A DScalarizer.cpp439 bool Scalarizer::visitGetElementPtrInst(GetElementPtrInst &GEPI) { argument
440 VectorType *VT = dyn_cast<VectorType>(GEPI.getType());
444 IRBuilder<> Builder(&GEPI);
446 unsigned NumIndices = GEPI.getNumIndices();
448 Scatterer Base = scatter(&GEPI, GEPI.getOperand(0));
453 Ops[I] = scatter(&GEPI, GEPI.getOperand(I + 1));
462 Res[I] = Builder.CreateGEP(GEPI.getSourceElementType(), Base[I], Indices,
463 GEPI
[all...]
H A DSROA.cpp674 void visitGetElementPtrInst(GetElementPtrInst &GEPI) {
675 if (GEPI.use_empty())
676 return markAsDead(GEPI);
678 if (SROAStrictInbounds && GEPI.isInBounds()) {
687 const DataLayout &DL = GEPI.getModule()->getDataLayout();
688 for (gep_type_iterator GTI = gep_type_begin(GEPI),
689 GTE = gep_type_end(GEPI);
713 return markAsDead(GEPI);
717 return Base::visitGetElementPtrInst(GEPI);
3143 bool visitGetElementPtrInst(GetElementPtrInst &GEPI) {
[all...]
/external/swiftshader/third_party/LLVM/lib/Transforms/InstCombine/
H A DInstCombineLoadStoreAlloca.cpp178 if (GetElementPtrInst *GEPI = dyn_cast<GetElementPtrInst>(Op)) {
179 const Value *GEPI0 = GEPI->getOperand(0);
181 if (isa<ConstantPointerNull>(GEPI0) && GEPI->getPointerAddressSpace() == 0){
H A DInstructionCombining.cpp1119 if (GetElementPtrInst *GEPI = dyn_cast<GetElementPtrInst>(U)) {
1120 if (IsOnlyNullComparedAndFreed(GEPI, Users, Depth+1)) {
1121 Users.push_back(GEPI);
/external/llvm/lib/Transforms/Utils/
H A DPromoteMemoryToRegister.cpp79 } else if (const GetElementPtrInst *GEPI = dyn_cast<GetElementPtrInst>(U)) {
80 if (GEPI->getType() != Type::getInt8PtrTy(U->getContext(), AS))
82 if (!GEPI->hasAllZeroIndices())
84 if (!onlyUsedByLifetimeMarkers(GEPI))
/external/swiftshader/third_party/LLVM/lib/Transforms/Utils/
H A DPromoteMemoryToRegister.cpp109 } else if (const GetElementPtrInst *GEPI = dyn_cast<GetElementPtrInst>(U)) {
110 if (GEPI->getType() != Type::getInt8PtrTy(U->getContext()))
112 if (!GEPI->hasAllZeroIndices())
114 if (!onlyUsedByLifetimeMarkers(GEPI))
/external/swiftshader/third_party/LLVM/lib/VMCore/
H A DConstants.cpp752 gep_type_iterator GEPI = gep_type_begin(this), E = gep_type_end(this);
756 ++GEPI;
761 for (; GEPI != E; ++GEPI, ++OI) {
764 if (ArrayType *ATy = dyn_cast<ArrayType>(*GEPI))
H A DInstructions.cpp1342 GetElementPtrInst::GetElementPtrInst(const GetElementPtrInst &GEPI) argument
1343 : Instruction(GEPI.getType(), GetElementPtr,
1345 - GEPI.getNumOperands(),
1346 GEPI.getNumOperands()) {
1347 std::copy(GEPI.op_begin(), GEPI.op_end(), op_begin());
1348 SubclassOptionalData = GEPI.SubclassOptionalData;
/external/llvm/lib/IR/
H A DInstructions.cpp1650 GetElementPtrInst::GetElementPtrInst(const GetElementPtrInst &GEPI)
1651 : Instruction(GEPI.getType(), GetElementPtr,
1653 GEPI.getNumOperands(),
1654 GEPI.getNumOperands()),
1655 SourceElementType(GEPI.SourceElementType),
1656 ResultElementType(GEPI.ResultElementType) {
1657 std::copy(GEPI.op_begin(), GEPI.op_end(), op_begin());
1658 SubclassOptionalData = GEPI.SubclassOptionalData;
H A DConstants.cpp1075 gep_type_iterator GEPI = gep_type_begin(this), E = gep_type_end(this);
1079 ++GEPI;
1084 for (; GEPI != E; ++GEPI, ++OI) {
1087 if (ArrayType *ATy = dyn_cast<ArrayType>(*GEPI))
/external/llvm/lib/CodeGen/
H A DCodeGenPrepare.cpp5266 if (GetElementPtrInst *GEPI = dyn_cast<GetElementPtrInst>(I)) {
5267 if (GEPI->hasAllZeroIndices()) {
5269 Instruction *NC = new BitCastInst(GEPI->getOperand(0), GEPI->getType(),
5270 GEPI->getName(), GEPI);
5271 GEPI->replaceAllUsesWith(NC);
5272 GEPI->eraseFromParent();
/external/llvm/lib/Transforms/Instrumentation/
H A DDataFlowSanitizer.cpp339 void visitGetElementPtrInst(GetElementPtrInst &GEPI);
1275 void DFSanVisitor::visitGetElementPtrInst(GetElementPtrInst &GEPI) { argument
1276 visitOperandShadowInst(GEPI);
/external/llvm/lib/Transforms/Vectorize/
H A DSLPVectorizer.cpp4565 auto *GEPI = cast<GetElementPtrInst>(GEPList[I]); local
4566 if (!Candidates.count(GEPI))
4575 } else if (GEPI->idx_begin()->get() == GEPJ->idx_begin()->get()) {

Completed in 499 milliseconds

12