[MachineLoop] New helper isLoopInvariant()
authorSjoerd Meijer <sjoerd.meijer@gmail.com>
Fri, 8 Jan 2021 09:04:56 +0000 (09:04 +0000)
committerSjoerd Meijer <sjoerd.meijer@gmail.com>
Fri, 8 Jan 2021 09:04:56 +0000 (09:04 +0000)
commit8af859d514fa0ef4a75b3c3dfb1ee8f42ac9bd04
treed377b0253915519962352d054e6faf9a2dd3b566
parentd1bf26fd943e39a4e3bb55bdaeec5559e74dee99
[MachineLoop] New helper isLoopInvariant()

This factors out code from MachineLICM that determines whether an instruction
is loop-invariant, which is a generally useful function. Thus this allows to
use that helper elsewhere too.

Differential Revision: https://reviews.llvm.org/D94082
llvm/include/llvm/CodeGen/MachineLoopInfo.h
llvm/lib/CodeGen/MachineLICM.cpp
llvm/lib/CodeGen/MachineLoopInfo.cpp