Home
last modified time | relevance | path

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

123

/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/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()
DLoopIdiomRecognize.cpp874 Type *IntPtrTy = Builder.getIntPtrTy(*DL, StrAS); in processLoopStoreOfLoopLoad() local
878 StrStart = getStartForNegStride(StrStart, BECount, IntPtrTy, StoreSize, SE); in processLoopStoreOfLoopLoad()
904 LdStart = getStartForNegStride(LdStart, BECount, IntPtrTy, StoreSize, SE); in processLoopStoreOfLoopLoad()
924 BECount = SE->getTruncateOrZeroExtend(BECount, IntPtrTy); in processLoopStoreOfLoopLoad()
927 SE->getAddExpr(BECount, SE->getOne(IntPtrTy), SCEV::FlagNUW); in processLoopStoreOfLoopLoad()
929 NumBytesS = SE->getMulExpr(NumBytesS, SE->getConstant(IntPtrTy, StoreSize), in processLoopStoreOfLoopLoad()
933 Expander.expandCodeFor(NumBytesS, IntPtrTy, Preheader->getTerminator()); in processLoopStoreOfLoopLoad()
DStraightLineStrengthReduce.cpp441 IntegerType *IntPtrTy = cast<IntegerType>(DL->getIntPtrType(I->getType())); in allocateCandidatesAndFindBasisForGEP() local
443 IntPtrTy, Idx->getSExtValue() * (int64_t)ElementSize, true); in allocateCandidatesAndFindBasisForGEP()
633 Type *IntPtrTy = DL->getIntPtrType(C.Ins->getType()); in rewriteCandidateWithBasis() local
649 Bump = Builder.CreateSExtOrTrunc(Bump, IntPtrTy); in rewriteCandidateWithBasis()
/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 __anonb0e9eae80111::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()
DCodeGenPrepare.cpp3833 Type *IntPtrTy = DL->getIntPtrType(Addr->getType()); in optimizeMemoryInst() local
3889 if (V->getType() != IntPtrTy) in optimizeMemoryInst()
3890 V = Builder.CreateIntCast(V, IntPtrTy, /*isSigned=*/true, "sunkaddr"); in optimizeMemoryInst()
3898 if (V->getType() == IntPtrTy) { in optimizeMemoryInst()
3900 } else if (cast<IntegerType>(IntPtrTy)->getBitWidth() < in optimizeMemoryInst()
3902 V = Builder.CreateTrunc(V, IntPtrTy, "sunkaddr"); in optimizeMemoryInst()
3916 V = Builder.CreateMul(V, ConstantInt::get(IntPtrTy, AddrMode.Scale), in optimizeMemoryInst()
3926 Value *V = ConstantInt::get(IntPtrTy, AddrMode.BaseOffs); in optimizeMemoryInst()
3952 Type *IntPtrTy = DL->getIntPtrType(Addr->getType()); in optimizeMemoryInst() local
3963 V = Builder.CreatePtrToInt(V, IntPtrTy, "sunkaddr"); in optimizeMemoryInst()
[all …]
/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()
DInstCombineLoadStoreAlloca.cpp29 Type *IntPtrTy = TD->getIntPtrType(AI.getContext()); in visitAllocaInst() local
30 if (AI.getArraySize()->getType() != IntPtrTy) { in visitAllocaInst()
32 IntPtrTy, false); in visitAllocaInst()
/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/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/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/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/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/swiftshader/third_party/LLVM/examples/BrainF/
DBrainF.cpp83 Type* IntPtrTy = IntegerType::getInt32Ty(C); in header() local
86 allocsize = ConstantExpr::getTruncOrBitCast(allocsize, IntPtrTy); in header()
87 ptr_arr = CallInst::CreateMalloc(BB, IntPtrTy, Int8Ty, allocsize, val_mem, in header()
/external/clang/lib/CodeGen/
DCGExpr.cpp575 llvm::Type *Tys[2] = { IntPtrTy, Int8PtrTy }; in EmitTypeCheck()
581 llvm::ConstantInt::get(IntPtrTy, Size)); in EmitTypeCheck()
595 Builder.CreateAnd(Builder.CreatePtrToInt(Ptr, IntPtrTy), in EmitTypeCheck()
596 llvm::ConstantInt::get(IntPtrTy, AlignVal - 1)); in EmitTypeCheck()
598 Builder.CreateICmpEQ(Align, llvm::ConstantInt::get(IntPtrTy, 0)); in EmitTypeCheck()
644 llvm::Type *VPtrTy = llvm::PointerType::get(IntPtrTy, 0); in EmitTypeCheck()
650 Hash = Builder.CreateTrunc(Hash, IntPtrTy); in EmitTypeCheck()
654 llvm::Type *HashTable = llvm::ArrayType::get(IntPtrTy, CacheSize); in EmitTypeCheck()
658 llvm::ConstantInt::get(IntPtrTy, in EmitTypeCheck()
1659 llvm::Type *ResultType = IntPtrTy; in EmitStoreThroughLValue()
[all …]
DCodeGenTypeCache.h46 llvm::IntegerType *IntPtrTy; member
/external/swiftshader/third_party/LLVM/lib/Target/X86/
DX86SelectionDAGInfo.cpp57 Type *IntPtrTy = getTargetData()->getIntPtrType(*DAG.getContext()); in EmitTargetCodeForMemset() local
61 Entry.Ty = IntPtrTy; in EmitTargetCodeForMemset()
/external/llvm/lib/Target/X86/
DX86SelectionDAGInfo.cpp78 Type *IntPtrTy = DAG.getDataLayout().getIntPtrType(*DAG.getContext()); in EmitTargetCodeForMemset() local
82 Entry.Ty = IntPtrTy; in EmitTargetCodeForMemset()

123