diff options
author | Jessica Paquette <jpaquette@apple.com> | 2018-08-31 20:20:57 +0000 |
---|---|---|
committer | Jessica Paquette <jpaquette@apple.com> | 2018-08-31 20:20:57 +0000 |
commit | 9a23c5592083384aea3494882170488e30138f36 (patch) | |
tree | 5ee9708b0c21ad3686c6967c6365ad6f7485cf12 /llvm/lib/Analysis/LoopPass.cpp | |
parent | 1fc443b8877e16c145a73158ed68def18f9f1f6a (diff) | |
download | bcm5719-llvm-9a23c5592083384aea3494882170488e30138f36.tar.gz bcm5719-llvm-9a23c5592083384aea3494882170488e30138f36.zip |
[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
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 191d5f0f4ad..f60b1815ce4 100644 --- a/llvm/lib/Analysis/LoopPass.cpp +++ b/llvm/lib/Analysis/LoopPass.cpp @@ -224,9 +224,9 @@ bool LPPassManager::runOnFunction(Function &F) { // Update the size of the function, emit a remark, and update the // size of the module. if (NewSize != FunctionSize) { - emitInstrCountChangedRemark(P, M, InstrCount); int64_t Delta = static_cast<int64_t>(NewSize) - static_cast<int64_t>(FunctionSize); + emitInstrCountChangedRemark(P, M, Delta, InstrCount); InstrCount = static_cast<int64_t>(InstrCount) + Delta; FunctionSize = NewSize; } |