| /openbsd-src/gnu/llvm/llvm/lib/Transforms/Utils/ |
| H A D | SanitizerStats.cpp | 45 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 D | RelLookupTableConverter.cpp | 113 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()
|
| /openbsd-src/gnu/llvm/llvm/lib/Transforms/Scalar/ |
| H A D | SeparateConstOffsetFromGEP.cpp | 797 Type *IntPtrTy = DL->getIntPtrType(GEP->getType()); in canonicalizeArrayIndicesToPointerSize() local 803 if ((*I)->getType() != IntPtrTy) { in canonicalizeArrayIndicesToPointerSize() 804 *I = CastInst::CreateIntegerCast(*I, IntPtrTy, true, "idxprom", GEP); in canonicalizeArrayIndicesToPointerSize() 852 Type *IntPtrTy = DL->getIntPtrType(Variadic->getType()); in lowerToSingleIndexGEPs() local 878 APInt ElementSize = APInt(IntPtrTy->getIntegerBitWidth(), in lowerToSingleIndexGEPs() 884 Idx, ConstantInt::get(IntPtrTy, ElementSize.logBase2())); in lowerToSingleIndexGEPs() 886 Idx = Builder.CreateMul(Idx, ConstantInt::get(IntPtrTy, ElementSize)); in lowerToSingleIndexGEPs() 899 Value *Offset = ConstantInt::get(IntPtrTy, AccumulativeByteOffset); in lowerToSingleIndexGEPs() 924 Type *IntPtrTy = DL->getIntPtrType(Variadic->getType()); in lowerToArithmetics() local 926 Value *ResultPtr = Builder.CreatePtrToInt(Variadic->getOperand(0), IntPtrTy); in lowerToArithmetics() [all …]
|
| H A D | NaryReassociate.cpp | 452 Type *IntPtrTy = DL->getIntPtrType(GEP->getType()); in tryReassociateGEPAtIndex() local 453 if (RHS->getType() != IntPtrTy) in tryReassociateGEPAtIndex() 454 RHS = Builder.CreateSExtOrTrunc(RHS, IntPtrTy); in tryReassociateGEPAtIndex() 457 RHS, ConstantInt::get(IntPtrTy, IndexedSize / ElementSize)); in tryReassociateGEPAtIndex()
|
| H A D | StraightLineStrengthReduce.cpp | 487 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 D | LowerMatrixIntrinsics.cpp | 1442 Type *IntPtrTy = Builder.getIntPtrTy(Load->getModule()->getDataLayout()); in getNonAliasingPointer() local 1444 const_cast<Value *>(StoreLoc.Ptr), IntPtrTy, "store.begin"); in getNonAliasingPointer() 1446 StoreBegin, ConstantInt::get(IntPtrTy, StoreLoc.Size.getValue()), in getNonAliasingPointer() 1449 IntPtrTy, "load.begin"); in getNonAliasingPointer() 1459 LoadBegin, ConstantInt::get(IntPtrTy, LoadLoc.Size.getValue()), in getNonAliasingPointer()
|
| /openbsd-src/gnu/llvm/llvm/lib/Target/RISCV/ |
| H A D | RISCVGatherScatterLowering.cpp | 398 Type *IntPtrTy = DL->getIntPtrType(BasePtr->getType()); in determineBaseAndStride() local 399 assert(Stride->getType() == IntPtrTy && "Unexpected type"); in determineBaseAndStride() 403 Stride = Builder.CreateMul(Stride, ConstantInt::get(IntPtrTy, TypeScale)); in determineBaseAndStride() 438 Type *IntPtrTy = DL->getIntPtrType(BasePtr->getType()); in determineBaseAndStride() local 439 assert(Stride->getType() == IntPtrTy && "Unexpected type"); in determineBaseAndStride() 443 Stride = Builder.CreateMul(Stride, ConstantInt::get(IntPtrTy, TypeScale)); in determineBaseAndStride()
|
| /openbsd-src/gnu/llvm/llvm/lib/CodeGen/ |
| H A D | SafeStack.cpp | 119 Type *IntPtrTy; member in __anon7b58c0a00111::SafeStack 196 IntPtrTy(DL.getIntPtrType(F.getContext())), in SafeStack() 555 IRB.CreatePtrToInt(BasePointer, IntPtrTy), in moveStaticAllocasToUnsafeStack() 556 ConstantInt::get(IntPtrTy, ~(FrameAlignment.value() - 1))), in moveStaticAllocasToUnsafeStack() 665 if (ArraySize->getType() != IntPtrTy) in moveDynamicAllocasToUnsafeStack() 666 ArraySize = IRB.CreateIntCast(ArraySize, IntPtrTy, false); in moveDynamicAllocasToUnsafeStack() 670 Value *Size = IRB.CreateMul(ArraySize, ConstantInt::get(IntPtrTy, TySize)); in moveDynamicAllocasToUnsafeStack() 673 IntPtrTy); in moveDynamicAllocasToUnsafeStack() 682 ConstantInt::get(IntPtrTy, ~uint64_t(Align.value() - 1))), in moveDynamicAllocasToUnsafeStack()
|
| H A D | CodeGenPrepare.cpp | 2622 Value *GetFieldAsValue(FieldName Field, Type *IntPtrTy) { in GetFieldAsValue() 2633 return ConstantInt::get(IntPtrTy, BaseOffs); in GetFieldAsValue() 3681 Type *IntPtrTy = SQ.DL.getIntPtrType(AddrModes[0].OriginalValue->getType()); in initializeMap() local 3683 Value *DV = AM.GetFieldAsValue(DifferentField, IntPtrTy); in initializeMap() 5328 Type *IntPtrTy = DL->getIntPtrType(Addr->getType()); in optimizeMemoryInst() local 5341 SunkAddr = Builder.CreatePtrToInt(SunkAddr, IntPtrTy, "sunkaddr"); in optimizeMemoryInst() 5380 if (cast<IntegerType>(IntPtrTy)->getBitWidth() > in optimizeMemoryInst() 5424 if (V->getType() != IntPtrTy) in optimizeMemoryInst() 5425 V = Builder.CreateIntCast(V, IntPtrTy, /*isSigned=*/true, "sunkaddr"); in optimizeMemoryInst() 5433 if (V->getType() == IntPtrTy) { in optimizeMemoryInst() [all …]
|
| /openbsd-src/gnu/llvm/llvm/examples/BrainF/ |
| H A D | BrainF.cpp | 93 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()
|
| /openbsd-src/gnu/llvm/clang/lib/CodeGen/ |
| H A D | ConstantInitBuilder.cpp | 141 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 D | CodeGenTypeCache.h | 49 llvm::IntegerType *IntPtrTy; member
|
| H A D | CGExpr.cpp | 738 llvm::Value *Size = llvm::ConstantInt::get(IntPtrTy, TySize); in EmitTypeCheck() 749 llvm::Type *Tys[2] = { IntPtrTy, Int8PtrTy }; in EmitTypeCheck() 775 PtrAsInt = Builder.CreatePtrToInt(Ptr, IntPtrTy); in EmitTypeCheck() 777 PtrAsInt, llvm::ConstantInt::get(IntPtrTy, AlignVal->value() - 1)); in EmitTypeCheck() 779 Builder.CreateICmpEQ(Align, llvm::ConstantInt::get(IntPtrTy, 0)); in EmitTypeCheck() 833 llvm::Type *VPtrTy = llvm::PointerType::get(IntPtrTy, 0); in EmitTypeCheck() 834 Address VPtrAddr(Builder.CreateBitCast(Ptr, VPtrTy), IntPtrTy, in EmitTypeCheck() 840 Hash = Builder.CreateTrunc(Hash, IntPtrTy); in EmitTypeCheck() 844 llvm::Type *HashTable = llvm::ArrayType::get(IntPtrTy, CacheSize); in EmitTypeCheck() 848 llvm::ConstantInt::get(IntPtrTy, in EmitTypeCheck() [all …]
|
| H A D | CodeGenFunction.cpp | 574 auto *PCRelAsInt = Builder.CreateSExt(EncodedAddr, IntPtrTy); in DecodeAddrUsedInPrologue() 575 auto *FuncAsInt = Builder.CreatePtrToInt(F, IntPtrTy, "func_addr.int"); in DecodeAddrUsedInPrologue() 1935 = llvm::ConstantInt::get(CGF.IntPtrTy, baseSize.getQuantity()); in emitNonZeroVLAInit() 2415 if (Alignment->getType() != IntPtrTy) in emitAlignmentAssumption() 2417 Builder.CreateIntCast(Alignment, IntPtrTy, false, "casted.align"); in emitAlignmentAssumption() 2418 if (OffsetValue && OffsetValue->getType() != IntPtrTy) in emitAlignmentAssumption() 2420 Builder.CreateIntCast(OffsetValue, IntPtrTy, true, "casted.offset"); in emitAlignmentAssumption() 2424 Builder.CreatePtrToInt(PtrValue, IntPtrTy, "ptrint"); in emitAlignmentAssumption() 2435 llvm::Value *Zero = llvm::ConstantInt::get(IntPtrTy, 0); in emitAlignmentAssumption() 2437 Builder.CreateSub(Alignment, llvm::ConstantInt::get(IntPtrTy, 1)); in emitAlignmentAssumption()
|
| /openbsd-src/gnu/llvm/llvm/lib/Transforms/IPO/ |
| H A D | LowerTypeTests.cpp | 416 IntegerType *IntPtrTy = M.getDataLayout().getIntPtrType(M.getContext(), 0); member in __anon47d01f1a0111::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() 746 B.CreateLShr(PtrOffset, ConstantExpr::getZExt(TIL.AlignLog2, IntPtrTy)); in lowerTypeTestCall() 752 IntPtrTy)); in lowerTypeTestCall() 975 auto *MinC = ConstantAsMetadata::get(ConstantInt::get(IntPtrTy, Min)); in importTypeId() 976 auto *MaxC = ConstantAsMetadata::get(ConstantInt::get(IntPtrTy, Max)); in importTypeId() 980 if (AbsWidth == IntPtrTy->getBitWidth()) in importTypeId() [all …]
|
| H A D | WholeProgramDevirt.cpp | 554 IntegerType *IntPtrTy; member 592 IntPtrTy(M.getDataLayout().getIntPtrType(M.getContext(), 0)), in DevirtModule() 1576 auto *MinC = ConstantAsMetadata::get(ConstantInt::get(IntPtrTy, Min)); in importConstant() 1577 auto *MaxC = ConstantAsMetadata::get(ConstantInt::get(IntPtrTy, Max)); in importConstant() 1582 if (AbsWidth == IntPtrTy->getBitWidth()) in importConstant()
|
| /openbsd-src/gnu/llvm/llvm/lib/IR/ |
| H A D | Instructions.cpp | 771 BasicBlock *InsertAtEnd, Type *IntPtrTy, in createMalloc() argument 784 ArraySize = ConstantInt::get(IntPtrTy, 1); in createMalloc() 785 else if (ArraySize->getType() != IntPtrTy) { in createMalloc() 787 ArraySize = CastInst::CreateIntegerCast(ArraySize, IntPtrTy, false, in createMalloc() 790 ArraySize = CastInst::CreateIntegerCast(ArraySize, IntPtrTy, false, in createMalloc() 798 Constant *Scale = ConstantExpr::getIntegerCast(CO, IntPtrTy, in createMalloc() 813 assert(AllocSize->getType() == IntPtrTy && "malloc arg is wrong size"); in createMalloc() 821 MallocFunc = M->getOrInsertFunction("malloc", BPTy, IntPtrTy); in createMalloc() 859 Type *IntPtrTy, Type *AllocTy, in CreateMalloc() argument 863 return createMalloc(InsertBefore, nullptr, IntPtrTy, AllocTy, AllocSize, in CreateMalloc() [all …]
|
| /openbsd-src/gnu/llvm/llvm/lib/Target/Hexagon/ |
| H A D | HexagonLoopIdiomRecognition.cpp | 2048 Type *IntPtrTy = Builder.getIntPtrTy(*DL, SI->getPointerAddressSpace()); in processCopyingStore() local 2158 BECount = SE->getTruncateOrZeroExtend(BECount, IntPtrTy); in processCopyingStore() 2162 SE->getAddExpr(BECount, SE->getOne(IntPtrTy), SCEV::FlagNUW); in processCopyingStore() 2164 NumBytesS = SE->getMulExpr(NumBytesS, SE->getConstant(IntPtrTy, StoreSize), in processCopyingStore() 2166 Value *NumBytes = Expander.expandCodeFor(NumBytesS, IntPtrTy, ExpPt); in processCopyingStore() 2212 Value *LA = Builder.CreatePtrToInt(LoadBasePtr, IntPtrTy); in processCopyingStore() 2213 Value *SA = Builder.CreatePtrToInt(StoreBasePtr, IntPtrTy); in processCopyingStore()
|
| /openbsd-src/gnu/llvm/llvm/lib/CodeGen/GlobalISel/ |
| H A D | CallLowering.cpp | 376 LLT IntPtrTy = LLT::scalar(OrigTy.getSizeInBits()); in buildCopyFromRegs() local 377 B.buildIntToPtr(OrigRegs[0], B.buildTrunc(IntPtrTy, SrcReg)); in buildCopyFromRegs() 1154 LLT IntPtrTy = LLT::scalar(ValRegTy.getSizeInBits()); in extendRegister() local 1155 ValReg = MIRBuilder.buildPtrToInt(IntPtrTy, ValReg).getReg(0); in extendRegister()
|
| H A D | IRTranslator.cpp | 2732 LLT IntPtrTy = getLLTForType(*IntPtrIRTy, *DL); in translateAlloca() local 2733 if (MRI->getType(NumElts) != IntPtrTy) { in translateAlloca() 2734 Register ExtElts = MRI->createGenericVirtualRegister(IntPtrTy); in translateAlloca() 2741 Register AllocSize = MRI->createGenericVirtualRegister(IntPtrTy); in translateAlloca() 2750 auto SAMinusOne = MIRBuilder.buildConstant(IntPtrTy, StackAlign.value() - 1); in translateAlloca() 2751 auto AllocAdd = MIRBuilder.buildAdd(IntPtrTy, AllocSize, SAMinusOne, in translateAlloca() 2754 MIRBuilder.buildConstant(IntPtrTy, ~(uint64_t)(StackAlign.value() - 1)); in translateAlloca() 2755 auto AlignedAlloc = MIRBuilder.buildAnd(IntPtrTy, AllocAdd, AlignCst); in translateAlloca()
|
| /openbsd-src/gnu/llvm/llvm/lib/Analysis/ |
| H A D | ConstantFolding.cpp | 1236 Type *IntPtrTy = DL.getIntPtrType(CE0->getType()); in ConstantFoldCompareInstOperands() local 1240 IntPtrTy, false); in ConstantFoldCompareInstOperands() 1248 Type *IntPtrTy = DL.getIntPtrType(CE0->getOperand(0)->getType()); in ConstantFoldCompareInstOperands() local 1249 if (CE0->getType() == IntPtrTy) { in ConstantFoldCompareInstOperands() 1260 Type *IntPtrTy = DL.getIntPtrType(CE0->getType()); in ConstantFoldCompareInstOperands() local 1265 IntPtrTy, false); in ConstantFoldCompareInstOperands() 1267 IntPtrTy, false); in ConstantFoldCompareInstOperands() 1274 Type *IntPtrTy = DL.getIntPtrType(CE0->getOperand(0)->getType()); in ConstantFoldCompareInstOperands() local 1275 if (CE0->getType() == IntPtrTy && in ConstantFoldCompareInstOperands()
|
| /openbsd-src/gnu/llvm/llvm/lib/Transforms/Instrumentation/ |
| H A D | InstrProfiling.cpp | 1008 auto *IntPtrTy = M->getDataLayout().getIntPtrType(M->getContext()); in getOrCreateRegionCounters() local 1047 ConstantExpr::getSub(ConstantExpr::getPtrToInt(CounterPtr, IntPtrTy), in getOrCreateRegionCounters() 1048 ConstantExpr::getPtrToInt(Data, IntPtrTy)); in getOrCreateRegionCounters()
|
| /openbsd-src/gnu/llvm/llvm/lib/Transforms/InstCombine/ |
| H A D | InstCombineLoadStoreAlloca.cpp | 240 Type *IntPtrTy = IC.getDataLayout().getIntPtrType(AI.getType()); in simplifyAllocaArraySize() local 241 if (AI.getArraySize()->getType() != IntPtrTy) { in simplifyAllocaArraySize() 242 Value *V = IC.Builder.CreateIntCast(AI.getArraySize(), IntPtrTy, false); in simplifyAllocaArraySize()
|
| /openbsd-src/gnu/llvm/llvm/lib/Target/WebAssembly/ |
| H A D | WebAssemblyLowerEmscriptenEHSjLj.cpp | 1291 Type *IntPtrTy = getAddrIntType(&M); in runSjLjOnFunction() local 1292 Constant *size = ConstantInt::get(IntPtrTy, 40); in runSjLjOnFunction() 1294 CallInst::CreateMalloc(SetjmpTableSize, IntPtrTy, IRB.getInt32Ty(), size, in runSjLjOnFunction()
|
| /openbsd-src/gnu/llvm/llvm/lib/Target/XCore/ |
| H A D | XCoreISelLowering.cpp | 462 Type *IntPtrTy = DAG.getDataLayout().getIntPtrType(Context); in LowerLOAD() local 466 Entry.Ty = IntPtrTy; in LowerLOAD() 472 CallingConv::C, IntPtrTy, in LowerLOAD() 513 Type *IntPtrTy = DAG.getDataLayout().getIntPtrType(Context); in LowerSTORE() local 517 Entry.Ty = IntPtrTy; in LowerSTORE()
|