Displaying 1 result from an estimated 1 matches for "bb_count".
Did you mean:
b_count
2013 Apr 26
0
[LLVMdev] LLVM Profiler uses 32-bit counters for Basic Blocks?
...d more than ~4 Billion (i.e. 2^32) times. Apparently the internal
counters used within this profiler have only 32 bits as evidenced by the
following simple example:
//test.c
#include "stdio.h"
#include "stdlib.h"
int main(int argc, char **argv)
{
unsigned long i;
unsigned long bb_count=0;
for(i=0;i<4294967296;i++)
{
bb_count++;
}
fprintf(stdout,"BB count: %ld\n",bb_count);
return 0;
}
$ clang -O0 -mllvm -disable-llvm-optzns test.c -emit-llvm -c -o test.bc
$ profile.pl test.bc
BB count: 4294967296
===-----------------------------------------------------------------...