[LLVMdev] help with qsort etc.

Chris Lattner sabre at nondot.org
Sun Apr 24 22:30:45 PDT 2005

On Mon, 25 Apr 2005, Abhijit Ray wrote:
> Hi,
> When you write a program which uses the "qsort()" library function, You also 
> have to provide an implementation of a compare
> funtion. Now when we convert our program into  bc and then execute it, I get 
> the number of times all basic blocks are executed.
> But since the comparison function is called from within the std function 
> "qsort()", I don't get the number of times the compare
> function is executed.
> Is there a way to get this information ?


Change the "#if 0" to "#if 1" in runtime/GCCLibraries/libc/qsort.c.

In that directory, run 'make; make install', then recompile your program.



More information about the llvm-dev mailing list