[llvm] r176733 - Disable statistics on Release builds and move tests that depend on -stats.

Jan Voung jvoung at google.com
Sat Mar 9 07:47:41 PST 2013


On Fri, Mar 8, 2013 at 6:58 PM, Nick Lewycky <nicholas at mxc.ca> wrote:

> Jan Wen Voung wrote:
>
>> Author: jvoung
>> Date: Fri Mar  8 16:56:31 2013
>> New Revision: 176733
>>
>> URL: http://llvm.org/viewvc/llvm-**project?rev=176733&view=rev<http://llvm.org/viewvc/llvm-project?rev=176733&view=rev>
>> Log:
>> Disable statistics on Release builds and move tests that depend on -stats.
>>
>> Summary:
>> Statistics are still available in Release+Asserts (any +Asserts builds),
>> and stats can also be turned on with LLVM_ENABLE_STATS.
>>
>> Move some of the FastISel stats that were moved under DEBUG()
>> back out of DEBUG(), since stats are disabled across the board now.
>>
>> Many tests depend on grepping "-stats" output.  Move those into
>> a orig_dir/Stats/. so that they can be marked as unsupported
>> when building without statistics.
>>
>> Differential Revision: http://llvm-reviews.chandlerc.**com/D486<http://llvm-reviews.chandlerc.com/D486>
>>
>
>  Modified: llvm/trunk/include/llvm/ADT/**Statistic.h
>> URL: http://llvm.org/viewvc/llvm-**project/llvm/trunk/include/**
>> llvm/ADT/Statistic.h?rev=**176733&r1=176732&r2=176733&**view=diff<http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/ADT/Statistic.h?rev=176733&r1=176732&r2=176733&view=diff>
>> ==============================**==============================**
>> ==================
>> --- llvm/trunk/include/llvm/ADT/**Statistic.h (original)
>> +++ llvm/trunk/include/llvm/ADT/**Statistic.h Fri Mar  8 16:56:31 2013
>> @@ -51,7 +51,9 @@ public:
>>
>>     // Allow use of this class as the value itself.
>>     operator unsigned() const { return Value; }
>> -  const Statistic&operator=(unsigned Val) {
>> +
>> +#if !defined(NDEBUG) || defined(LLVM_ENABLE_STATS)
>> +   const Statistic&operator=(unsigned Val) {
>>
>>       Value = Val;
>>       return init();
>>     }
>>
>
> How does LLVM_ENABLE_STATS get defined? It isn't mentioned in config.h.inor config.h.cmake, and even if it were, Statistic.h doesn't include
> config.h.
>
> Nick
>

Hi Nick,

You're right that it's not part of config.h.  Right now, it would have to
be defined as part of the compile flags.  I was following LLVM_ENABLE_DUMP,
which isn't in config.h either =/

- Jan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20130309/1d45e509/attachment.html>


More information about the llvm-commits mailing list