Home
last modified time | relevance | path

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

12345

/external/llvm/include/llvm/Transforms/Utils/
DLocal.h191 Type *IntPtrTy = DL.getIntPtrType(GEP->getType()); variable
192 Value *Result = Constant::getNullValue(IntPtrTy);
199 unsigned IntPtrWidth = IntPtrTy->getScalarType()->getIntegerBitWidth();
220 Result = Builder->CreateAdd(Result, ConstantInt::get(IntPtrTy, Size),
225 Constant *Scale = ConstantInt::get(IntPtrTy, Size);
226 Constant *OC = ConstantExpr::getIntegerCast(OpC, IntPtrTy, true /*SExt*/);
233 if (Op->getType() != IntPtrTy)
234 Op = Builder->CreateIntCast(Op, IntPtrTy, true, Op->getName()+".c");
237 Op = Builder->CreateMul(Op, ConstantInt::get(IntPtrTy, Size),
/external/llvm-project/llvm/lib/Transforms/Utils/
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()
/external/llvm-project/clang-tools-extra/clangd/unittests/
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()
/external/llvm/lib/Transforms/Utils/
DSanitizerStats.cpp47 IntegerType *IntPtrTy = B.getIntPtrTy(M->getDataLayout()); in create() local
54 ConstantInt::get(IntPtrTy, uint64_t(SK) << (IntPtrTy->getBitWidth() - in create()
66 ConstantInt::get(IntPtrTy, 0), ConstantInt::get(B.getInt32Ty(), 2), in create()
67 ConstantInt::get(IntPtrTy, Inits.size() - 1), in create()
/external/swiftshader/third_party/llvm-10.0/llvm/lib/Transforms/Utils/
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()
/external/llvm/lib/Transforms/Scalar/
DSeparateConstOffsetFromGEP.cpp720 Type *IntPtrTy = DL->getIntPtrType(GEP->getType()); in canonicalizeArrayIndicesToPointerSize() local
726 if ((*I)->getType() != IntPtrTy) { in canonicalizeArrayIndicesToPointerSize()
727 *I = CastInst::CreateIntegerCast(*I, IntPtrTy, true, "idxprom", GEP); in canonicalizeArrayIndicesToPointerSize()
771 Type *IntPtrTy = DL->getIntPtrType(Variadic->getType()); in lowerToSingleIndexGEPs() local
797 APInt ElementSize = APInt(IntPtrTy->getIntegerBitWidth(), in lowerToSingleIndexGEPs()
803 Idx, ConstantInt::get(IntPtrTy, ElementSize.logBase2())); in lowerToSingleIndexGEPs()
805 Idx = Builder.CreateMul(Idx, ConstantInt::get(IntPtrTy, ElementSize)); in lowerToSingleIndexGEPs()
818 Value *Offset = ConstantInt::get(IntPtrTy, AccumulativeByteOffset); in lowerToSingleIndexGEPs()
843 Type *IntPtrTy = DL->getIntPtrType(Variadic->getType()); in lowerToArithmetics() local
845 Value *ResultPtr = Builder.CreatePtrToInt(Variadic->getOperand(0), IntPtrTy); in lowerToArithmetics()
[all …]
DNaryReassociate.cpp426 Type *IntPtrTy = DL->getIntPtrType(GEP->getType()); in tryReassociateGEPAtIndex() local
427 if (RHS->getType() != IntPtrTy) in tryReassociateGEPAtIndex()
428 RHS = Builder.CreateSExtOrTrunc(RHS, IntPtrTy); in tryReassociateGEPAtIndex()
431 RHS, ConstantInt::get(IntPtrTy, IndexedSize / ElementSize)); in tryReassociateGEPAtIndex()
/external/swiftshader/third_party/llvm-10.0/llvm/lib/Transforms/Scalar/
DSeparateConstOffsetFromGEP.cpp766 Type *IntPtrTy = DL->getIntPtrType(GEP->getType()); in canonicalizeArrayIndicesToPointerSize() local
772 if ((*I)->getType() != IntPtrTy) { in canonicalizeArrayIndicesToPointerSize()
773 *I = CastInst::CreateIntegerCast(*I, IntPtrTy, true, "idxprom", GEP); in canonicalizeArrayIndicesToPointerSize()
817 Type *IntPtrTy = DL->getIntPtrType(Variadic->getType()); in lowerToSingleIndexGEPs() local
843 APInt ElementSize = APInt(IntPtrTy->getIntegerBitWidth(), in lowerToSingleIndexGEPs()
849 Idx, ConstantInt::get(IntPtrTy, ElementSize.logBase2())); in lowerToSingleIndexGEPs()
851 Idx = Builder.CreateMul(Idx, ConstantInt::get(IntPtrTy, ElementSize)); in lowerToSingleIndexGEPs()
864 Value *Offset = ConstantInt::get(IntPtrTy, AccumulativeByteOffset); in lowerToSingleIndexGEPs()
889 Type *IntPtrTy = DL->getIntPtrType(Variadic->getType()); in lowerToArithmetics() local
891 Value *ResultPtr = Builder.CreatePtrToInt(Variadic->getOperand(0), IntPtrTy); in lowerToArithmetics()
[all …]
DNaryReassociate.cpp423 Type *IntPtrTy = DL->getIntPtrType(GEP->getType()); in tryReassociateGEPAtIndex() local
424 if (RHS->getType() != IntPtrTy) in tryReassociateGEPAtIndex()
425 RHS = Builder.CreateSExtOrTrunc(RHS, IntPtrTy); in tryReassociateGEPAtIndex()
428 RHS, ConstantInt::get(IntPtrTy, IndexedSize / ElementSize)); in tryReassociateGEPAtIndex()
/external/llvm-project/llvm/lib/Transforms/Scalar/
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 …]
DNaryReassociate.cpp419 Type *IntPtrTy = DL->getIntPtrType(GEP->getType()); in tryReassociateGEPAtIndex() local
420 if (RHS->getType() != IntPtrTy) in tryReassociateGEPAtIndex()
421 RHS = Builder.CreateSExtOrTrunc(RHS, IntPtrTy); in tryReassociateGEPAtIndex()
424 RHS, ConstantInt::get(IntPtrTy, IndexedSize / ElementSize)); in tryReassociateGEPAtIndex()
/external/llvm/lib/Transforms/IPO/
DLowerTypeTests.cpp223 IntegerType *IntPtrTy; member
354 Constant *Idxs[] = {ConstantInt::get(IntPtrTy, 0), in allocateByteArrays()
355 ConstantInt::get(IntPtrTy, ByteArrayOffsets[I])}; in allocateByteArrays()
434 CombinedGlobalIntAddr, 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()
562 ConstantExpr::getPtrToInt(CombinedGlobalAddr, IntPtrTy); in lowerTypeTestCalls()
638 Constant *DestInt = ConstantExpr::getPtrToInt(Dest, IntPtrTy); in createJumpTableEntry()
[all …]
/external/llvm/lib/CodeGen/
DSafeStack.cpp113 Type *IntPtrTy; member in __anon825189cb0111::SafeStack
203 IntPtrTy = DL->getIntPtrType(M.getContext()); in doInitialization()
571 IRB.CreateAnd(IRB.CreatePtrToInt(BasePointer, IntPtrTy), in moveStaticAllocasToUnsafeStack()
572 ConstantInt::get(IntPtrTy, ~uint64_t(FrameAlignment - 1))), in moveStaticAllocasToUnsafeStack()
681 if (ArraySize->getType() != IntPtrTy) in moveDynamicAllocasToUnsafeStack()
682 ArraySize = IRB.CreateIntCast(ArraySize, IntPtrTy, false); in moveDynamicAllocasToUnsafeStack()
686 Value *Size = IRB.CreateMul(ArraySize, ConstantInt::get(IntPtrTy, TySize)); in moveDynamicAllocasToUnsafeStack()
688 Value *SP = IRB.CreatePtrToInt(IRB.CreateLoad(UnsafeStackPtr), IntPtrTy); in moveDynamicAllocasToUnsafeStack()
698 IRB.CreateAnd(SP, ConstantInt::get(IntPtrTy, ~uint64_t(Align - 1))), in moveDynamicAllocasToUnsafeStack()
/external/llvm/lib/Target/AArch64/
DAArch64SelectionDAGInfo.cpp36 Type *IntPtrTy = DAG.getDataLayout().getIntPtrType(*DAG.getContext()); in EmitTargetCodeForMemset() local
40 Entry.Ty = IntPtrTy; in EmitTargetCodeForMemset()
/external/swiftshader/third_party/llvm-10.0/llvm/lib/CodeGen/
DSafeStack.cpp132 Type *IntPtrTy; member in __anonfd930b2d0111::SafeStack
211 IntPtrTy(DL.getIntPtrType(F.getContext())), in SafeStack()
545 IRB.CreateAnd(IRB.CreatePtrToInt(BasePointer, IntPtrTy), in moveStaticAllocasToUnsafeStack()
546 ConstantInt::get(IntPtrTy, ~uint64_t(FrameAlignment - 1))), in moveStaticAllocasToUnsafeStack()
649 if (ArraySize->getType() != IntPtrTy) in moveDynamicAllocasToUnsafeStack()
650 ArraySize = IRB.CreateIntCast(ArraySize, IntPtrTy, false); in moveDynamicAllocasToUnsafeStack()
654 Value *Size = IRB.CreateMul(ArraySize, ConstantInt::get(IntPtrTy, TySize)); in moveDynamicAllocasToUnsafeStack()
657 IntPtrTy); in moveDynamicAllocasToUnsafeStack()
667 IRB.CreateAnd(SP, ConstantInt::get(IntPtrTy, ~uint64_t(Align - 1))), in moveDynamicAllocasToUnsafeStack()
/external/llvm-project/llvm/lib/CodeGen/
DSafeStack.cpp136 Type *IntPtrTy; member in __anon4eff47990111::SafeStack
213 IntPtrTy(DL.getIntPtrType(F.getContext())), in SafeStack()
560 IRB.CreateAnd(IRB.CreatePtrToInt(BasePointer, IntPtrTy), in moveStaticAllocasToUnsafeStack()
561 ConstantInt::get(IntPtrTy, ~uint64_t(FrameAlignment - 1))), in moveStaticAllocasToUnsafeStack()
663 if (ArraySize->getType() != IntPtrTy) in moveDynamicAllocasToUnsafeStack()
664 ArraySize = IRB.CreateIntCast(ArraySize, IntPtrTy, false); in moveDynamicAllocasToUnsafeStack()
668 Value *Size = IRB.CreateMul(ArraySize, ConstantInt::get(IntPtrTy, TySize)); in moveDynamicAllocasToUnsafeStack()
671 IntPtrTy); in moveDynamicAllocasToUnsafeStack()
681 IRB.CreateAnd(SP, ConstantInt::get(IntPtrTy, ~uint64_t(Align - 1))), in moveDynamicAllocasToUnsafeStack()
/external/llvm/lib/Analysis/
DConstantFolding.cpp694 Type *IntPtrTy = DL.getIntPtrType(ResultTy); in CastGEPIndices() local
702 Ops[i]->getType() != IntPtrTy) { in CastGEPIndices()
706 IntPtrTy, in CastGEPIndices()
708 Ops[i], IntPtrTy)); in CastGEPIndices()
760 Type *IntPtrTy = DL.getIntPtrType(Ptr->getType()); in SymbolicallyEvaluateGEP() local
771 assert((!CE || CE->getType() == IntPtrTy) && in SymbolicallyEvaluateGEP()
786 unsigned BitWidth = DL.getTypeSizeInBits(IntPtrTy); in SymbolicallyEvaluateGEP()
862 NewIdxs.push_back(ConstantInt::get(IntPtrTy, 0)); in SymbolicallyEvaluateGEP()
871 NewIdxs.push_back(ConstantInt::get(IntPtrTy, NewIdx)); in SymbolicallyEvaluateGEP()
1105 Type *IntPtrTy = DL.getIntPtrType(CE0->getType()); in ConstantFoldCompareInstOperands() local
[all …]
/external/llvm/include/llvm/Analysis/
DPtrUseVisitor.h208 IntegerType *IntPtrTy = cast<IntegerType>(DL.getIntPtrType(I.getType())); in visitPtr() local
210 Offset = APInt(IntPtrTy->getBitWidth(), 0); in visitPtr()
/external/llvm-project/clang/lib/CodeGen/
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()
/external/llvm-project/llvm/examples/BrainF/
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()
/external/llvm/examples/BrainF/
DBrainF.cpp95 Type* IntPtrTy = IntegerType::getInt32Ty(C); in header() local
98 allocsize = ConstantExpr::getTruncOrBitCast(allocsize, IntPtrTy); in header()
99 ptr_arr = CallInst::CreateMalloc(BB, IntPtrTy, Int8Ty, allocsize, val_mem, in header()
/external/llvm-project/llvm/lib/Transforms/IPO/
DLowerTypeTests.cpp400 IntegerType *IntPtrTy = M.getDataLayout().getIntPtrType(M.getContext(), 0); member in __anonb6dfe3930111::LowerTypeTestsModule
646 Constant *Idxs[] = {ConstantInt::get(IntPtrTy, 0), in allocateByteArrays()
647 ConstantInt::get(IntPtrTy, ByteArrayOffsets[I])}; in allocateByteArrays()
753 Value *PtrAsInt = B.CreatePtrToInt(Ptr, IntPtrTy); in lowerTypeTestCall()
756 ConstantExpr::getPtrToInt(TIL.OffsetedGlobal, IntPtrTy); in lowerTypeTestCall()
771 B.CreateLShr(PtrOffset, ConstantExpr::getZExt(TIL.AlignLog2, IntPtrTy)); in lowerTypeTestCall()
777 IntPtrTy)); in lowerTypeTestCall()
1000 auto *MinC = ConstantAsMetadata::get(ConstantInt::get(IntPtrTy, Min)); in importTypeId()
1001 auto *MaxC = ConstantAsMetadata::get(ConstantInt::get(IntPtrTy, Max)); in importTypeId()
1005 if (AbsWidth == IntPtrTy->getBitWidth()) in importTypeId()
[all …]
/external/swiftshader/third_party/llvm-10.0/llvm/lib/Transforms/IPO/
DLowerTypeTests.cpp397 IntegerType *IntPtrTy = M.getDataLayout().getIntPtrType(M.getContext(), 0); member in __anon2121a5270111::LowerTypeTestsModule
639 Constant *Idxs[] = {ConstantInt::get(IntPtrTy, 0), in allocateByteArrays()
640 ConstantInt::get(IntPtrTy, ByteArrayOffsets[I])}; in allocateByteArrays()
743 Value *PtrAsInt = B.CreatePtrToInt(Ptr, IntPtrTy); in lowerTypeTestCall()
746 ConstantExpr::getPtrToInt(TIL.OffsetedGlobal, IntPtrTy); in lowerTypeTestCall()
761 B.CreateLShr(PtrOffset, ConstantExpr::getZExt(TIL.AlignLog2, IntPtrTy)); in lowerTypeTestCall()
767 IntPtrTy)); in lowerTypeTestCall()
991 auto *MinC = ConstantAsMetadata::get(ConstantInt::get(IntPtrTy, Min)); in importTypeId()
992 auto *MaxC = ConstantAsMetadata::get(ConstantInt::get(IntPtrTy, Max)); in importTypeId()
996 if (AbsWidth == IntPtrTy->getBitWidth()) in importTypeId()
[all …]
/external/llvm/lib/IR/
DInstructions.cpp442 BasicBlock *InsertAtEnd, Type *IntPtrTy, in createMalloc() argument
455 ArraySize = ConstantInt::get(IntPtrTy, 1); in createMalloc()
456 else if (ArraySize->getType() != IntPtrTy) { in createMalloc()
458 ArraySize = CastInst::CreateIntegerCast(ArraySize, IntPtrTy, false, in createMalloc()
461 ArraySize = CastInst::CreateIntegerCast(ArraySize, IntPtrTy, false, in createMalloc()
469 Constant *Scale = ConstantExpr::getIntegerCast(CO, IntPtrTy, in createMalloc()
484 assert(AllocSize->getType() == IntPtrTy && "malloc arg is wrong size"); in createMalloc()
492 MallocFunc = M->getOrInsertFunction("malloc", BPTy, IntPtrTy, nullptr); in createMalloc()
529 Type *IntPtrTy, Type *AllocTy, in CreateMalloc() argument
533 return createMalloc(InsertBefore, nullptr, IntPtrTy, AllocTy, AllocSize, in CreateMalloc()
[all …]
/external/llvm-project/llvm/lib/Target/AArch64/
DAArch64SelectionDAGInfo.cpp35 Type *IntPtrTy = Type::getInt8PtrTy(*DAG.getContext()); in EmitTargetCodeForMemset() local
39 Entry.Ty = IntPtrTy; in EmitTargetCodeForMemset()

12345