[llvm] [VPlan] Simplify Plan's entry in removeBranchOnConst. (PR #154510)
via llvm-commits
llvm-commits at lists.llvm.org
Sun Sep 14 14:11:44 PDT 2025
================
@@ -1648,12 +1661,15 @@ static void addRuntimeUnrollDisableMetaData(Loop *L) {
}
void LoopVectorizationPlanner::updateLoopMetadataAndProfileInfo(
- Loop *VectorLoop, VPBasicBlock *HeaderVPBB, bool VectorizingEpilogue,
- unsigned EstimatedVFxUF, bool DisableRuntimeUnroll) {
- MDNode *LID = OrigLoop->getLoopID();
+ Loop *VectorLoop, VPBasicBlock *HeaderVPBB, const VPlan &Plan,
+ bool VectorizingEpilogue, MDNode *LID,
+ std::optional<unsigned> OrigAverageTripCount,
+ unsigned OrigLoopInvocationWeight, unsigned EstimatedVFxUF,
+ bool DisableRuntimeUnroll) {
// Update the metadata of the scalar loop. Skip the update when vectorizing
- // the epilogue loop, to ensure it is only updated once.
- if (!VectorizingEpilogue) {
+ // the epilogue loop, to ensure it is only updated once, or when the became
+ // unreachable.
----------------
ayalz wrote:
```suggestion
// the epilogue loop to ensure it is updated only once. Also skip the update
// when the scalar loop became unreachable.
```
https://github.com/llvm/llvm-project/pull/154510
More information about the llvm-commits
mailing list