OSDN Git Service

[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)
commit4f3a2194ad3488af02fbefb2c9ddfe68729ab996
treeff90849eb1e87a780e1048ab95d0ce8b47ebe6c1
parent14667077ec615abba3912f9f1c420400fc557875
[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)

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@341250 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/IR/LegacyPassManagers.h
lib/Analysis/CallGraphSCCPass.cpp
lib/Analysis/LoopPass.cpp
lib/IR/LegacyPassManager.cpp