[NFC] Pass the instruction delta to emitInstrCountChangedRemark
authorJessica Paquette <jpaquette@apple.com>
Fri, 31 Aug 2018 20:20:57 +0000 (20:20 +0000)
committerJessica Paquette <jpaquette@apple.com>
Fri, 31 Aug 2018 20:20:57 +0000 (20:20 +0000)
commit9a23c5592083384aea3494882170488e30138f36
tree5ee9708b0c21ad3686c6967c6365ad6f7485cf12
parent1fc443b8877e16c145a73158ed68def18f9f1f6a
[NFC] Pass the instruction delta to emitInstrCountChangedRemark

Instead of counting the size of the entire module every time we run a pass,
pass along a delta instead and use that to emit the remark.

This means we only have to use (on average) smaller IR units to calculate
instruction counts. E.g, in a BB pass, we only need to look at the delta of
the BB instead of the delta of the entire module.

6/6

(This improved compile time for size remarks on sqlite3 + O2 significantly)

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