Re: Help regarding llvm tool

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Re: Help regarding llvm tool

Misha Brukman-2
On Fri, Jul 22, 2005 at 04:07:40PM -0700, Murali Krishna Nethi wrote:
> I have downloaded and installed llvm for research on compilers and
> code generation. I wante d to know if the llvm-tv was not a part of
> CVS distribution? I have downloaded llvm however, the tool llvm-tv is
> missing. could you point me to a website where I could download it?

LLVM distributions do not contain LLVM-TV.  There are no releases of
LLVM-TV as of yet, the only way to get it is via CVS.  Use the same
directions as for checking out LLVM, except run "cvs co llvm-tv" where
the document says "cvs co llvm".  The document is "Getting Started
Guide" under http://llvm.cs.uiuc.edu/docs/ .

If you have issues compiling or using llvm-tv, please email
[hidden email] .

Thanks,
--
Misha Brukman :: http://misha.brukman.net :: http://llvm.cs.uiuc.edu

_______________________________________________
LLVM Developers mailing list
[hidden email]         http://llvm.cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
Reply | Threaded
Open this post in threaded view
|

Re: Help regarding llvm tool

Misha Brukman-2
Murali,

Please send LLVM questions to [hidden email] .

On Mon, Jul 25, 2005 at 02:41:10PM -0400, Murali Krishna Nethi wrote:

> Thanks for your reply. I was able to download llvm-tv using the
> directions that you had provided to me.
>
> I have read the whole documentation of llvm yet, have simple question
> about llvm.
>
> I was trying to analyse a simple hello.c program with llvm.  i used
> llvm-gcc to generate the .bc file and output file. I am trying to use
> it to generate instruction counts, stats, basic block instruction
> count and identification of natural loops in the program.
>
> I used command analyze -instcount hello.bc. however, the outp[ut it
> generates is "printing analyzis 'counts the various types of
> instructions' for function 'main' :"
>
> It does not give me any further details. could you help me as to how
> to configure the tool to obtain the stats. I truly appreciate your
> help in this reagrd.

By itself, an analysis does not print out the stats it gathers, because
many passes collect statistics, but we don't want to show statistics for
all passes all the time while we're compiling (that's a LOT of stats!)

So, you need to specify the -stats flag to get a summary statistic
printout:

% analyze -instcount -stats hello.bc
Printing analysis 'Counts the various types of Instructions' for function 'main':
===-------------------------------------------------------------------------===
                          ... Statistics Collected ...
===-------------------------------------------------------------------------===

1 instcount - Number of Call insts
1 instcount - Number of Ret insts
1 instcount - Number of memory instructions
1 instcount - Number of non-external functions
1 instcount - Number of basic blocks
2 instcount - Number of instructions (of all types)

This should probably be documented as requiring the -stats flag to be
passed in to print out stats.
 
--
Misha Brukman :: http://misha.brukman.net :: http://llvm.cs.uiuc.edu

_______________________________________________
LLVM Developers mailing list
[hidden email]         http://llvm.cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev