[llvm-dwarfdump][Statistics] Make calculations of vars in global scope more accurate
authorKristina Bessonova <kbessonova@accesssoftek.com>
Tue, 14 Jan 2020 18:39:04 +0000 (20:39 +0200)
committerKristina Bessonova <kbessonova@accesssoftek.com>
Tue, 28 Jan 2020 18:52:20 +0000 (20:52 +0200)
commit4b0a7fe008e6a61997f622b7993d6316d898deae
treead1a937ea547ea7bf7ac547b098c25ee982a6b59
parent5499e2f455caad5c7cf95aa459b8d246e14c6af9
[llvm-dwarfdump][Statistics] Make calculations of vars in global scope more accurate

It isn't known how many times we've seen the same variable or member in
the global scope (unlike in functions), but there still can be some duplicates
among different CUs.
So, this patch proposes to count variables in the global scope just as a sum of
the number of vars, constant members and artificial entities.

Reviewed by: aprantl

Differential Revision: https://reviews.llvm.org/D73004
llvm/test/tools/llvm-dwarfdump/X86/stats-multiple-cu-members.ll [new file with mode: 0644]
llvm/tools/llvm-dwarfdump/Statistics.cpp