[PATCH] D142885: [VPlan] Allow building a VPlan to may fail.
Florian Hahn via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Mar 20 14:14:10 PDT 2023
fhahn marked an inline comment as done.
fhahn added inline comments.
================
Comment at: llvm/lib/Transforms/Vectorize/LoopVectorize.cpp:8823
+ if (auto Plan = buildVPlanWithVPRecipes(SubRange, DeadInstructions))
+ VPlans.push_back(std::move(*Plan));
VF = SubRange.End;
----------------
Ayal wrote:
> nit: why is `std::move()` needed here now, because `buildVPlanWithVPRecipes()` now returns an `std::optional<VPlanPtr>` instead of a `VPlanPtr`? Could `nullptr` be returned instead of `optional`?
IIUC it's needed because `std::unique_ptr` doesn't allow copying.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D142885/new/
https://reviews.llvm.org/D142885
More information about the llvm-commits
mailing list