[llvm] [LV] Create block in mask up-front if needed. (PR #76635)
Florian Hahn via llvm-commits
llvm-commits at lists.llvm.org
Tue Jan 9 02:07:11 PST 2024
================
@@ -8108,14 +8108,18 @@ void VPRecipeBuilder::createHeaderMask(VPlan &Plan) {
BlockMaskCache[Header] = BlockMask;
}
-VPValue *VPRecipeBuilder::createBlockInMask(BasicBlock *BB, VPlan &Plan) {
+VPValue *VPRecipeBuilder::getBlockInMask(BasicBlock *BB) {
assert(OrigLoop->contains(BB) && "Block is not a part of a loop");
// Look for cached value.
BlockMaskCacheTy::iterator BCEntryIt = BlockMaskCache.find(BB);
- if (BCEntryIt != BlockMaskCache.end())
- return BCEntryIt->second;
+ assert(BCEntryIt != BlockMaskCache.end());
----------------
fhahn wrote:
Added, thanks!
https://github.com/llvm/llvm-project/pull/76635
More information about the llvm-commits
mailing list