[llvm-commits] [llvm] r117307 - /llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
Devang Patel
dpatel at apple.com
Tue Oct 26 10:41:32 PDT 2010
On Oct 26, 2010, at 12:47 AM, Duncan Sands wrote:
> Hi Devang,
>
>> --- llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp (original)
>> +++ llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp Mon Oct 25 15:45:32 2010
>> @@ -30,6 +30,7 @@
>> #include "llvm/Target/TargetRegisterInfo.h"
>> #include "llvm/Target/TargetOptions.h"
>> #include "llvm/Analysis/DebugInfo.h"
>> +#include "llvm/ADT/Statistic.h"
>> #include "llvm/ADT/STLExtras.h"
>> #include "llvm/ADT/StringExtras.h"
>> #include "llvm/Support/CommandLine.h"
>> @@ -52,6 +53,8 @@
>> cl::desc("Make an absense of debug location information explicit."),
>> cl::init(false));
>>
>> +STATISTIC(BlocksWithoutLineNo, "Number of blocks without any line number");
>> +
>
> maybe the statistic should be surrounded by "#ifndef NDEBUG" too, otherwise when
> printing statistics from a release build you will always get BlocksWithoutLineNo
> equal to zero, which might be confusing.
Statistics are not printed if value is zero.
> That said, maybe the statistic should
> be always available - is it really costly to compute?
The cost is likely not significant, it involves couple of rounds of extra iterations to walk all instructions.
-
Devang
More information about the llvm-commits
mailing list