Home
last modified time | relevance | path

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

1234

/external/swiftshader/third_party/llvm-7.0/llvm/include/llvm/Analysis/Utils/
DLocal.h32 Type *IntPtrTy = DL.getIntPtrType(GEP->getType()); variable
33 Value *Result = Constant::getNullValue(IntPtrTy);
40 unsigned IntPtrWidth = IntPtrTy->getScalarType()->getIntegerBitWidth();
62 Result = Builder->CreateAdd(Result, ConstantInt::get(IntPtrTy, Size),
67 Constant *Scale = ConstantInt::get(IntPtrTy, Size);
68 Constant *OC = ConstantExpr::getIntegerCast(OpC, IntPtrTy, true /*SExt*/);
75 if (Op->getType() != IntPtrTy)
76 Op = Builder->CreateIntCast(Op, IntPtrTy, true, Op->getName()+".c");
79 Op = Builder->CreateMul(Op, ConstantInt::get(IntPtrTy, Size),
/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/swiftshader/third_party/llvm-7.0/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/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/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-7.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/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/swiftshader/third_party/LLVM/lib/Analysis/
DConstantFolding.cpp548 Type *IntPtrTy = TD->getIntPtrType(ResultTy->getContext()); in CastGEPIndices() local
556 Ops[i]->getType() != IntPtrTy) { in CastGEPIndices()
560 IntPtrTy, in CastGEPIndices()
562 Ops[i], IntPtrTy)); in CastGEPIndices()
585 Type *IntPtrTy = TD->getIntPtrType(Ptr->getContext()); in SymbolicallyEvaluateGEP() local
597 assert((CE == 0 || CE->getType() == IntPtrTy) && in SymbolicallyEvaluateGEP()
612 unsigned BitWidth = TD->getTypeSizeInBits(IntPtrTy); in SymbolicallyEvaluateGEP()
671 IntegerType *IntPtrTy = TD->getIntPtrType(Ty->getContext()); in SymbolicallyEvaluateGEP() local
676 NewIdxs.push_back(ConstantInt::get(IntPtrTy, 0)); in SymbolicallyEvaluateGEP()
682 NewIdxs.push_back(ConstantInt::get(IntPtrTy, NewIdx)); in SymbolicallyEvaluateGEP()
[all …]
/external/swiftshader/third_party/LLVM/lib/Transforms/Scalar/
DCodeGenPrepare.cpp827 Type *IntPtrTy = in OptimizeMemoryInst() local
840 V = Builder.CreatePtrToInt(V, IntPtrTy, "sunkaddr"); in OptimizeMemoryInst()
841 if (V->getType() != IntPtrTy) in OptimizeMemoryInst()
842 V = Builder.CreateIntCast(V, IntPtrTy, /*isSigned=*/true, "sunkaddr"); in OptimizeMemoryInst()
849 if (V->getType() == IntPtrTy) { in OptimizeMemoryInst()
852 V = Builder.CreatePtrToInt(V, IntPtrTy, "sunkaddr"); in OptimizeMemoryInst()
853 } else if (cast<IntegerType>(IntPtrTy)->getBitWidth() < in OptimizeMemoryInst()
855 V = Builder.CreateTrunc(V, IntPtrTy, "sunkaddr"); in OptimizeMemoryInst()
857 V = Builder.CreateSExt(V, IntPtrTy, "sunkaddr"); in OptimizeMemoryInst()
860 V = Builder.CreateMul(V, ConstantInt::get(IntPtrTy, AddrMode.Scale), in OptimizeMemoryInst()
[all …]
/external/llvm/lib/CodeGen/
DSafeStack.cpp113 Type *IntPtrTy; member in __anon03e0d8f40111::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/swiftshader/third_party/llvm-7.0/llvm/lib/CodeGen/
DSafeStack.cpp132 Type *IntPtrTy; member in __anon4377af4c0111::SafeStack
211 IntPtrTy(DL.getIntPtrType(F.getContext())), in SafeStack()
541 IRB.CreateAnd(IRB.CreatePtrToInt(BasePointer, IntPtrTy), in moveStaticAllocasToUnsafeStack()
542 ConstantInt::get(IntPtrTy, ~uint64_t(FrameAlignment - 1))), in moveStaticAllocasToUnsafeStack()
653 if (ArraySize->getType() != IntPtrTy) in moveDynamicAllocasToUnsafeStack()
654 ArraySize = IRB.CreateIntCast(ArraySize, IntPtrTy, false); in moveDynamicAllocasToUnsafeStack()
658 Value *Size = IRB.CreateMul(ArraySize, ConstantInt::get(IntPtrTy, TySize)); in moveDynamicAllocasToUnsafeStack()
660 Value *SP = IRB.CreatePtrToInt(IRB.CreateLoad(UnsafeStackPtr), IntPtrTy); in moveDynamicAllocasToUnsafeStack()
670 IRB.CreateAnd(SP, ConstantInt::get(IntPtrTy, ~uint64_t(Align - 1))), in moveDynamicAllocasToUnsafeStack()
/external/swiftshader/third_party/llvm-7.0/llvm/lib/Target/AArch64/
DAArch64SelectionDAGInfo.cpp36 Type *IntPtrTy = DAG.getDataLayout().getIntPtrType(*DAG.getContext()); in EmitTargetCodeForMemset() local
40 Entry.Ty = IntPtrTy; in EmitTargetCodeForMemset()
/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/lib/Transforms/InstCombine/
DInstCombineAddSub.cpp404 Type *IntPtrTy = TD.getIntPtrType(GEP->getContext()); in EmitGEPOffset() local
405 Value *Result = Constant::getNullValue(IntPtrTy); in EmitGEPOffset()
427 Result = Builder->CreateAdd(Result, ConstantInt::get(IntPtrTy, Size), in EmitGEPOffset()
432 Constant *Scale = ConstantInt::get(IntPtrTy, Size); in EmitGEPOffset()
434 ConstantExpr::getIntegerCast(OpC, IntPtrTy, true /*SExt*/); in EmitGEPOffset()
441 if (Op->getType() != IntPtrTy) in EmitGEPOffset()
442 Op = Builder->CreateIntCast(Op, IntPtrTy, true, Op->getName()+".c"); in EmitGEPOffset()
445 Op = Builder->CreateMul(Op, ConstantInt::get(IntPtrTy, Size), in EmitGEPOffset()
/external/swiftshader/third_party/LLVM/lib/Target/ARM/
DARMSelectionDAGInfo.cpp157 Type *IntPtrTy = TLI.getTargetData()->getIntPtrType(*DAG.getContext()); in EmitTargetCodeForMemset() local
159 Entry.Ty = IntPtrTy; in EmitTargetCodeForMemset()
164 Entry.Ty = IntPtrTy; in EmitTargetCodeForMemset()
/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/swiftshader/third_party/llvm-7.0/llvm/lib/Analysis/
DConstantFolding.cpp738 Type *IntPtrTy = DL.getIntPtrType(ResultTy); in CastGEPIndices() local
739 Type *IntPtrScalarTy = IntPtrTy->getScalarType(); in CastGEPIndices()
750 ? IntPtrTy in CastGEPIndices()
751 : IntPtrTy->getScalarType(); in CastGEPIndices()
811 Type *IntPtrTy = DL.getIntPtrType(Ptr->getType()); in SymbolicallyEvaluateGEP() local
822 assert((!CE || CE->getType() == IntPtrTy) && in SymbolicallyEvaluateGEP()
837 unsigned BitWidth = DL.getTypeSizeInBits(IntPtrTy); in SymbolicallyEvaluateGEP()
917 NewIdxs.push_back(ConstantInt::get(IntPtrTy, 0)); in SymbolicallyEvaluateGEP()
926 NewIdxs.push_back(ConstantInt::get(IntPtrTy, NewIdx)); in SymbolicallyEvaluateGEP()
1192 Type *IntPtrTy = DL.getIntPtrType(CE0->getType()); in ConstantFoldCompareInstOperands() local
[all …]
/external/swiftshader/third_party/LLVM/lib/VMCore/
DInstructions.cpp354 BasicBlock *InsertAtEnd, Type *IntPtrTy, in createMalloc() argument
366 ArraySize = ConstantInt::get(IntPtrTy, 1); in createMalloc()
367 else if (ArraySize->getType() != IntPtrTy) { in createMalloc()
369 ArraySize = CastInst::CreateIntegerCast(ArraySize, IntPtrTy, false, in createMalloc()
372 ArraySize = CastInst::CreateIntegerCast(ArraySize, IntPtrTy, false, in createMalloc()
380 Constant *Scale = ConstantExpr::getIntegerCast(CO, IntPtrTy, in createMalloc()
395 assert(AllocSize->getType() == IntPtrTy && "malloc arg is wrong size"); in createMalloc()
403 MallocFunc = M->getOrInsertFunction("malloc", BPTy, IntPtrTy, NULL); in createMalloc()
439 Type *IntPtrTy, Type *AllocTy, in CreateMalloc() argument
443 return createMalloc(InsertBefore, NULL, IntPtrTy, AllocTy, AllocSize, in CreateMalloc()
[all …]
/external/swiftshader/third_party/llvm-7.0/llvm/include/llvm/Analysis/
DPtrUseVisitor.h226 IntegerType *IntPtrTy = cast<IntegerType>(DL.getIntPtrType(I.getType())); in visitPtr() local
228 Offset = APInt(IntPtrTy->getBitWidth(), 0); in visitPtr()
/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/swiftshader/third_party/llvm-7.0/llvm/lib/Transforms/IPO/
DLowerTypeTests.cpp341 IntegerType *IntPtrTy = M.getDataLayout().getIntPtrType(M.getContext(), 0); member in __anondb9e6fc60111::LowerTypeTestsModule
581 Constant *Idxs[] = {ConstantInt::get(IntPtrTy, 0), in allocateByteArrays()
582 ConstantInt::get(IntPtrTy, ByteArrayOffsets[I])}; in allocateByteArrays()
685 Value *PtrAsInt = B.CreatePtrToInt(Ptr, IntPtrTy); in lowerTypeTestCall()
688 ConstantExpr::getPtrToInt(TIL.OffsetedGlobal, IntPtrTy); in lowerTypeTestCall()
703 B.CreateLShr(PtrOffset, ConstantExpr::getZExt(TIL.AlignLog2, IntPtrTy)); in lowerTypeTestCall()
709 IntPtrTy)); in lowerTypeTestCall()
926 auto *MinC = ConstantAsMetadata::get(ConstantInt::get(IntPtrTy, Min)); in importTypeId()
927 auto *MaxC = ConstantAsMetadata::get(ConstantInt::get(IntPtrTy, Max)); in importTypeId()
931 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/swiftshader/third_party/llvm-7.0/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()

1234