Lines Matching refs:CI

54   CallInst *const CI;  member in __anon24fd12780111::MemCmpExpansion
107 MemCmpExpansion(CallInst *CI, uint64_t Size,
197 CallInst *const CI, uint64_t Size, in MemCmpExpansion() argument
201 : CI(CI), in MemCmpExpansion()
208 Builder(CI) { in MemCmpExpansion()
249 BasicBlock *BB = BasicBlock::Create(CI->getContext(), "loadbb", in createLoadCmpBlocks()
256 ResBlock.BB = BasicBlock::Create(CI->getContext(), "res_block", in createResultBlock()
266 auto *ByteType = Type::getInt8Ty(CI->getContext()); in getPtrToElementAtOffset()
281 Type *LoadSizeType = Type::getInt8Ty(CI->getContext()); in emitLoadCompareByteBlock()
283 getPtrToElementAtOffset(CI->getArgOperand(0), LoadSizeType, OffsetBytes); in emitLoadCompareByteBlock()
285 getPtrToElementAtOffset(CI->getArgOperand(1), LoadSizeType, OffsetBytes); in emitLoadCompareByteBlock()
290 LoadSrc1 = Builder.CreateZExt(LoadSrc1, Type::getInt32Ty(CI->getContext())); in emitLoadCompareByteBlock()
291 LoadSrc2 = Builder.CreateZExt(LoadSrc2, Type::getInt32Ty(CI->getContext())); in emitLoadCompareByteBlock()
326 Builder.SetInsertPoint(CI); in getCompareLoadPairs()
336 : IntegerType::get(CI->getContext(), MaxLoadSize * 8); in getCompareLoadPairs()
341 IntegerType::get(CI->getContext(), CurLoadEntry.LoadSize * 8); in getCompareLoadPairs()
343 Value *Source1 = getPtrToElementAtOffset(CI->getArgOperand(0), LoadSizeType, in getCompareLoadPairs()
345 Value *Source2 = getPtrToElementAtOffset(CI->getArgOperand(1), LoadSizeType, in getCompareLoadPairs()
418 Value *Zero = ConstantInt::get(Type::getInt32Ty(CI->getContext()), 0); in emitLoadCompareBlockMultipleLoads()
442 IntegerType::get(CI->getContext(), CurLoadEntry.LoadSize * 8); in emitLoadCompareBlock()
443 Type *MaxLoadType = IntegerType::get(CI->getContext(), MaxLoadSize * 8); in emitLoadCompareBlock()
448 Value *Source1 = getPtrToElementAtOffset(CI->getArgOperand(0), LoadSizeType, in emitLoadCompareBlock()
450 Value *Source2 = getPtrToElementAtOffset(CI->getArgOperand(1), LoadSizeType, in emitLoadCompareBlock()
458 Function *Bswap = Intrinsic::getDeclaration(CI->getModule(), in emitLoadCompareBlock()
489 Value *Zero = ConstantInt::get(Type::getInt32Ty(CI->getContext()), 0); in emitLoadCompareBlock()
503 Value *Res = ConstantInt::get(Type::getInt32Ty(CI->getContext()), 1); in emitMemCmpResultBlock()
525 Type *MaxLoadType = IntegerType::get(CI->getContext(), MaxLoadSize * 8); in setupResultBlockPHINodes()
536 PhiRes = Builder.CreatePHI(Type::getInt32Ty(CI->getContext()), 2, "phi.res"); in setupEndBlockPHINodes()
558 return Builder.CreateZExt(Cmp, Type::getInt32Ty(CI->getContext())); in getMemCmpEqZeroOneBlock()
564 Type *LoadSizeType = IntegerType::get(CI->getContext(), Size * 8); in getMemCmpOneBlock()
565 Value *Source1 = CI->getArgOperand(0); in getMemCmpOneBlock()
566 Value *Source2 = CI->getArgOperand(1); in getMemCmpOneBlock()
579 Function *Bswap = Intrinsic::getDeclaration(CI->getModule(), in getMemCmpOneBlock()
611 BasicBlock *StartBlock = CI->getParent(); in getMemCmpExpansion()
612 EndBlock = StartBlock->splitBasicBlock(CI, "endblock"); in getMemCmpExpansion()
630 Builder.SetCurrentDebugLocation(CI->getDebugLoc()); in getMemCmpExpansion()
720 static bool expandMemCmp(CallInst *CI, const TargetTransformInfo *TTI, in expandMemCmp() argument
725 if (CI->getFunction()->optForMinSize()) in expandMemCmp()
729 ConstantInt *SizeCast = dyn_cast<ConstantInt>(CI->getArgOperand(2)); in expandMemCmp()
741 const bool IsUsedForZeroCmp = isOnlyUsedInZeroEqualityComparison(CI); in expandMemCmp()
746 TLI->getMaxExpandSizeMemcmp(CI->getFunction()->optForSize()); in expandMemCmp()
752 MemCmpExpansion Expansion(CI, SizeVal, *Options, MaxNumLoads, in expandMemCmp()
766 CI->replaceAllUsesWith(Res); in expandMemCmp()
767 CI->eraseFromParent(); in expandMemCmp()
821 CallInst *CI = dyn_cast<CallInst>(&I); in runOnBlock() local
822 if (!CI) { in runOnBlock()
826 if (TLI->getLibFunc(ImmutableCallSite(CI), Func) && in runOnBlock()
827 Func == LibFunc_memcmp && expandMemCmp(CI, TTI, TL, &DL)) { in runOnBlock()