diff --git a/llvm/test/tools/llvm-dwarfdump/X86/locstats.ll b/llvm/test/tools/llvm-dwarfdump/X86/locstats.ll --- a/llvm/test/tools/llvm-dwarfdump/X86/locstats.ll +++ b/llvm/test/tools/llvm-dwarfdump/X86/locstats.ll @@ -5,9 +5,9 @@ ; CHECK: "formal params scope bytes total":20 ; CHECK: "formal params scope bytes covered":20 ; CHECK: "formal params entry value scope bytes covered":5 -; CHECK: "vars scope bytes total":90 -; CHECK: "vars scope bytes covered":60 -; CHECK: "vars entry value scope bytes covered":0 +; CHECK: "vars scope bytes total":110 +; CHECK: "vars scope bytes covered":80 +; CHECK: "vars entry value scope bytes covered":5 ; CHECK: "total variables procesed by location statistics":6 ; CHECK: "variables with 0% of its scope covered":1 ; CHECK: "variables with (0%,10%) of its scope covered":0 diff --git a/llvm/test/tools/llvm-dwarfdump/X86/statistics-dwo.test b/llvm/test/tools/llvm-dwarfdump/X86/statistics-dwo.test --- a/llvm/test/tools/llvm-dwarfdump/X86/statistics-dwo.test +++ b/llvm/test/tools/llvm-dwarfdump/X86/statistics-dwo.test @@ -69,7 +69,7 @@ # } # -CHECK: "version":4 +CHECK: "version":5 CHECK: "source functions":3 CHECK: "source functions with location":3 CHECK: "inlined functions":7 diff --git a/llvm/test/tools/llvm-dwarfdump/X86/statistics-v3.test b/llvm/test/tools/llvm-dwarfdump/X86/statistics-v3.test --- a/llvm/test/tools/llvm-dwarfdump/X86/statistics-v3.test +++ b/llvm/test/tools/llvm-dwarfdump/X86/statistics-v3.test @@ -64,7 +64,7 @@ # } # -CHECK: "version":4 +CHECK: "version":5 CHECK: "source functions":3 CHECK: "source functions with location":3 CHECK: "inlined functions":8 diff --git a/llvm/test/tools/llvm-dwarfdump/X86/statistics.ll b/llvm/test/tools/llvm-dwarfdump/X86/statistics.ll --- a/llvm/test/tools/llvm-dwarfdump/X86/statistics.ll +++ b/llvm/test/tools/llvm-dwarfdump/X86/statistics.ll @@ -1,6 +1,6 @@ ; RUN: llc -O0 %s -o - -filetype=obj \ ; RUN: | llvm-dwarfdump -statistics - | FileCheck %s -; CHECK: "version":4 +; CHECK: "version":5 ; namespace test { ; extern int a; diff --git a/llvm/tools/llvm-dwarfdump/Statistics.cpp b/llvm/tools/llvm-dwarfdump/Statistics.cpp --- a/llvm/tools/llvm-dwarfdump/Statistics.cpp +++ b/llvm/tools/llvm-dwarfdump/Statistics.cpp @@ -322,7 +322,8 @@ std::min(BytesInScope, BytesCovered); GlobalStats.ParamScopeBytes += BytesInScope; GlobalStats.ParamScopeEntryValueBytesCovered += BytesEntryValuesCovered; - } else if (IsVariable) { + } + if (IsParam || IsVariable) { GlobalStats.VarScopeBytesCovered += std::min(BytesInScope, BytesCovered); GlobalStats.VarScopeBytes += BytesInScope; GlobalStats.VarScopeEntryValueBytesCovered += BytesEntryValuesCovered; @@ -528,7 +529,7 @@ /// The version number should be increased every time the algorithm is changed /// (including bug fixes). New metrics may be added without increasing the /// version. - unsigned Version = 4; + unsigned Version = 5; unsigned VarParamTotal = 0; unsigned VarParamUnique = 0; unsigned VarParamWithLoc = 0;