Lines Matching full:loads
9 // This pass tries to expand memcmp() calls into optimally-sized loads and
51 "memcmp-num-loads-per-block", cl::Hidden, cl::init(1),
52 cl::desc("The number of loads per basic block for inline expansion of "
56 "max-loads-per-memcmp", cl::Hidden,
57 cl::desc("Set maximum number of loads used in expanded memcmp"));
60 "max-loads-per-memcmp-opt-size", cl::Hidden,
61 cl::desc("Set maximum number of loads used in expanded memcmp for -Os/Oz"));
91 // comparing 33 bytes on X86+sse can be done with 2x16-byte loads and
161 // Do not expand if the total number of loads is larger than what the in computeGreedyLoadSequence()
190 // We try to do as many non-overlapping loads as possible starting from the in computeOverlappingLoadSequence()
201 // Bail if the number of loads (non-overlapping + potential overlapping one) in computeOverlappingLoadSequence()
206 // Add non-overlapping loads. in computeOverlappingLoadSequence()
226 // subsequences into single loads of allowed sizes from in optimiseLoadSequence()
282 // If we allow overlapping loads and the load sequence is not already optimal, in MemCmpExpansion()
283 // use overlapping loads. in MemCmpExpansion()
373 // It loads 1 byte from each source of the memcmp parameters with the given
380 const LoadPair Loads = in emitLoadCompareByteBlock() local
383 Value *Diff = Builder.CreateSub(Loads.Lhs, Loads.Rhs); in emitLoadCompareByteBlock()
414 "getCompareLoadPairs() called with no remaining loads"); in getCompareLoadPairs()
428 // If we have multiple loads per block, we need to generate a composite in getCompareLoadPairs()
437 const LoadPair Loads = getLoadPair( in getCompareLoadPairs() local
442 // If we have multiple loads per block, we need to generate a composite in getCompareLoadPairs()
444 Diff = Builder.CreateXor(Loads.Lhs, Loads.Rhs); in getCompareLoadPairs()
449 Cmp = Builder.CreateICmpNE(Loads.Lhs, Loads.Rhs); in getCompareLoadPairs()
506 // given LoadSize. It loads the number of bytes specified by LoadSize from each
537 const LoadPair Loads = getLoadPair(LoadSizeType, BSwapSizeType, MaxLoadType, in emitLoadCompareBlock() local
543 ResBlock.PhiSrc1->addIncoming(Loads.Lhs, LoadCmpBlocks[BlockIndex]); in emitLoadCompareBlock()
544 ResBlock.PhiSrc2->addIncoming(Loads.Rhs, LoadCmpBlocks[BlockIndex]); in emitLoadCompareBlock()
547 Value *Cmp = Builder.CreateICmp(ICmpInst::ICMP_EQ, Loads.Lhs, Loads.Rhs); in emitLoadCompareBlock()
621 // handle multiple loads per block. in getMemCmpExpansionZeroCase()
658 const LoadPair Loads = getLoadPair(LoadSizeType, BSwapSizeType, in getMemCmpOneBlock() local
660 return Builder.CreateSub(Loads.Lhs, Loads.Rhs); in getMemCmpOneBlock()
663 const LoadPair Loads = getLoadPair(LoadSizeType, BSwapSizeType, MaxLoadType, in getMemCmpOneBlock() local
690 Loads.Lhs, Loads.Rhs); in getMemCmpOneBlock()
705 Value *CmpUGT = Builder.CreateICmpUGT(Loads.Lhs, Loads.Rhs); in getMemCmpOneBlock()
706 Value *CmpULT = Builder.CreateICmpULT(Loads.Lhs, Loads.Rhs); in getMemCmpOneBlock()
873 // Don't expand if this will require more loads than desired by the target. in expandMemCmp()