[NFC] Optionally pass a function to emitInstrCountChangedRemark
authorJessica Paquette <jpaquette@apple.com>
Fri, 31 Aug 2018 20:54:37 +0000 (20:54 +0000)
committerJessica Paquette <jpaquette@apple.com>
Fri, 31 Aug 2018 20:54:37 +0000 (20:54 +0000)
commit71e9778006b039b03c1aebe3fc135029e985fdda
treec732688d62065abac2309c32a0c11efe7d93aa6b
parent397c05dd7d8f4a99659d5f4e6fdd07f29a3bfd5e
[NFC] Optionally pass a function to emitInstrCountChangedRemark

In basic block, loop, and function passes, we already have a function that
we can use to emit optimization remarks. We can use that instead of searching
the module for the first suitable function (that is, one that contains at
least one basic block.)

llvm-svn: 341253
llvm/include/llvm/IR/LegacyPassManagers.h
llvm/lib/Analysis/LoopPass.cpp
llvm/lib/IR/LegacyPassManager.cpp