Home
last modified time | relevance | path

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

12

/netbsd-src/external/apache2/llvm/dist/llvm/lib/Transforms/Utils/
H A DSanitizerStats.cpp46 IntegerType *IntPtrTy = B.getIntPtrTy(M->getDataLayout()); in create() local
53 ConstantInt::get(IntPtrTy, uint64_t(SK) << (IntPtrTy->getBitWidth() - in create()
65 ConstantInt::get(IntPtrTy, 0), ConstantInt::get(B.getInt32Ty(), 2), in create()
66 ConstantInt::get(IntPtrTy, Inits.size() - 1), in create()
H A DRelLookupTableConverter.cpp110 Type *IntPtrTy = M.getDataLayout().getIntPtrType(M.getContext()); in createRelLookupTable() local
111 Constant *Base = llvm::ConstantExpr::getPtrToInt(RelLookupTable, IntPtrTy); in createRelLookupTable()
112 Constant *Target = llvm::ConstantExpr::getPtrToInt(Element, IntPtrTy); in createRelLookupTable()
/netbsd-src/external/apache2/llvm/dist/llvm/lib/Transforms/Scalar/
H A DSeparateConstOffsetFromGEP.cpp798 Type *IntPtrTy = DL->getIntPtrType(GEP->getType()); in canonicalizeArrayIndicesToPointerSize() local
804 if ((*I)->getType() != IntPtrTy) { in canonicalizeArrayIndicesToPointerSize()
805 *I = CastInst::CreateIntegerCast(*I, IntPtrTy, true, "idxprom", GEP); in canonicalizeArrayIndicesToPointerSize()
849 Type *IntPtrTy = DL->getIntPtrType(Variadic->getType()); in lowerToSingleIndexGEPs() local
875 APInt ElementSize = APInt(IntPtrTy->getIntegerBitWidth(), in lowerToSingleIndexGEPs()
881 Idx, ConstantInt::get(IntPtrTy, ElementSize.logBase2())); in lowerToSingleIndexGEPs()
883 Idx = Builder.CreateMul(Idx, ConstantInt::get(IntPtrTy, ElementSize)); in lowerToSingleIndexGEPs()
896 Value *Offset = ConstantInt::get(IntPtrTy, AccumulativeByteOffset); in lowerToSingleIndexGEPs()
921 Type *IntPtrTy = DL->getIntPtrType(Variadic->getType()); in lowerToArithmetics() local
923 Value *ResultPtr = Builder.CreatePtrToInt(Variadic->getOperand(0), IntPtrTy); in lowerToArithmetics()
[all …]
H A DNaryReassociate.cpp447 Type *IntPtrTy = DL->getIntPtrType(GEP->getType()); in tryReassociateGEPAtIndex() local
448 if (RHS->getType() != IntPtrTy) in tryReassociateGEPAtIndex()
449 RHS = Builder.CreateSExtOrTrunc(RHS, IntPtrTy); in tryReassociateGEPAtIndex()
452 RHS, ConstantInt::get(IntPtrTy, IndexedSize / ElementSize)); in tryReassociateGEPAtIndex()
H A DStraightLineStrengthReduce.cpp488 IntegerType *IntPtrTy = cast<IntegerType>(DL->getIntPtrType(I->getType())); in allocateCandidatesAndFindBasisForGEP() local
490 IntPtrTy, Idx->getSExtValue() * (int64_t)ElementSize, true); in allocateCandidatesAndFindBasisForGEP()
679 Type *IntPtrTy = DL->getIntPtrType(C.Ins->getType()); in rewriteCandidateWithBasis() local
695 Bump = Builder.CreateSExtOrTrunc(Bump, IntPtrTy); in rewriteCandidateWithBasis()
H A DLowerMatrixIntrinsics.cpp1140 Type *IntPtrTy = Builder.getIntPtrTy(Load->getModule()->getDataLayout()); in getNonAliasingPointer() local
1142 const_cast<Value *>(StoreLoc.Ptr), IntPtrTy, "store.begin"); in getNonAliasingPointer()
1144 StoreBegin, ConstantInt::get(IntPtrTy, StoreLoc.Size.getValue()), in getNonAliasingPointer()
1147 IntPtrTy, "load.begin"); in getNonAliasingPointer()
1157 LoadBegin, ConstantInt::get(IntPtrTy, LoadLoc.Size.getValue()), in getNonAliasingPointer()
/netbsd-src/external/apache2/llvm/dist/llvm/lib/CodeGen/
H A DSafeStack.cpp138 Type *IntPtrTy; member in __anoneede60540111::SafeStack
215 IntPtrTy(DL.getIntPtrType(F.getContext())), in SafeStack()
561 IRB.CreateAnd(IRB.CreatePtrToInt(BasePointer, IntPtrTy), in moveStaticAllocasToUnsafeStack()
562 ConstantInt::get(IntPtrTy, ~uint64_t(FrameAlignment - 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()
682 IRB.CreateAnd(SP, ConstantInt::get(IntPtrTy, ~uint64_t(Align - 1))), in moveDynamicAllocasToUnsafeStack()
H A DCodeGenPrepare.cpp2494 Value *GetFieldAsValue(FieldName Field, Type *IntPtrTy) { in GetFieldAsValue()
2505 return ConstantInt::get(IntPtrTy, BaseOffs); in GetFieldAsValue()
3564 Type *IntPtrTy = SQ.DL.getIntPtrType(AddrModes[0].OriginalValue->getType()); in initializeMap() local
3566 Value *DV = AM.GetFieldAsValue(DifferentField, IntPtrTy); in initializeMap()
5234 Type *IntPtrTy = DL->getIntPtrType(Addr->getType()); in optimizeMemoryInst() local
5262 if (cast<IntegerType>(IntPtrTy)->getBitWidth() > in optimizeMemoryInst()
5306 if (V->getType() != IntPtrTy) in optimizeMemoryInst()
5307 V = Builder.CreateIntCast(V, IntPtrTy, /*isSigned=*/true, "sunkaddr"); in optimizeMemoryInst()
5315 if (V->getType() == IntPtrTy) { in optimizeMemoryInst()
5318 assert(cast<IntegerType>(IntPtrTy)->getBitWidth() < in optimizeMemoryInst()
[all …]
/netbsd-src/external/apache2/llvm/dist/llvm/lib/Transforms/IPO/
H A DLowerTypeTests.cpp399 IntegerType *IntPtrTy = M.getDataLayout().getIntPtrType(M.getContext(), 0); member in __anon008eecce0111::LowerTypeTestsModule
645 Constant *Idxs[] = {ConstantInt::get(IntPtrTy, 0), in allocateByteArrays()
646 ConstantInt::get(IntPtrTy, ByteArrayOffsets[I])}; in allocateByteArrays()
752 Value *PtrAsInt = B.CreatePtrToInt(Ptr, IntPtrTy); in lowerTypeTestCall()
755 ConstantExpr::getPtrToInt(TIL.OffsetedGlobal, IntPtrTy); in lowerTypeTestCall()
770 B.CreateLShr(PtrOffset, ConstantExpr::getZExt(TIL.AlignLog2, IntPtrTy)); in lowerTypeTestCall()
776 IntPtrTy)); in lowerTypeTestCall()
999 auto *MinC = ConstantAsMetadata::get(ConstantInt::get(IntPtrTy, Min)); in importTypeId()
1000 auto *MaxC = ConstantAsMetadata::get(ConstantInt::get(IntPtrTy, Max)); in importTypeId()
1004 if (AbsWidth == IntPtrTy->getBitWidth()) in importTypeId()
[all …]
H A DWholeProgramDevirt.cpp510 IntegerType *IntPtrTy; member
543 IntPtrTy(M.getDataLayout().getIntPtrType(M.getContext(), 0)), in DevirtModule()
1501 auto *MinC = ConstantAsMetadata::get(ConstantInt::get(IntPtrTy, Min)); in importConstant()
1502 auto *MaxC = ConstantAsMetadata::get(ConstantInt::get(IntPtrTy, Max)); in importConstant()
1507 if (AbsWidth == IntPtrTy->getBitWidth()) in importConstant()
/netbsd-src/external/apache2/llvm/dist/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()
/netbsd-src/external/apache2/llvm/dist/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 DCodeGenFunction.cpp569 auto *GOTAsInt = llvm::ConstantExpr::getPtrToInt(GV, IntPtrTy); in EncodeAddrForUseInPrologue()
570 auto *FuncAsInt = llvm::ConstantExpr::getPtrToInt(F, IntPtrTy); in EncodeAddrForUseInPrologue()
572 return (IntPtrTy == Int32Ty) in EncodeAddrForUseInPrologue()
581 auto *PCRelAsInt = Builder.CreateSExt(EncodedAddr, IntPtrTy); in DecodeAddrUsedInPrologue()
582 auto *FuncAsInt = Builder.CreatePtrToInt(F, IntPtrTy, "func_addr.int"); in DecodeAddrUsedInPrologue()
1838 = llvm::ConstantInt::get(CGF.IntPtrTy, baseSize.getQuantity()); in emitNonZeroVLAInit()
2308 if (Alignment->getType() != IntPtrTy) in emitAlignmentAssumption()
2310 Builder.CreateIntCast(Alignment, IntPtrTy, false, "casted.align"); in emitAlignmentAssumption()
2311 if (OffsetValue && OffsetValue->getType() != IntPtrTy) in emitAlignmentAssumption()
2313 Builder.CreateIntCast(OffsetValue, IntPtrTy, true, "casted.offset"); in emitAlignmentAssumption()
[all …]
H A DCGExpr.cpp738 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 - 1)); in EmitTypeCheck()
779 Builder.CreateICmpEQ(Align, llvm::ConstantInt::get(IntPtrTy, 0)); in EmitTypeCheck()
836 llvm::Type *VPtrTy = llvm::PointerType::get(IntPtrTy, 0); in EmitTypeCheck()
842 Hash = Builder.CreateTrunc(Hash, IntPtrTy); in EmitTypeCheck()
846 llvm::Type *HashTable = llvm::ArrayType::get(IntPtrTy, CacheSize); in EmitTypeCheck()
850 llvm::ConstantInt::get(IntPtrTy, in EmitTypeCheck()
854 IntPtrTy, Builder.CreateInBoundsGEP(HashTable, Cache, Indices), in EmitTypeCheck()
[all …]
H A DCodeGenTypeCache.h49 llvm::IntegerType *IntPtrTy; member
H A DCGExprScalar.cpp4935 auto *IntPtrTy = DL.getIntPtrType(GEP->getPointerOperandType()); in EmitGEPOffsetInBytes() local
4938 auto *Zero = llvm::ConstantInt::getNullValue(IntPtrTy); in EmitGEPOffsetInBytes()
4940 CGM.getIntrinsic(llvm::Intrinsic::sadd_with_overflow, IntPtrTy); in EmitGEPOffsetInBytes()
4942 CGM.getIntrinsic(llvm::Intrinsic::smul_with_overflow, IntPtrTy); in EmitGEPOffsetInBytes()
4983 IntPtrTy, DL.getStructLayout(STy)->getElementOffset(FieldNo)); in EmitGEPOffsetInBytes()
4988 IntPtrTy, DL.getTypeAllocSize(GTI.getIndexedType())); in EmitGEPOffsetInBytes()
4989 auto *IndexS = Builder.CreateIntCast(Index, IntPtrTy, /*isSigned=*/true); in EmitGEPOffsetInBytes()
5030 llvm::Type *IntPtrTy = DL.getIntPtrType(PtrTy); in EmitCheckedInBoundsGEP() local
5040 auto *Zero = llvm::ConstantInt::getNullValue(IntPtrTy); in EmitCheckedInBoundsGEP()
5049 auto *IntPtr = Builder.CreatePtrToInt(Ptr, IntPtrTy); in EmitCheckedInBoundsGEP()
/netbsd-src/external/apache2/llvm/dist/llvm/lib/Target/AArch64/
H A DAArch64SelectionDAGInfo.cpp35 Type *IntPtrTy = Type::getInt8PtrTy(*DAG.getContext()); in EmitTargetCodeForMemset() local
39 Entry.Ty = IntPtrTy; in EmitTargetCodeForMemset()
/netbsd-src/external/apache2/llvm/dist/llvm/lib/IR/
H A DInstructions.cpp625 BasicBlock *InsertAtEnd, Type *IntPtrTy, in createMalloc() argument
638 ArraySize = ConstantInt::get(IntPtrTy, 1); in createMalloc()
639 else if (ArraySize->getType() != IntPtrTy) { in createMalloc()
641 ArraySize = CastInst::CreateIntegerCast(ArraySize, IntPtrTy, false, in createMalloc()
644 ArraySize = CastInst::CreateIntegerCast(ArraySize, IntPtrTy, false, in createMalloc()
652 Constant *Scale = ConstantExpr::getIntegerCast(CO, IntPtrTy, in createMalloc()
667 assert(AllocSize->getType() == IntPtrTy && "malloc arg is wrong size"); in createMalloc()
675 MallocFunc = M->getOrInsertFunction("malloc", BPTy, IntPtrTy); in createMalloc()
713 Type *IntPtrTy, Type *AllocTy, in CreateMalloc() argument
717 return createMalloc(InsertBefore, nullptr, IntPtrTy, AllocTy, AllocSize, in CreateMalloc()
[all …]
/netbsd-src/external/apache2/llvm/dist/llvm/lib/Target/X86/
H A DX86SelectionDAGInfo.cpp79 Type *IntPtrTy = DAG.getDataLayout().getIntPtrType(*DAG.getContext()); in EmitTargetCodeForMemset() local
83 Entry.Ty = IntPtrTy; in EmitTargetCodeForMemset()
/netbsd-src/external/apache2/llvm/dist/llvm/lib/Analysis/
H A DConstantFolding.cpp1245 Type *IntPtrTy = DL.getIntPtrType(CE0->getType()); in ConstantFoldCompareInstOperands() local
1249 IntPtrTy, false); in ConstantFoldCompareInstOperands()
1257 Type *IntPtrTy = DL.getIntPtrType(CE0->getOperand(0)->getType()); in ConstantFoldCompareInstOperands() local
1258 if (CE0->getType() == IntPtrTy) { in ConstantFoldCompareInstOperands()
1269 Type *IntPtrTy = DL.getIntPtrType(CE0->getType()); in ConstantFoldCompareInstOperands() local
1274 IntPtrTy, false); in ConstantFoldCompareInstOperands()
1276 IntPtrTy, false); in ConstantFoldCompareInstOperands()
1283 Type *IntPtrTy = DL.getIntPtrType(CE0->getOperand(0)->getType()); in ConstantFoldCompareInstOperands() local
1284 if (CE0->getType() == IntPtrTy && in ConstantFoldCompareInstOperands()
/netbsd-src/external/apache2/llvm/dist/llvm/lib/Target/Hexagon/
H A DHexagonLoopIdiomRecognition.cpp2054 Type *IntPtrTy = Builder.getIntPtrTy(*DL, SI->getPointerAddressSpace()); in processCopyingStore() local
2164 BECount = SE->getTruncateOrZeroExtend(BECount, IntPtrTy); in processCopyingStore()
2168 SE->getAddExpr(BECount, SE->getOne(IntPtrTy), SCEV::FlagNUW); in processCopyingStore()
2170 NumBytesS = SE->getMulExpr(NumBytesS, SE->getConstant(IntPtrTy, StoreSize), in processCopyingStore()
2172 Value *NumBytes = Expander.expandCodeFor(NumBytesS, IntPtrTy, ExpPt); in processCopyingStore()
2218 Value *LA = Builder.CreatePtrToInt(LoadBasePtr, IntPtrTy); in processCopyingStore()
2219 Value *SA = Builder.CreatePtrToInt(StoreBasePtr, IntPtrTy); in processCopyingStore()
/netbsd-src/external/apache2/llvm/dist/llvm/lib/CodeGen/GlobalISel/
H A DIRTranslator.cpp2584 LLT IntPtrTy = getLLTForType(*IntPtrIRTy, *DL); in translateAlloca() local
2585 if (MRI->getType(NumElts) != IntPtrTy) { in translateAlloca()
2586 Register ExtElts = MRI->createGenericVirtualRegister(IntPtrTy); in translateAlloca()
2593 Register AllocSize = MRI->createGenericVirtualRegister(IntPtrTy); in translateAlloca()
2602 auto SAMinusOne = MIRBuilder.buildConstant(IntPtrTy, StackAlign.value() - 1); in translateAlloca()
2603 auto AllocAdd = MIRBuilder.buildAdd(IntPtrTy, AllocSize, SAMinusOne, in translateAlloca()
2606 MIRBuilder.buildConstant(IntPtrTy, ~(uint64_t)(StackAlign.value() - 1)); in translateAlloca()
2607 auto AlignedAlloc = MIRBuilder.buildAnd(IntPtrTy, AllocAdd, AlignCst); in translateAlloca()
/netbsd-src/external/apache2/llvm/dist/llvm/lib/Target/AArch64/GISel/
H A DAArch64LegalizerInfo.cpp978 LLT IntPtrTy = LLT::scalar(PtrTy.getSizeInBits()); in legalizeVaArg() local
991 MIRBuilder.buildConstant(IntPtrTy, Alignment.value() - 1); in legalizeVaArg()
1003 auto Size = MIRBuilder.buildConstant(IntPtrTy, alignTo(ValSize, PtrAlign)); in legalizeVaArg()
/netbsd-src/external/apache2/llvm/dist/llvm/lib/Transforms/InstCombine/
H A DInstCombineLoadStoreAlloca.cpp217 Type *IntPtrTy = IC.getDataLayout().getIntPtrType(AI.getType()); in simplifyAllocaArraySize() local
218 if (AI.getArraySize()->getType() != IntPtrTy) { in simplifyAllocaArraySize()
219 Value *V = IC.Builder.CreateIntCast(AI.getArraySize(), IntPtrTy, false); in simplifyAllocaArraySize()
/netbsd-src/external/apache2/llvm/dist/llvm/lib/Target/XCore/
H A DXCoreISelLowering.cpp465 Type *IntPtrTy = DAG.getDataLayout().getIntPtrType(Context); in LowerLOAD() local
469 Entry.Ty = IntPtrTy; in LowerLOAD()
475 CallingConv::C, IntPtrTy, in LowerLOAD()
516 Type *IntPtrTy = DAG.getDataLayout().getIntPtrType(Context); in LowerSTORE() local
520 Entry.Ty = IntPtrTy; in LowerSTORE()

12