[LLVMdev] Statistic API change

Chris Lattner sabre at nondot.org
Tue Dec 19 15:21:02 PST 2006

FYI.  I just changed how statistics are defined.  This eliminates one 
static constructor for each statistic in the system, causing them to be 
statically initalized instead.  To update any out of tree code, change 

Statistic foo("blah", "desc");


#define DEBUG_TYPE "blah"   // before any #includes
STATISTIC(foo, "desc");

Statistics are now implicitly declared static, so they can be moved out of 
anonymous namespaces and don't need explicit static qualifiers.

Lemme know if there are any questions.  I will most likely be making 
similar changes for pass registration and command line options in the 
near future.



More information about the llvm-dev mailing list