[all-commits] [llvm/llvm-project] 3fcfce: Reapply "[LoopPeel] Implement initial peeling off ...

Florian Hahn via All-commits all-commits at lists.llvm.org
Sat May 17 02:51:48 PDT 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 3fcfce4c5e5fd1c3072e8db1d692c93459e8cd74
      https://github.com/llvm/llvm-project/commit/3fcfce4c5e5fd1c3072e8db1d692c93459e8cd74
  Author: Florian Hahn <flo at fhahn.com>
  Date:   2025-05-17 (Sat, 17 May 2025)

  Changed paths:
    M llvm/include/llvm/Analysis/TargetTransformInfo.h
    M llvm/include/llvm/Transforms/Utils/LoopPeel.h
    M llvm/lib/Transforms/Scalar/LoopFuse.cpp
    M llvm/lib/Transforms/Scalar/LoopUnrollPass.cpp
    M llvm/lib/Transforms/Utils/LoopPeel.cpp
    M llvm/test/Transforms/LoopUnroll/peel-last-iteration.ll

  Log Message:
  -----------
  Reapply "[LoopPeel] Implement initial peeling off the last loop iteration. (#139551)"

This reverts the revert commit bf92b127d2637948f53d11a187e865aa10e2e74c.

This adds missing initialization of PeelLast in gatherPeelingPreferences.

Original message:
Generalize countToEliminateCompares to also consider peeling off the
last iteration if it eliminates a compare.

At the moment, codegen for peeling off the last iteration is quite
restrictive and callers have to make sure that the exit condition can be
adjusted when peeling and that the loop executes at least 2 iterations.

Both will be relaxed in follow-ups.

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



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