| /freebsd-14.2/contrib/llvm-project/llvm/lib/Analysis/ |
| H A D | PtrUseVisitor.cpp | 32 bool detail::PtrUseVisitorBase::adjustOffsetForGEP(GetElementPtrInst &GEPI) { in adjustOffsetForGEP() argument 36 APInt TmpOffset(DL.getIndexTypeSizeInBits(GEPI.getType()), 0); in adjustOffsetForGEP() 37 if (GEPI.accumulateConstantOffset(DL, TmpOffset)) { in adjustOffsetForGEP()
|
| H A D | PHITransAddr.cpp | 227 if (GetElementPtrInst *GEPI = dyn_cast<GetElementPtrInst>(U)) in translateSubExpr() local 228 if (GEPI->getType() == GEP->getType() && in translateSubExpr() 229 GEPI->getSourceElementType() == GEP->getSourceElementType() && in translateSubExpr() 230 GEPI->getNumOperands() == GEPOps.size() && in translateSubExpr() 231 GEPI->getParent()->getParent() == CurBB->getParent() && in translateSubExpr() 232 (!DT || DT->dominates(GEPI->getParent(), PredBB))) { in translateSubExpr() 233 if (std::equal(GEPOps.begin(), GEPOps.end(), GEPI->op_begin())) in translateSubExpr() 234 return GEPI; in translateSubExpr()
|
| H A D | InstructionSimplify.cpp | 7061 auto *GEPI = cast<GetElementPtrInst>(I); in simplifyInstructionWithOperands() local 7062 return simplifyGEPInst(GEPI->getSourceElementType(), NewOps[0], in simplifyInstructionWithOperands() 7063 ArrayRef(NewOps).slice(1), GEPI->isInBounds(), Q, in simplifyInstructionWithOperands()
|
| H A D | ScalarEvolution.cpp | 3754 auto *GEPI = dyn_cast<Instruction>(GEP); in getGEPExpr() local 3757 return GEPI && isSCEVExprNeverPoison(GEPI); in getGEPExpr()
|
| /freebsd-14.2/contrib/llvm-project/llvm/include/llvm/Analysis/ |
| H A D | PtrUseVisitor.h | 167 bool adjustOffsetForGEP(GetElementPtrInst &GEPI); 259 void visitGetElementPtrInst(GetElementPtrInst &GEPI) { in visitGetElementPtrInst() argument 260 if (GEPI.use_empty()) in visitGetElementPtrInst() 264 if (!adjustOffsetForGEP(GEPI)) { in visitGetElementPtrInst() 270 enqueueUsers(GEPI); in visitGetElementPtrInst()
|
| /freebsd-14.2/contrib/llvm-project/llvm/lib/Transforms/InstCombine/ |
| H A D | InstCombineLoadStoreAlloca.cpp | 894 if (GEPI->getNumOperands() < 2) in canReplaceGEPIdxWithZero() 899 auto FirstNZIdx = [](const GetElementPtrInst *GEPI) { in canReplaceGEPIdxWithZero() argument 902 Value *V = GEPI->getOperand(I); in canReplaceGEPIdxWithZero() 915 Idx = FirstNZIdx(GEPI); in canReplaceGEPIdxWithZero() 916 if (Idx == GEPI->getNumOperands()) in canReplaceGEPIdxWithZero() 918 if (isa<Constant>(GEPI->getOperand(Idx))) in canReplaceGEPIdxWithZero() 921 SmallVector<Value *, 4> Ops(GEPI->idx_begin(), GEPI->idx_begin() + Idx); in canReplaceGEPIdxWithZero() 954 if (Idx+1 != GEPI->getNumOperands() && !GEPI->isInBounds()) in canReplaceGEPIdxWithZero() 971 Instruction *NewGEPI = GEPI->clone(); in replaceGEPIdxWithZero() 988 Ptr = GEPI->getOperand(0); in canSimplifyNullStoreOrGEP() [all …]
|
| /freebsd-14.2/contrib/llvm-project/llvm/lib/Transforms/Scalar/ |
| H A D | Scalarizer.cpp | 302 bool visitGetElementPtrInst(GetElementPtrInst &GEPI); 812 std::optional<VectorSplit> VS = getVectorSplit(GEPI.getType()); in visitGetElementPtrInst() 816 IRBuilder<> Builder(&GEPI); in visitGetElementPtrInst() 817 unsigned NumIndices = GEPI.getNumIndices(); in visitGetElementPtrInst() 825 dyn_cast<FixedVectorType>(GEPI.getOperand(I)->getType())) { in visitGetElementPtrInst() 831 ScatterOps[I] = scatter(&GEPI, GEPI.getOperand(I), *OpVS); in visitGetElementPtrInst() 833 ScalarOps[I] = GEPI.getOperand(I); in visitGetElementPtrInst() 848 Res[I] = Builder.CreateGEP(GEPI.getSourceElementType(), SplitOps[0], in visitGetElementPtrInst() 850 GEPI.getName() + ".i" + Twine(I)); in visitGetElementPtrInst() 851 if (GEPI.isInBounds()) in visitGetElementPtrInst() [all …]
|
| H A D | SROA.cpp | 1100 if (GEPI.use_empty()) in visitGetElementPtrInst() 1101 return markAsDead(GEPI); in visitGetElementPtrInst() 3977 IRB.SetInsertPoint(&GEPI); in foldGEPSelect() 3993 Visited.erase(&GEPI); in foldGEPSelect() 3995 GEPI.eraseFromParent(); in foldGEPSelect() 4029 IRB.SetInsertPoint(GEPI.getParent(), GEPI.getParent()->getFirstNonPHIIt()); in foldGEPPhi() 4049 Visited.erase(&GEPI); in foldGEPPhi() 4051 GEPI.eraseFromParent(); in foldGEPPhi() 4064 foldGEPSelect(GEPI)) in visitGetElementPtrInst() 4068 foldGEPPhi(GEPI)) in visitGetElementPtrInst() [all …]
|
| H A D | NewGVN.cpp | 1199 } else if (auto *GEPI = dyn_cast<GetElementPtrInst>(I)) { in createExpression() local 1200 Value *V = simplifyGEPInst(GEPI->getSourceElementType(), *E->op_begin(), in createExpression() 1202 GEPI->isInBounds(), Q); in createExpression()
|
| /freebsd-14.2/contrib/llvm-project/llvm/lib/Target/SPIRV/ |
| H A D | SPIRVEmitIntrinsics.cpp | 293 } else if (GetElementPtrInst *GEPI = dyn_cast<GetElementPtrInst>(I)) { in insertPtrCastInstr() local 294 Pointer = GEPI->getPointerOperand(); in insertPtrCastInstr() 295 ExpectedElementType = GEPI->getSourceElementType(); in insertPtrCastInstr() 318 GetElementPtrInst *GEPI = dyn_cast<GetElementPtrInst>(Pointer); in insertPtrCastInstr() local 319 if (GEPI && GEPI->getResultElementType() == ExpectedElementType) in insertPtrCastInstr()
|
| /freebsd-14.2/contrib/llvm-project/llvm/lib/Transforms/IPO/ |
| H A D | GlobalOpt.cpp | 668 } else if (const GetElementPtrInst *GEPI = dyn_cast<GetElementPtrInst>(U)) { in AllUsesOfValueWillTrapIfNull() local 669 if (!AllUsesOfValueWillTrapIfNull(GEPI, PHIs)) return false; in AllUsesOfValueWillTrapIfNull() 787 } else if (GetElementPtrInst *GEPI = dyn_cast<GetElementPtrInst>(I)) { in OptimizeAwayTrappingUsesOfValue() local 790 Idxs.reserve(GEPI->getNumOperands()-1); in OptimizeAwayTrappingUsesOfValue() 791 for (User::op_iterator i = GEPI->op_begin() + 1, e = GEPI->op_end(); in OptimizeAwayTrappingUsesOfValue() 797 if (Idxs.size() == GEPI->getNumOperands()-1) in OptimizeAwayTrappingUsesOfValue() 799 GEPI, ConstantExpr::getGetElementPtr(GEPI->getSourceElementType(), in OptimizeAwayTrappingUsesOfValue() 801 if (GEPI->use_empty()) { in OptimizeAwayTrappingUsesOfValue() 803 GEPI->eraseFromParent(); in OptimizeAwayTrappingUsesOfValue() 1047 if (auto *GEPI = dyn_cast<GetElementPtrInst>(U)) { in valueIsOnlyUsedLocallyOrStoredToOneGlobal() local [all …]
|
| /freebsd-14.2/contrib/llvm-project/llvm/lib/Transforms/Instrumentation/ |
| H A D | SanitizerBinaryMetadata.cpp | 331 if (auto *GEPI = dyn_cast<GetElementPtrInst>(U)) { in hasUseAfterReturnUnsafeUses() local 332 if (!hasUseAfterReturnUnsafeUses(*GEPI)) in hasUseAfterReturnUnsafeUses()
|
| H A D | DataFlowSanitizer.cpp | 800 void visitGetElementPtrInst(GetElementPtrInst &GEPI); 2780 void DFSanVisitor::visitGetElementPtrInst(GetElementPtrInst &GEPI) { in visitGetElementPtrInst() argument 2783 StripPointerGEPsAndCasts(GEPI.getPointerOperand()))) { in visitGetElementPtrInst() 2784 visitInstOperands(GEPI); in visitGetElementPtrInst() 2790 Value *BasePointer = GEPI.getPointerOperand(); in visitGetElementPtrInst() 2791 DFSF.setShadow(&GEPI, DFSF.getShadow(BasePointer)); in visitGetElementPtrInst() 2793 DFSF.setOrigin(&GEPI, DFSF.getOrigin(BasePointer)); in visitGetElementPtrInst()
|
| /freebsd-14.2/contrib/llvm-project/llvm/lib/CodeGen/ |
| H A D | CodeGenPrepare.cpp | 8015 BasicBlock *SrcBlock = GEPI->getParent(); in tryUnmergingGEPsAcrossIndirectBr() 8021 if (!GEPSequentialConstIndexed(GEPI)) in tryUnmergingGEPsAcrossIndirectBr() 8029 Value *GEPIOp = GEPI->getOperand(0); in tryUnmergingGEPsAcrossIndirectBr() 8052 if (Usr == GEPI) in tryUnmergingGEPsAcrossIndirectBr() 8097 UGEPI->setOperand(0, GEPI); in tryUnmergingGEPsAcrossIndirectBr() 8104 if (!GEPI->isInBounds()) { in tryUnmergingGEPsAcrossIndirectBr() 8292 if (GEPI->hasAllZeroIndices()) { in optimizeInst() 8294 Instruction *NC = new BitCastInst(GEPI->getOperand(0), GEPI->getType(), in optimizeInst() 8295 GEPI->getName(), GEPI); in optimizeInst() 8296 NC->setDebugLoc(GEPI->getDebugLoc()); in optimizeInst() [all …]
|
| /freebsd-14.2/contrib/llvm-project/llvm/lib/Transforms/Utils/ |
| H A D | PromoteMemoryToRegister.cpp | 86 } else if (const GetElementPtrInst *GEPI = dyn_cast<GetElementPtrInst>(U)) { in isAllocaPromotable() local 87 if (!GEPI->hasAllZeroIndices()) in isAllocaPromotable() 89 if (!onlyUsedByLifetimeMarkersOrDroppableInsts(GEPI)) in isAllocaPromotable()
|
| /freebsd-14.2/contrib/llvm-project/llvm/lib/Target/AMDGPU/ |
| H A D | AMDGPUInstructionSelector.cpp | 4236 const GEPInfo &GEPI = AddrInfo[0]; in selectSmrdOffset() local 4238 AMDGPU::getSMRDEncodedOffset(STI, GEPI.Imm, false); in selectSmrdOffset() 4241 if (GEPI.SgprParts.size() == 1 && GEPI.Imm != 0 && EncodedImm && in selectSmrdOffset() 4257 if (Offset && GEPI.SgprParts.size() == 1 && EncodedImm) { in selectSmrdOffset() 4258 Base = GEPI.SgprParts[0]; in selectSmrdOffset() 4264 if (SOffset && GEPI.SgprParts.size() == 1 && isUInt<32>(GEPI.Imm) && in selectSmrdOffset() 4265 GEPI.Imm != 0) { in selectSmrdOffset() 4270 Base = GEPI.SgprParts[0]; in selectSmrdOffset() 4273 .addImm(GEPI.Imm); in selectSmrdOffset() 4277 if (SOffset && GEPI.SgprParts.size() && GEPI.Imm == 0) { in selectSmrdOffset() [all …]
|
| /freebsd-14.2/contrib/llvm-project/llvm/lib/IR/ |
| H A D | Instructions.cpp | 1714 GetElementPtrInst::GetElementPtrInst(const GetElementPtrInst &GEPI) in GetElementPtrInst() argument 1715 : Instruction(GEPI.getType(), GetElementPtr, in GetElementPtrInst() 1717 GEPI.getNumOperands(), in GetElementPtrInst() 1718 GEPI.getNumOperands()), in GetElementPtrInst() 1719 SourceElementType(GEPI.SourceElementType), in GetElementPtrInst() 1720 ResultElementType(GEPI.ResultElementType) { in GetElementPtrInst() 1721 std::copy(GEPI.op_begin(), GEPI.op_end(), op_begin()); in GetElementPtrInst() 1722 SubclassOptionalData = GEPI.SubclassOptionalData; in GetElementPtrInst()
|
| /freebsd-14.2/contrib/llvm-project/llvm/lib/Transforms/Coroutines/ |
| H A D | CoroFrame.cpp | 1545 void visitGetElementPtrInst(GetElementPtrInst &GEPI) { in visitGetElementPtrInst() 1547 Base::visitGetElementPtrInst(GEPI); in visitGetElementPtrInst() 1548 handleAlias(GEPI); in visitGetElementPtrInst()
|
| /freebsd-14.2/contrib/llvm-project/llvm/lib/Transforms/Vectorize/ |
| H A D | SLPVectorizer.cpp | 16268 auto *GEPI = GEPList[I]; in vectorizeGEPIndices() local 16269 if (!Candidates.count(GEPI)) in vectorizeGEPIndices() 16276 Candidates.remove(GEPI); in vectorizeGEPIndices() 16278 } else if (GEPI->idx_begin()->get() == GEPJ->idx_begin()->get()) { in vectorizeGEPIndices()
|
| /freebsd-14.2/contrib/llvm-project/llvm/include/llvm/IR/ |
| H A D | Instructions.h | 952 GetElementPtrInst(const GetElementPtrInst &GEPI);
|