[LoopDeletion] Emit a remark when a dead loop is deleted
authorFrancis Visoiu Mistrih <francisvm@yahoo.com>
Fri, 3 Jul 2020 05:09:01 +0000 (22:09 -0700)
committerFrancis Visoiu Mistrih <francisvm@yahoo.com>
Fri, 3 Jul 2020 22:20:23 +0000 (15:20 -0700)
commitaa5ec34e312699a2fe5263133129a1e103ac91ee
tree828bc85d7348b3513f6fed5690667c4a18263955
parente359ab1eca5727ce4c688bb49323b8a09478d61c
[LoopDeletion] Emit a remark when a dead loop is deleted

This emits a remark when LoopDeletion deletes a dead loop, using the
source location of the loop's header. There are currently two reasons
for removing the loop: invariant loop or loop that never executes.

Differential Revision: https://reviews.llvm.org/D83113
llvm/lib/Transforms/Scalar/LoopDeletion.cpp
llvm/test/Transforms/LoopDeletion/basic-remark.ll [new file with mode: 0644]
llvm/test/Transforms/LoopDeletion/unreachable-loops.ll