[all-commits] [llvm/llvm-project] 9a868a: [LoopSink] Allow sinking to PHI-use (2nd attempt)
WenleiHe via All-commits
all-commits at lists.llvm.org
Fri Jun 23 09:52:23 PDT 2023
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 9a868a902c2d9aec295612132445efd220c52e86
https://github.com/llvm/llvm-project/commit/9a868a902c2d9aec295612132445efd220c52e86
Author: Wenlei He <aktoon at gmail.com>
Date: 2023-06-23 (Fri, 23 Jun 2023)
Changed paths:
M llvm/lib/Transforms/Scalar/LoopSink.cpp
A llvm/test/Transforms/LICM/loopsink-phi.ll
A llvm/test/Transforms/LICM/loopsink-phi2.ll
Log Message:
-----------
[LoopSink] Allow sinking to PHI-use (2nd attempt)
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.
This is the 2nd attempt after D152772.
More information about the All-commits
mailing list