[all-commits] [llvm/llvm-project] 577199: Reapply "[VPlan] Set branch weight metadata on mid...

Florian Hahn via All-commits all-commits at lists.llvm.org
Sat Jun 14 09:22:19 PDT 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 577199f9221ebc805a69372a2b19f4c8ebaf1daf
      https://github.com/llvm/llvm-project/commit/577199f9221ebc805a69372a2b19f4c8ebaf1daf
  Author: Florian Hahn <flo at fhahn.com>
  Date:   2025-06-14 (Sat, 14 Jun 2025)

  Changed paths:
    M llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
    M llvm/lib/Transforms/Vectorize/VPlan.h
    M llvm/lib/Transforms/Vectorize/VPlanRecipes.cpp
    M llvm/lib/Transforms/Vectorize/VPlanTransforms.cpp
    M llvm/lib/Transforms/Vectorize/VPlanTransforms.h

  Log Message:
  -----------
  Reapply "[VPlan] Set branch weight metadata on middle term in VPlan (NFC) (#143035)"

This reverts commit 0604dc199c019b23746f4a54885ba0c75569cdae.

The recommitted version addresses post-commit comments and adjusts the
place the branch weights are added. It now runs before VPlans are optimized
for VF and UF, which may remove the vector loop region, causing a crash
trying to get the middle block after that. Test case added in
72f99b75afc12bb.

Original message:
Manage branch weights for the BranchOnCond in the middle block in VPlan.
This requires updating VPInstruction to inherit from VPIRMetadata, which
in general makes sense as there are a number of opcodes that could take
metadata.

There are other branches (part of the skeleton) that also need branch
weights adding.

PR: https://github.com/llvm/llvm-project/pull/143035



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list