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
190 // We try to do as many non-overlapping loads as possible starting from the
201 // Bail if the number of loads (non-overlapping + potential overlapping one)
206 // Add non-overlapping loads.
226 // subsequences into single loads of allowed sizes from
282 // If we allow overlapping loads and the load sequence is not already optimal,
283 // use overlapping loads.
373 // It loads 1 byte from each source of the memcmp parameters with the given
380 const LoadPair Loads =
383 Value *Diff = Builder.CreateSub(Loads.Lhs, Loads.Rhs);
414 "getCompareLoadPairs() called with no remaining loads");
428 // If we have multiple loads per block, we need to generate a composite
437 const LoadPair Loads = getLoadPair(
442 // If we have multiple loads per block, we need to generate a composite
444 Diff = Builder.CreateXor(Loads.Lhs, Loads.Rhs);
449 Cmp = Builder.CreateICmpNE(Loads.Lhs, Loads.Rhs);
506 // given LoadSize. It loads the number of bytes specified by LoadSize from each
537 const LoadPair Loads = getLoadPair(LoadSizeType, BSwapSizeType, MaxLoadType,
543 ResBlock.PhiSrc1->addIncoming(Loads.Lhs, LoadCmpBlocks[BlockIndex]);
544 ResBlock.PhiSrc2->addIncoming(Loads.Rhs, LoadCmpBlocks[BlockIndex]);
547 Value *Cmp = Builder.CreateICmp(ICmpInst::ICMP_EQ, Loads.Lhs, Loads.Rhs);
621 // handle multiple loads per block.
658 const LoadPair Loads = getLoadPair(LoadSizeType, BSwapSizeType,
660 return Builder.CreateSub(Loads.Lhs, Loads.Rhs);
663 const LoadPair Loads = getLoadPair(LoadSizeType, BSwapSizeType, MaxLoadType,
690 Loads.Lhs, Loads.Rhs);
705 Value *CmpUGT = Builder.CreateICmpUGT(Loads.Lhs, Loads.Rhs);
706 Value *CmpULT = Builder.CreateICmpULT(Loads.Lhs, Loads.Rhs);
873 // Don't expand if this will require more loads than desired by the target.