[LICM] Support sinking in LNICM
authormaekawatoshiki <konndennsa@gmail.com>
Thu, 12 Aug 2021 15:53:03 +0000 (00:53 +0900)
committermaekawatoshiki <konndennsa@gmail.com>
Thu, 12 Aug 2021 15:56:26 +0000 (00:56 +0900)
commitdd3eea65662a675b78ac2319fd675a22345f5ca3
tree0834833880b6096887604b6a1b169511f96c425a
parenta49ca198bad91b7696b54b3ca65585b92305b386
[LICM] Support sinking in LNICM

Currently, LNICM pass does not support sinking instructions out of loop nest.
This patch enables LNICM to sink down as many instructions to the exit block of outermost loop as possible.

Reviewed By: Whitney

Differential Revision: https://reviews.llvm.org/D107219
llvm/include/llvm/Transforms/Utils/LoopUtils.h
llvm/lib/Transforms/Scalar/LICM.cpp
llvm/test/Transforms/LICM/lnicm-sink.ll [new file with mode: 0644]