diff options
author | Jessica Paquette <jpaquette@apple.com> | 2018-08-31 20:54:37 +0000 |
---|---|---|
committer | Jessica Paquette <jpaquette@apple.com> | 2018-08-31 20:54:37 +0000 |
commit | 71e9778006b039b03c1aebe3fc135029e985fdda (patch) | |
tree | c732688d62065abac2309c32a0c11efe7d93aa6b /llvm/lib/Analysis/LoopPass.cpp | |
parent | 397c05dd7d8f4a99659d5f4e6fdd07f29a3bfd5e (diff) | |
download | bcm5719-llvm-71e9778006b039b03c1aebe3fc135029e985fdda.tar.gz bcm5719-llvm-71e9778006b039b03c1aebe3fc135029e985fdda.zip |
[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
Diffstat (limited to 'llvm/lib/Analysis/LoopPass.cpp')
-rw-r--r-- | llvm/lib/Analysis/LoopPass.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Analysis/LoopPass.cpp b/llvm/lib/Analysis/LoopPass.cpp index f60b1815ce4..3629ae90da5 100644 --- a/llvm/lib/Analysis/LoopPass.cpp +++ b/llvm/lib/Analysis/LoopPass.cpp @@ -226,7 +226,7 @@ bool LPPassManager::runOnFunction(Function &F) { if (NewSize != FunctionSize) { int64_t Delta = static_cast<int64_t>(NewSize) - static_cast<int64_t>(FunctionSize); - emitInstrCountChangedRemark(P, M, Delta, InstrCount); + emitInstrCountChangedRemark(P, M, Delta, InstrCount, &F); InstrCount = static_cast<int64_t>(InstrCount) + Delta; FunctionSize = NewSize; } |