[all-commits] [llvm/llvm-project] 070054: [LSR] Optimize unused IVs to final values in the e...

syzaara via All-commits all-commits at lists.llvm.org
Fri Apr 8 08:18:34 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 07005440ae148d1eb102493a1148e2818fab21e0
      https://github.com/llvm/llvm-project/commit/07005440ae148d1eb102493a1148e2818fab21e0
  Author: Zaara Syeda <syzaara at ca.ibm.com>
  Date:   2022-04-08 (Fri, 08 Apr 2022)

  Changed paths:
    M llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp
    A llvm/test/Transforms/LoopStrengthReduce/remove_scev_indvars.ll

  Log Message:
  -----------
  [LSR] Optimize unused IVs to final values in the exit block

Loop Strength Reduce sometimes optimizes away all uses of an induction variable
from a loop but leaves the IV increments. When the only remaining use of the IV
is the PHI in the exit block, this patch will call rewriteLoopExitValues to
replace the exit block PHI with the final value of the IV to skip the updates
in each loop iteration.

Differential Revision: https://reviews.llvm.org/D118808




More information about the All-commits mailing list