[all-commits] [llvm/llvm-project] 54711a: [LoopSink] Allow sinking to PHI-use

WenleiHe via All-commits all-commits at lists.llvm.org
Tue Jun 13 13:07:24 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 54711a6a5872d5f97da4c0a1bd7e58d0546ca701
      https://github.com/llvm/llvm-project/commit/54711a6a5872d5f97da4c0a1bd7e58d0546ca701
  Author: Wenlei He <aktoon at gmail.com>
  Date:   2023-06-13 (Tue, 13 Jun 2023)

  Changed paths:
    M llvm/lib/Transforms/Scalar/LoopSink.cpp
    A llvm/test/Transforms/LICM/loopsink-phi.ll

  Log Message:
  -----------
  [LoopSink] Allow sinking to PHI-use

This change allows sinking defs from loop preheader with PHI-use into loop body. Loop sink can now see through PHI-use and select incoming blocks of value being used as candidate sink destination.

It makes loop sink more effective so more LICM can be undone if proven unprofitable with profile info. It addresses the motivating case in D87551, without resorting to profile guided LICM which breaks canonicalization.

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




More information about the All-commits mailing list