[LLVMdev] LLVM bytecode simulator/emulator?

Chris Lattner sabre at nondot.org
Fri Jul 14 10:43:20 PDT 2006


On Fri, 14 Jul 2006, Kenneth Hoste wrote:
> That sounds indeed like what I want to do, but... I want the library 
> functions (for example printf), to be counted aswell. I.e., I don't make any 
> distinction between program code and library code. This is essential for me, 
> because I need the analysis of the program to predict/estimate performance, 
> and that's quite hard, if not impossible, without taking the library count 
> into account.

You can certainly do that.  First step is to find source for these 
functions and compile them to LLVM bytecode.  Only once you do that can 
you link the bytecode together.

> Maybe it's possible using the lli interpreter (which is a lot slower, I 
> know), instead of the analyze tool?

No, they both have the same scope: all the code compiled to llvm bytecode. 
Neither can inspect native system code.

-Chris

-- 
http://nondot.org/sabre/
http://llvm.org/



More information about the llvm-dev mailing list