Lines Matching defs:ChecksToHoist
187 SmallVectorImpl<Value *> &ChecksToHoist,
215 /// to generate an expression computing the logical AND of \p ChecksToHoist
222 mergeChecks(SmallVectorImpl<Value *> &ChecksToHoist,
226 /// Generate the logical AND of \p ChecksToHoist and \p OldCondition and make
228 Value *hoistChecks(SmallVectorImpl<Value *> &ChecksToHoist,
295 /// Can we compute the logical AND of \p ChecksToHoist and \p ChecksToWiden
297 bool isWideningCondProfitable(SmallVectorImpl<Value *> &ChecksToHoist,
299 return mergeChecks(ChecksToHoist, ChecksToWiden, /*InsertPt=*/std::nullopt)
303 /// Widen \p ChecksToWiden to fail if any of \p ChecksToHoist is false
304 void widenGuard(SmallVectorImpl<Value *> &ChecksToHoist,
308 auto MergedCheck = mergeChecks(ChecksToHoist, ChecksToWiden, InsertPt);
310 : hoistChecks(ChecksToHoist,
380 SmallVector<Value *> ChecksToHoist;
381 parseWidenableGuard(Instr, ChecksToHoist);
385 if (ChecksToHoist.empty() ||
386 (ChecksToHoist.size() == 1 && isa<ConstantInt>(ChecksToHoist.front())))
428 ChecksToHoist, CandidateChecks);
451 widenGuard(ChecksToHoist, ChecksToWiden, BestSoFar);
461 BasicBlock::iterator WideningPoint, SmallVectorImpl<Value *> &ChecksToHoist,
477 if (!canBeHoistedTo(ChecksToHoist, WideningPoint))
493 if (isWideningCondProfitable(ChecksToHoist, ChecksToWiden))
720 GuardWideningImpl::mergeChecks(SmallVectorImpl<Value *> &ChecksToHoist,
732 // ChecksToHoist and ChecksToWiden.
733 if (ChecksToWiden.size() == 1 && ChecksToHoist.size() == 1 &&
736 match(ChecksToHoist.front(),
768 parseRangeChecks(ChecksToHoist, Checks) &&
786 // We were not able to compute ChecksToHoist AND ChecksToWiden for the price
791 Value *GuardWideningImpl::hoistChecks(SmallVectorImpl<Value *> &ChecksToHoist,
794 assert(!ChecksToHoist.empty());
796 makeAvailableAt(ChecksToHoist, InsertPt);
798 Value *Result = Builder.CreateAnd(ChecksToHoist);