Index: llvm/include/llvm/Analysis/LoopInfo.h =================================================================== --- llvm/include/llvm/Analysis/LoopInfo.h +++ llvm/include/llvm/Analysis/LoopInfo.h @@ -557,21 +557,24 @@ /// If the given value is an instruction inside of the loop and it can be /// hoisted, do so to make it trivially loop-invariant. - /// Return true if the value after any hoisting is loop invariant. This - /// function can be used as a slightly more aggressive replacement for - /// isLoopInvariant. + /// Return true if \c V is already loop-invariant, and false if \c V can't + /// be made loop-invariant. If \c V is made loop-invariant, \c Changed is + /// set to true. This function can be used as a slightly more aggressive + /// replacement for isLoopInvariant. /// /// If InsertPt is specified, it is the point to hoist instructions to. /// If null, the terminator of the loop preheader is used. + /// bool makeLoopInvariant(Value *V, bool &Changed, Instruction *InsertPt = nullptr, MemorySSAUpdater *MSSAU = nullptr) const; /// If the given instruction is inside of the loop and it can be hoisted, do /// so to make it trivially loop-invariant. - /// Return true if the instruction after any hoisting is loop invariant. This - /// function can be used as a slightly more aggressive replacement for - /// isLoopInvariant. + /// Return true if \c I is already loop-invariant, and false if \c I can't + /// be made loop-invariant. If \c I is made loop-invariant, \c Changed is + /// set to true. This function can be used as a slightly more aggressive + /// replacement for isLoopInvariant. /// /// If InsertPt is specified, it is the point to hoist instructions to. /// If null, the terminator of the loop preheader is used.