Home
last modified time | relevance | path

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

12

/NextBSD/contrib/llvm/include/llvm/Transforms/Utils/
HDLocal.h196 Type *IntPtrTy = DL.getIntPtrType(GEP->getType()); variable
197 Value *Result = Constant::getNullValue(IntPtrTy);
204 unsigned IntPtrWidth = IntPtrTy->getScalarType()->getIntegerBitWidth();
225 Result = Builder->CreateAdd(Result, ConstantInt::get(IntPtrTy, Size),
230 Constant *Scale = ConstantInt::get(IntPtrTy, Size);
231 Constant *OC = ConstantExpr::getIntegerCast(OpC, IntPtrTy, true /*SExt*/);
238 if (Op->getType() != IntPtrTy)
239 Op = Builder->CreateIntCast(Op, IntPtrTy, true, Op->getName()+".c");
242 Op = Builder->CreateMul(Op, ConstantInt::get(IntPtrTy, Size),
/NextBSD/contrib/llvm/lib/Transforms/Scalar/
HDSeparateConstOffsetFromGEP.cpp681 Type *IntPtrTy = DL->getIntPtrType(GEP->getType()); in canonicalizeArrayIndicesToPointerSize() local
687 if ((*I)->getType() != IntPtrTy) { in canonicalizeArrayIndicesToPointerSize()
688 *I = CastInst::CreateIntegerCast(*I, IntPtrTy, true, "idxprom", GEP); in canonicalizeArrayIndicesToPointerSize()
732 Type *IntPtrTy = DL->getIntPtrType(Variadic->getType()); in lowerToSingleIndexGEPs() local
751 APInt ElementSize = APInt(IntPtrTy->getIntegerBitWidth(), in lowerToSingleIndexGEPs()
757 Idx, ConstantInt::get(IntPtrTy, ElementSize.logBase2())); in lowerToSingleIndexGEPs()
759 Idx = Builder.CreateMul(Idx, ConstantInt::get(IntPtrTy, ElementSize)); in lowerToSingleIndexGEPs()
770 Value *Offset = ConstantInt::get(IntPtrTy, AccumulativeByteOffset); in lowerToSingleIndexGEPs()
785 Type *IntPtrTy = DL->getIntPtrType(Variadic->getType()); in lowerToArithmetics() local
787 Value *ResultPtr = Builder.CreatePtrToInt(Variadic->getOperand(0), IntPtrTy); in lowerToArithmetics()
[all …]
HDNaryReassociate.cpp465 Type *IntPtrTy = DL->getIntPtrType(TypeOfCandidate); in tryReassociateGEPAtIndex() local
466 if (RHS->getType() != IntPtrTy) in tryReassociateGEPAtIndex()
467 RHS = Builder.CreateSExtOrTrunc(RHS, IntPtrTy); in tryReassociateGEPAtIndex()
470 RHS, ConstantInt::get(IntPtrTy, IndexedSize / ElementSize)); in tryReassociateGEPAtIndex()
HDLoopIdiomRecognize.cpp1080 Type *IntPtrTy = Builder.getIntPtrTy(DL, SI->getPointerAddressSpace()); in processLoopStoreOfLoopLoad() local
1081 BECount = SE->getTruncateOrZeroExtend(BECount, IntPtrTy); in processLoopStoreOfLoopLoad()
1083 const SCEV *NumBytesS = SE->getAddExpr(BECount, SE->getConstant(IntPtrTy, 1), in processLoopStoreOfLoopLoad()
1086 NumBytesS = SE->getMulExpr(NumBytesS, SE->getConstant(IntPtrTy, StoreSize), in processLoopStoreOfLoopLoad()
1090 Expander.expandCodeFor(NumBytesS, IntPtrTy, Preheader->getTerminator()); in processLoopStoreOfLoopLoad()
HDStraightLineStrengthReduce.cpp469 IntegerType *IntPtrTy = cast<IntegerType>(DL->getIntPtrType(I->getType())); in allocateCandidatesAndFindBasisForGEP() local
471 IntPtrTy, Idx->getSExtValue() * (int64_t)ElementSize, true); in allocateCandidatesAndFindBasisForGEP()
651 Type *IntPtrTy = DL->getIntPtrType(C.Ins->getType()); in rewriteCandidateWithBasis() local
667 Bump = Builder.CreateSExtOrTrunc(Bump, IntPtrTy); in rewriteCandidateWithBasis()
/NextBSD/contrib/llvm/lib/Transforms/Instrumentation/
HDSafeStack.cpp164 Type *IntPtrTy; member in __anona73b9cd50111::SafeStack
231 IntPtrTy = DL->getIntPtrType(M.getContext()); in doInitialization()
393 IRB.CreateAnd(IRB.CreatePtrToInt(BasePointer, IntPtrTy), in moveStaticAllocasToUnsafeStack()
394 ConstantInt::get(IntPtrTy, ~uint64_t(MaxAlignment - 1))), in moveStaticAllocasToUnsafeStack()
456 if (ArraySize->getType() != IntPtrTy) in moveDynamicAllocasToUnsafeStack()
457 ArraySize = IRB.CreateIntCast(ArraySize, IntPtrTy, false); in moveDynamicAllocasToUnsafeStack()
461 Value *Size = IRB.CreateMul(ArraySize, ConstantInt::get(IntPtrTy, TySize)); in moveDynamicAllocasToUnsafeStack()
463 Value *SP = IRB.CreatePtrToInt(IRB.CreateLoad(UnsafeStackPtr), IntPtrTy); in moveDynamicAllocasToUnsafeStack()
473 IRB.CreateAnd(SP, ConstantInt::get(IntPtrTy, ~uint64_t(Align - 1))), in moveDynamicAllocasToUnsafeStack()
/NextBSD/contrib/llvm/lib/Transforms/IPO/
HDLowerBitSets.cpp201 Type *IntPtrTy; member
253 IntPtrTy = DL.getIntPtrType(M->getContext(), 0); in doInitialization()
352 Constant *Idxs[] = {ConstantInt::get(IntPtrTy, 0), in allocateByteArrays()
353 ConstantInt::get(IntPtrTy, ByteArrayOffsets[I])}; in allocateByteArrays()
432 Constant *GlobalAsInt = ConstantExpr::getPtrToInt(CombinedGlobal, IntPtrTy); in lowerBitSetCall()
434 GlobalAsInt, ConstantInt::get(IntPtrTy, BSI.ByteOffset)); in lowerBitSetCall()
440 Value *PtrAsInt = B.CreatePtrToInt(Ptr, IntPtrTy); in lowerBitSetCall()
460 B.CreateLShr(PtrOffset, ConstantInt::get(IntPtrTy, BSI.AlignLog2)); in lowerBitSetCall()
463 ConstantInt::get(IntPtrTy, DL.getPointerSizeInBits(0) - BSI.AlignLog2)); in lowerBitSetCall()
467 Constant *BitSizeConst = ConstantInt::get(IntPtrTy, BSI.BitSize); in lowerBitSetCall()
HDGlobalOpt.cpp1305 Type *IntPtrTy = DL.getIntPtrType(CI->getType()); in PerformHeapAllocSRoA() local
1306 Value *NMI = CallInst::CreateMalloc(CI, IntPtrTy, FieldTy, in PerformHeapAllocSRoA()
1307 ConstantInt::get(IntPtrTy, TypeSize), in PerformHeapAllocSRoA()
1531 Type *IntPtrTy = DL.getIntPtrType(CI->getType()); in TryToOptimizeStoreOfMallocToGlobal() local
1533 Value *AllocSize = ConstantInt::get(IntPtrTy, TypeSize); in TryToOptimizeStoreOfMallocToGlobal()
1534 Value *NumElements = ConstantInt::get(IntPtrTy, AT->getNumElements()); in TryToOptimizeStoreOfMallocToGlobal()
1535 Instruction *Malloc = CallInst::CreateMalloc(CI, IntPtrTy, AllocSTy, in TryToOptimizeStoreOfMallocToGlobal()
/NextBSD/contrib/llvm/lib/Target/AArch64/
HDAArch64SelectionDAGInfo.cpp36 Type *IntPtrTy = DAG.getDataLayout().getIntPtrType(*DAG.getContext()); in EmitTargetCodeForMemset() local
40 Entry.Ty = IntPtrTy; in EmitTargetCodeForMemset()
/NextBSD/contrib/llvm/lib/Analysis/
HDConstantFolding.cpp677 Type *IntPtrTy = DL.getIntPtrType(ResultTy); in CastGEPIndices() local
687 Ops[i]->getType() != IntPtrTy) { in CastGEPIndices()
691 IntPtrTy, in CastGEPIndices()
693 Ops[i], IntPtrTy)); in CastGEPIndices()
735 Type *IntPtrTy = DL.getIntPtrType(Ptr->getType()); in SymbolicallyEvaluateGEP() local
747 assert((!CE || CE->getType() == IntPtrTy) && in SymbolicallyEvaluateGEP()
762 unsigned BitWidth = DL.getTypeSizeInBits(IntPtrTy); in SymbolicallyEvaluateGEP()
830 NewIdxs.push_back(ConstantInt::get(IntPtrTy, 0)); in SymbolicallyEvaluateGEP()
836 NewIdxs.push_back(ConstantInt::get(IntPtrTy, NewIdx)); in SymbolicallyEvaluateGEP()
1118 Type *IntPtrTy = DL.getIntPtrType(CE0->getType()); in ConstantFoldCompareInstOperands() local
[all …]
/NextBSD/contrib/llvm/include/llvm/Analysis/
HDPtrUseVisitor.h208 IntegerType *IntPtrTy = cast<IntegerType>(DL.getIntPtrType(I.getType())); in visitPtr() local
210 Offset = APInt(IntPtrTy->getBitWidth(), 0); in visitPtr()
/NextBSD/contrib/llvm/lib/IR/
HDInstructions.cpp338 BasicBlock *InsertAtEnd, Type *IntPtrTy, in createMalloc() argument
350 ArraySize = ConstantInt::get(IntPtrTy, 1); in createMalloc()
351 else if (ArraySize->getType() != IntPtrTy) { in createMalloc()
353 ArraySize = CastInst::CreateIntegerCast(ArraySize, IntPtrTy, false, in createMalloc()
356 ArraySize = CastInst::CreateIntegerCast(ArraySize, IntPtrTy, false, in createMalloc()
364 Constant *Scale = ConstantExpr::getIntegerCast(CO, IntPtrTy, in createMalloc()
379 assert(AllocSize->getType() == IntPtrTy && "malloc arg is wrong size"); in createMalloc()
387 MallocFunc = M->getOrInsertFunction("malloc", BPTy, IntPtrTy, nullptr); in createMalloc()
423 Type *IntPtrTy, Type *AllocTy, in CreateMalloc() argument
427 return createMalloc(InsertBefore, nullptr, IntPtrTy, AllocTy, AllocSize, in CreateMalloc()
[all …]
/NextBSD/contrib/llvm/lib/CodeGen/
HDCodeGenPrepare.cpp3336 Type *IntPtrTy = DL->getIntPtrType(Addr->getType()); in OptimizeMemoryInst() local
3392 if (V->getType() != IntPtrTy) in OptimizeMemoryInst()
3393 V = Builder.CreateIntCast(V, IntPtrTy, /*isSigned=*/true, "sunkaddr"); in OptimizeMemoryInst()
3401 if (V->getType() == IntPtrTy) { in OptimizeMemoryInst()
3403 } else if (cast<IntegerType>(IntPtrTy)->getBitWidth() < in OptimizeMemoryInst()
3405 V = Builder.CreateTrunc(V, IntPtrTy, "sunkaddr"); in OptimizeMemoryInst()
3419 V = Builder.CreateMul(V, ConstantInt::get(IntPtrTy, AddrMode.Scale), in OptimizeMemoryInst()
3429 Value *V = ConstantInt::get(IntPtrTy, AddrMode.BaseOffs); in OptimizeMemoryInst()
3455 Type *IntPtrTy = DL->getIntPtrType(Addr->getType()); in OptimizeMemoryInst() local
3466 V = Builder.CreatePtrToInt(V, IntPtrTy, "sunkaddr"); in OptimizeMemoryInst()
[all …]
/NextBSD/contrib/llvm/lib/Target/X86/
HDX86SelectionDAGInfo.cpp81 Type *IntPtrTy = DAG.getDataLayout().getIntPtrType(*DAG.getContext()); in EmitTargetCodeForMemset() local
85 Entry.Ty = IntPtrTy; in EmitTargetCodeForMemset()
/NextBSD/contrib/llvm/tools/clang/lib/CodeGen/
HDCGExpr.cpp533 llvm::Type *Tys[2] = { IntPtrTy, Int8PtrTy }; in EmitTypeCheck()
539 llvm::ConstantInt::get(IntPtrTy, Size)); in EmitTypeCheck()
553 Builder.CreateAnd(Builder.CreatePtrToInt(Address, IntPtrTy), in EmitTypeCheck()
554 llvm::ConstantInt::get(IntPtrTy, AlignVal - 1)); in EmitTypeCheck()
556 Builder.CreateICmpEQ(Align, llvm::ConstantInt::get(IntPtrTy, 0)); in EmitTypeCheck()
602 llvm::Type *VPtrTy = llvm::PointerType::get(IntPtrTy, 0); in EmitTypeCheck()
608 Hash = Builder.CreateTrunc(Hash, IntPtrTy); in EmitTypeCheck()
612 llvm::Type *HashTable = llvm::ArrayType::get(IntPtrTy, CacheSize); in EmitTypeCheck()
616 llvm::ConstantInt::get(IntPtrTy, in EmitTypeCheck()
2179 llvm::Type *TargetTy = IntPtrTy; in EmitCheckValue()
[all …]
HDCGObjCGNU.cpp148 llvm::IntegerType *IntPtrTy; member in __anonb71487890111::CGObjCGNU
927 IntPtrTy = in CGObjCGNU()
1605 IntPtrTy, // strong_pointers in GenerateClassStructure()
1606 IntPtrTy, // weak_pointers in GenerateClassStructure()
1980 return llvm::ConstantInt::get(IntPtrTy, val); in MakeBitField()
1999 llvm::Constant *ptr = llvm::ConstantExpr::getPtrToInt(GS, IntPtrTy); in MakeBitField()
2316 llvm::Constant *ZeroPtr = llvm::ConstantInt::get(IntPtrTy, 0); in GenerateClass()
HDCGClass.cpp770 llvm::Type *Args[2] = {IntPtrTy, IntPtrTy}; in EmitAsanPrologueOrEpilogue()
778 ThisPtr = Builder.CreatePtrToInt(ThisPtr, IntPtrTy); in EmitAsanPrologueOrEpilogue()
HDCGCall.cpp879 Val = CGF.Builder.CreatePtrToInt(Val, CGF.IntPtrTy, "coerce.val.pi"); in CoerceIntOrPtrToIntOrPtr()
884 DestIntTy = CGF.IntPtrTy; in CoerceIntOrPtrToIntOrPtr()
970 llvm::ConstantInt::get(CGF.IntPtrTy, SrcSize), in CreateCoercedLoad()
1064 llvm::ConstantInt::get(CGF.IntPtrTy, DstSize), in CreateCoercedStore()
1864 llvm::ConstantInt::get(IntPtrTy, in EmitFunctionProlog()
/NextBSD/contrib/llvm/lib/Transforms/InstCombine/
HDInstCombineLoadStoreAlloca.cpp213 Type *IntPtrTy = IC.getDataLayout().getIntPtrType(AI.getType()); in simplifyAllocaArraySize() local
214 if (AI.getArraySize()->getType() != IntPtrTy) { in simplifyAllocaArraySize()
215 Value *V = IC.Builder->CreateIntCast(AI.getArraySize(), IntPtrTy, false); in simplifyAllocaArraySize()
HDInstructionCombining.cpp909 Type *IntPtrTy = DL.getIntPtrType(PtrTy); in FindElementAtOffset() local
924 NewIndices.push_back(ConstantInt::get(IntPtrTy, FirstIdx)); in FindElementAtOffset()
946 NewIndices.push_back(ConstantInt::get(IntPtrTy,Offset/EltSize)); in FindElementAtOffset()
1326 Type *IntPtrTy = DL.getIntPtrType(GEP.getPointerOperandType()); in visitGetElementPtrInst() local
1341 *I = Constant::getNullValue(IntPtrTy); in visitGetElementPtrInst()
1346 if (IndexTy != IntPtrTy) { in visitGetElementPtrInst()
1350 *I = Builder->CreateIntCast(*I, IntPtrTy, true); in visitGetElementPtrInst()
HDInstCombineCompares.cpp396 Type *IntPtrTy = DL.getIntPtrType(GEP->getType()); in FoldCmpLoadFromIndexedGlobal() local
397 unsigned PtrSize = IntPtrTy->getIntegerBitWidth(); in FoldCmpLoadFromIndexedGlobal()
399 Idx = Builder->CreateTrunc(Idx, IntPtrTy); in FoldCmpLoadFromIndexedGlobal()
570 Type *IntPtrTy = DL.getIntPtrType(GEP->getOperand(0)->getType()); in EvaluateGEPOffsetExpression() local
571 unsigned IntPtrWidth = IntPtrTy->getIntegerBitWidth(); in EvaluateGEPOffsetExpression()
577 VariableIdx = IC.Builder->CreateTrunc(VariableIdx, IntPtrTy); in EvaluateGEPOffsetExpression()
598 if (VariableIdx->getType() != IntPtrTy) in EvaluateGEPOffsetExpression()
599 VariableIdx = IC.Builder->CreateIntCast(VariableIdx, IntPtrTy, in EvaluateGEPOffsetExpression()
601 Constant *OffsetVal = ConstantInt::get(IntPtrTy, NewOffs); in EvaluateGEPOffsetExpression()
/NextBSD/contrib/llvm/include/llvm/IR/
HDInstrTypes.h618 Type *IntPtrTy ///< Integer type corresponding to Ptr types
623 Type *IntPtrTy ///< Integer type corresponding to pointer
HDIRBuilder.h1650 Type *IntPtrTy = getIntPtrTy(DL, PtrTy->getAddressSpace()); variable
1651 Value *PtrIntValue = CreatePtrToInt(PtrValue, IntPtrTy, "ptrint");
1653 Value *Mask = ConstantInt::get(IntPtrTy,
1661 if (OffsetValue->getType() != IntPtrTy)
1662 OffsetValue = CreateIntCast(OffsetValue, IntPtrTy, /*isSigned*/ true,
1668 Value *Zero = ConstantInt::get(IntPtrTy, 0);
/NextBSD/contrib/llvm/lib/Target/XCore/
HDXCoreISelLowering.cpp491 Type *IntPtrTy = TD.getIntPtrType(*DAG.getContext()); in LowerLOAD() local
495 Entry.Ty = IntPtrTy; in LowerLOAD()
501 CallingConv::C, IntPtrTy, in LowerLOAD()
551 Type *IntPtrTy = DAG.getDataLayout().getIntPtrType(*DAG.getContext()); in LowerSTORE() local
555 Entry.Ty = IntPtrTy; in LowerSTORE()
/NextBSD/contrib/llvm/lib/Analysis/IPA/
HDInlineCost.cpp1041 Type *IntPtrTy = DL.getIntPtrType(V->getContext()); in stripAndComputeInBoundsConstantOffsets() local
1042 return cast<ConstantInt>(ConstantInt::get(IntPtrTy, Offset)); in stripAndComputeInBoundsConstantOffsets()

12