Home
last modified time | relevance | path

Searched refs:IntPtrTy (Results 1 – 25 of 59) sorted by relevance

123

/llvm-project-15.0.7/llvm/lib/Transforms/Utils/
H A DSanitizerStats.cpp45 IntegerType *IntPtrTy = B.getIntPtrTy(M->getDataLayout()); in create() local
52 ConstantInt::get(IntPtrTy, uint64_t(SK) << (IntPtrTy->getBitWidth() - in create()
64 ConstantInt::get(IntPtrTy, 0), ConstantInt::get(B.getInt32Ty(), 2), in create()
65 ConstantInt::get(IntPtrTy, Inits.size() - 1), in create()
H A DRelLookupTableConverter.cpp113 Type *IntPtrTy = M.getDataLayout().getIntPtrType(M.getContext()); in createRelLookupTable() local
114 Constant *Base = llvm::ConstantExpr::getPtrToInt(RelLookupTable, IntPtrTy); in createRelLookupTable()
115 Constant *Target = llvm::ConstantExpr::getPtrToInt(Element, IntPtrTy); in createRelLookupTable()
/llvm-project-15.0.7/clang-tools-extra/clangd/unittests/
H A DExpectedTypeTest.cpp146 OpaqueType IntPtrTy = *OpaqueType::fromType(astCtx(), typeOf("int_ptr")); in TEST_F() local
147 EXPECT_EQ(fromCompletionResult(decl("returns_ptr")), IntPtrTy); in TEST_F()
165 auto IntPtrTy = *OpaqueType::fromType(astCtx(), typeOf("int_ptr_")); in TEST_F() local
166 EXPECT_EQ(fromCompletionResult(decl("returns_not_dependent")), IntPtrTy); in TEST_F()
169 EXPECT_EQ(fromCompletionResult(decl("var_not_dependent")), IntPtrTy); in TEST_F()
/llvm-project-15.0.7/llvm/lib/Transforms/Scalar/
H A DSeparateConstOffsetFromGEP.cpp797 Type *IntPtrTy = DL->getIntPtrType(GEP->getType()); in canonicalizeArrayIndicesToPointerSize() local
803 if ((*I)->getType() != IntPtrTy) { in canonicalizeArrayIndicesToPointerSize()
848 Type *IntPtrTy = DL->getIntPtrType(Variadic->getType()); in lowerToSingleIndexGEPs() local
874 APInt ElementSize = APInt(IntPtrTy->getIntegerBitWidth(), in lowerToSingleIndexGEPs()
880 Idx, ConstantInt::get(IntPtrTy, ElementSize.logBase2())); in lowerToSingleIndexGEPs()
895 Value *Offset = ConstantInt::get(IntPtrTy, AccumulativeByteOffset); in lowerToSingleIndexGEPs()
920 Type *IntPtrTy = DL->getIntPtrType(Variadic->getType()); in lowerToArithmetics() local
935 APInt ElementSize = APInt(IntPtrTy->getIntegerBitWidth(), in lowerToArithmetics()
941 Idx, ConstantInt::get(IntPtrTy, ElementSize.logBase2())); in lowerToArithmetics()
954 ResultPtr, ConstantInt::get(IntPtrTy, AccumulativeByteOffset)); in lowerToArithmetics()
[all …]
H A DNaryReassociate.cpp451 Type *IntPtrTy = DL->getIntPtrType(GEP->getType()); in tryReassociateGEPAtIndex() local
452 if (RHS->getType() != IntPtrTy) in tryReassociateGEPAtIndex()
453 RHS = Builder.CreateSExtOrTrunc(RHS, IntPtrTy); in tryReassociateGEPAtIndex()
456 RHS, ConstantInt::get(IntPtrTy, IndexedSize / ElementSize)); in tryReassociateGEPAtIndex()
H A DStraightLineStrengthReduce.cpp487 IntegerType *IntPtrTy = cast<IntegerType>(DL->getIntPtrType(I->getType())); in allocateCandidatesAndFindBasisForGEP() local
489 IntPtrTy, Idx->getSExtValue() * (int64_t)ElementSize, true); in allocateCandidatesAndFindBasisForGEP()
678 Type *IntPtrTy = DL->getIntPtrType(C.Ins->getType()); in rewriteCandidateWithBasis() local
691 Bump = Builder.CreateSExtOrTrunc(Bump, IntPtrTy); in rewriteCandidateWithBasis()
H A DLowerMatrixIntrinsics.cpp1318 Type *IntPtrTy = Builder.getIntPtrTy(Load->getModule()->getDataLayout()); in getNonAliasingPointer() local
1320 const_cast<Value *>(StoreLoc.Ptr), IntPtrTy, "store.begin"); in getNonAliasingPointer()
1322 StoreBegin, ConstantInt::get(IntPtrTy, StoreLoc.Size.getValue()), in getNonAliasingPointer()
1325 IntPtrTy, "load.begin"); in getNonAliasingPointer()
1335 LoadBegin, ConstantInt::get(IntPtrTy, LoadLoc.Size.getValue()), in getNonAliasingPointer()
/llvm-project-15.0.7/llvm/lib/CodeGen/
H A DSafeStack.cpp118 Type *IntPtrTy; member in __anon8a0c7bd90111::SafeStack
195 IntPtrTy(DL.getIntPtrType(F.getContext())), in SafeStack()
554 IRB.CreatePtrToInt(BasePointer, IntPtrTy), in moveStaticAllocasToUnsafeStack()
555 ConstantInt::get(IntPtrTy, ~(FrameAlignment.value() - 1))), in moveStaticAllocasToUnsafeStack()
664 if (ArraySize->getType() != IntPtrTy) in moveDynamicAllocasToUnsafeStack()
665 ArraySize = IRB.CreateIntCast(ArraySize, IntPtrTy, false); in moveDynamicAllocasToUnsafeStack()
669 Value *Size = IRB.CreateMul(ArraySize, ConstantInt::get(IntPtrTy, TySize)); in moveDynamicAllocasToUnsafeStack()
672 IntPtrTy); in moveDynamicAllocasToUnsafeStack()
681 ConstantInt::get(IntPtrTy, ~uint64_t(Align.value() - 1))), in moveDynamicAllocasToUnsafeStack()
H A DCodeGenPrepare.cpp2517 Value *GetFieldAsValue(FieldName Field, Type *IntPtrTy) { in GetFieldAsValue()
2528 return ConstantInt::get(IntPtrTy, BaseOffs); in GetFieldAsValue()
5230 Type *IntPtrTy = DL->getIntPtrType(Addr->getType()); in optimizeMemoryInst() local
5282 if (cast<IntegerType>(IntPtrTy)->getBitWidth() > in optimizeMemoryInst()
5326 if (V->getType() != IntPtrTy) in optimizeMemoryInst()
5335 if (V->getType() == IntPtrTy) { in optimizeMemoryInst()
5409 Type *IntPtrTy = DL->getIntPtrType(Addr->getType()); in optimizeMemoryInst() local
5421 if (V->getType() != IntPtrTy) in optimizeMemoryInst()
5429 if (V->getType() == IntPtrTy) { in optimizeMemoryInst()
5435 V = Builder.CreateTrunc(V, IntPtrTy, "sunkaddr"); in optimizeMemoryInst()
[all …]
/llvm-project-15.0.7/llvm/examples/BrainF/
H A DBrainF.cpp93 Type* IntPtrTy = IntegerType::getInt32Ty(C); in header() local
96 allocsize = ConstantExpr::getTruncOrBitCast(allocsize, IntPtrTy); in header()
97 ptr_arr = CallInst::CreateMalloc(BB, IntPtrTy, Int8Ty, allocsize, val_mem, in header()
/llvm-project-15.0.7/clang/lib/CodeGen/
H A DConstantInitBuilder.cpp141 base = llvm::ConstantExpr::getPtrToInt(base, Builder.CGM.IntPtrTy); in getRelativeOffsetToPosition()
142 target = llvm::ConstantExpr::getPtrToInt(target, Builder.CGM.IntPtrTy); in getRelativeOffsetToPosition()
146 if (Builder.CGM.IntPtrTy != offsetType) { in getRelativeOffsetToPosition()
H A DCodeGenTypeCache.h49 llvm::IntegerType *IntPtrTy; member
H A DCGExpr.cpp748 llvm::Type *Tys[2] = { IntPtrTy, Int8PtrTy }; in EmitTypeCheck()
774 PtrAsInt = Builder.CreatePtrToInt(Ptr, IntPtrTy); in EmitTypeCheck()
839 Hash = Builder.CreateTrunc(Hash, IntPtrTy); in EmitTypeCheck()
2229 llvm::Type *ResultType = IntPtrTy; in EmitStoreThroughLValue()
3117 llvm::Type *TargetTy = IntPtrTy; in EmitCheckValue()
3368 ArgTypes.push_back(IntPtrTy); in EmitCheck()
3530 IntPtrTy); in EmitCfiCheckFail()
3818 if (Promote && Idx->getType() != IntPtrTy) in EmitArraySubscriptExpr()
4028 EmitScalarExpr(LowerBound), IntPtrTy, in EmitOMPArraySectionExpr()
4031 Idx = llvm::ConstantInt::getNullValue(IntPtrTy); in EmitOMPArraySectionExpr()
[all …]
H A DCodeGenFunction.cpp566 auto *PCRelAsInt = Builder.CreateSExt(EncodedAddr, IntPtrTy); in DecodeAddrUsedInPrologue()
567 auto *FuncAsInt = Builder.CreatePtrToInt(F, IntPtrTy, "func_addr.int"); in DecodeAddrUsedInPrologue()
1912 = llvm::ConstantInt::get(CGF.IntPtrTy, baseSize.getQuantity()); in emitNonZeroVLAInit()
2389 if (Alignment->getType() != IntPtrTy) in emitAlignmentAssumption()
2391 Builder.CreateIntCast(Alignment, IntPtrTy, false, "casted.align"); in emitAlignmentAssumption()
2392 if (OffsetValue && OffsetValue->getType() != IntPtrTy) in emitAlignmentAssumption()
2394 Builder.CreateIntCast(OffsetValue, IntPtrTy, true, "casted.offset"); in emitAlignmentAssumption()
2398 Builder.CreatePtrToInt(PtrValue, IntPtrTy, "ptrint"); in emitAlignmentAssumption()
2409 llvm::Value *Zero = llvm::ConstantInt::get(IntPtrTy, 0); in emitAlignmentAssumption()
2411 Builder.CreateSub(Alignment, llvm::ConstantInt::get(IntPtrTy, 1)); in emitAlignmentAssumption()
/llvm-project-15.0.7/llvm/lib/Transforms/IPO/
H A DLowerTypeTests.cpp416 IntegerType *IntPtrTy = M.getDataLayout().getIntPtrType(M.getContext(), 0); member in __anon131d77d30111::LowerTypeTestsModule
621 Constant *Idxs[] = {ConstantInt::get(IntPtrTy, 0), in allocateByteArrays()
622 ConstantInt::get(IntPtrTy, ByteArrayOffsets[I])}; in allocateByteArrays()
728 Value *PtrAsInt = B.CreatePtrToInt(Ptr, IntPtrTy); in lowerTypeTestCall()
731 ConstantExpr::getPtrToInt(TIL.OffsetedGlobal, IntPtrTy); in lowerTypeTestCall()
752 IntPtrTy)); in lowerTypeTestCall()
975 auto *MinC = ConstantAsMetadata::get(ConstantInt::get(IntPtrTy, Min)); in importTypeId()
980 if (AbsWidth == IntPtrTy->getBitWidth()) in importTypeId()
1117 TIL.SizeM1 = ConstantInt::get(IntPtrTy, BSI.BitSize - 1); in lowerTypeTestCalls()
1533 ArrayRef<Constant *>{ConstantInt::get(IntPtrTy, 0), in buildBitSetsFromFunctionsNative()
[all …]
H A DWholeProgramDevirt.cpp555 IntegerType *IntPtrTy; member
593 IntPtrTy(M.getDataLayout().getIntPtrType(M.getContext(), 0)), in DevirtModule()
1577 auto *MinC = ConstantAsMetadata::get(ConstantInt::get(IntPtrTy, Min)); in importConstant()
1578 auto *MaxC = ConstantAsMetadata::get(ConstantInt::get(IntPtrTy, Max)); in importConstant()
1583 if (AbsWidth == IntPtrTy->getBitWidth()) in importConstant()
/llvm-project-15.0.7/llvm/lib/Target/RISCV/
H A DRISCVGatherScatterLowering.cpp404 Type *IntPtrTy = DL->getIntPtrType(BasePtr->getType()); in determineBaseAndStride() local
405 assert(Stride->getType() == IntPtrTy && "Unexpected type"); in determineBaseAndStride()
409 Stride = Builder.CreateMul(Stride, ConstantInt::get(IntPtrTy, TypeScale)); in determineBaseAndStride()
/llvm-project-15.0.7/llvm/lib/IR/
H A DInstructions.cpp676 ArraySize = ConstantInt::get(IntPtrTy, 1); in createMalloc()
677 else if (ArraySize->getType() != IntPtrTy) { in createMalloc()
690 Constant *Scale = ConstantExpr::getIntegerCast(CO, IntPtrTy, in createMalloc()
713 MallocFunc = M->getOrInsertFunction("malloc", BPTy, IntPtrTy); in createMalloc()
751 Type *IntPtrTy, Type *AllocTy, in CreateMalloc() argument
759 Type *IntPtrTy, Type *AllocTy, in CreateMalloc() argument
777 Type *IntPtrTy, Type *AllocTy, in CreateMalloc() argument
784 Type *IntPtrTy, Type *AllocTy, in CreateMalloc() argument
805 Type *IntPtrTy = Type::getInt8PtrTy(M->getContext()); in createFree() local
811 if (Source->getType() != IntPtrTy) in createFree()
[all …]
/llvm-project-15.0.7/llvm/unittests/Analysis/
H A DScalarEvolutionTest.cpp355 IntegerType *IntPtrTy = M.getDataLayout().getIntPtrType(Context); in TEST_F() local
356 PointerType *IntPtrPtrTy = IntPtrTy->getPointerTo(); in TEST_F()
359 FunctionType::get(Type::getVoidTy(Context), {IntPtrTy, IntPtrTy}, false); in TEST_F()
368 X = new LoadInst(IntPtrTy, new IntToPtrInst(X, IntPtrPtrTy, "", EntryBB), in TEST_F()
371 Y = new LoadInst(IntPtrTy, new IntToPtrInst(Y, IntPtrPtrTy, "", EntryBB), in TEST_F()
/llvm-project-15.0.7/llvm/lib/Target/Hexagon/
H A DHexagonLoopIdiomRecognition.cpp2049 Type *IntPtrTy = Builder.getIntPtrTy(*DL, SI->getPointerAddressSpace()); in processCopyingStore() local
2159 BECount = SE->getTruncateOrZeroExtend(BECount, IntPtrTy); in processCopyingStore()
2163 SE->getAddExpr(BECount, SE->getOne(IntPtrTy), SCEV::FlagNUW); in processCopyingStore()
2165 NumBytesS = SE->getMulExpr(NumBytesS, SE->getConstant(IntPtrTy, StoreSize), in processCopyingStore()
2167 Value *NumBytes = Expander.expandCodeFor(NumBytesS, IntPtrTy, ExpPt); in processCopyingStore()
2213 Value *LA = Builder.CreatePtrToInt(LoadBasePtr, IntPtrTy); in processCopyingStore()
2214 Value *SA = Builder.CreatePtrToInt(StoreBasePtr, IntPtrTy); in processCopyingStore()
/llvm-project-15.0.7/llvm/lib/CodeGen/GlobalISel/
H A DCallLowering.cpp361 LLT IntPtrTy = LLT::scalar(OrigTy.getSizeInBits()); in buildCopyFromRegs() local
362 B.buildIntToPtr(OrigRegs[0], B.buildTrunc(IntPtrTy, SrcReg)); in buildCopyFromRegs()
1129 LLT IntPtrTy = LLT::scalar(ValRegTy.getSizeInBits()); in extendRegister() local
1130 ValReg = MIRBuilder.buildPtrToInt(IntPtrTy, ValReg).getReg(0); in extendRegister()
H A DIRTranslator.cpp2714 LLT IntPtrTy = getLLTForType(*IntPtrIRTy, *DL); in translateAlloca() local
2715 if (MRI->getType(NumElts) != IntPtrTy) { in translateAlloca()
2716 Register ExtElts = MRI->createGenericVirtualRegister(IntPtrTy); in translateAlloca()
2723 Register AllocSize = MRI->createGenericVirtualRegister(IntPtrTy); in translateAlloca()
2732 auto SAMinusOne = MIRBuilder.buildConstant(IntPtrTy, StackAlign.value() - 1); in translateAlloca()
2733 auto AllocAdd = MIRBuilder.buildAdd(IntPtrTy, AllocSize, SAMinusOne, in translateAlloca()
2736 MIRBuilder.buildConstant(IntPtrTy, ~(uint64_t)(StackAlign.value() - 1)); in translateAlloca()
2737 auto AlignedAlloc = MIRBuilder.buildAnd(IntPtrTy, AllocAdd, AlignCst); in translateAlloca()
/llvm-project-15.0.7/llvm/lib/Analysis/
H A DConstantFolding.cpp1237 Type *IntPtrTy = DL.getIntPtrType(CE0->getType()); in ConstantFoldCompareInstOperands() local
1241 IntPtrTy, false); in ConstantFoldCompareInstOperands()
1249 Type *IntPtrTy = DL.getIntPtrType(CE0->getOperand(0)->getType()); in ConstantFoldCompareInstOperands() local
1250 if (CE0->getType() == IntPtrTy) { in ConstantFoldCompareInstOperands()
1261 Type *IntPtrTy = DL.getIntPtrType(CE0->getType()); in ConstantFoldCompareInstOperands() local
1266 IntPtrTy, false); in ConstantFoldCompareInstOperands()
1268 IntPtrTy, false); in ConstantFoldCompareInstOperands()
1275 Type *IntPtrTy = DL.getIntPtrType(CE0->getOperand(0)->getType()); in ConstantFoldCompareInstOperands() local
1276 if (CE0->getType() == IntPtrTy && in ConstantFoldCompareInstOperands()
/llvm-project-15.0.7/llvm/lib/Transforms/Instrumentation/
H A DInstrProfiling.cpp996 auto *IntPtrTy = M->getDataLayout().getIntPtrType(M->getContext()); in getOrCreateRegionCounters() local
1035 ConstantExpr::getSub(ConstantExpr::getPtrToInt(CounterPtr, IntPtrTy), in getOrCreateRegionCounters()
1036 ConstantExpr::getPtrToInt(Data, IntPtrTy)); in getOrCreateRegionCounters()
/llvm-project-15.0.7/llvm/lib/Transforms/InstCombine/
H A DInstCombineLoadStoreAlloca.cpp215 Type *IntPtrTy = IC.getDataLayout().getIntPtrType(AI.getType()); in simplifyAllocaArraySize() local
216 if (AI.getArraySize()->getType() != IntPtrTy) { in simplifyAllocaArraySize()
217 Value *V = IC.Builder.CreateIntCast(AI.getArraySize(), IntPtrTy, false); in simplifyAllocaArraySize()

123