[LLVMdev] instrument a byte code with llvm

John Criswell criswell at illinois.edu
Tue Apr 5 09:30:10 PDT 2011


On 4/5/11 11:22 AM, Nabila ABDESSAIED wrote:
> hi,
> I'm newer in llvm
> i would like to instrument a byte code with a pass and as a result i 
> would like to get an instrumented byte code.

To rephrase, you want to instrument a program so that, when you run it, 
it computes the number of instructions executed at run-time.  Is this 
correct?

By number of instructions, do you mean LLVM instructions or native code 
instructions?

> i would like that a pass add a method (which calculate the number of 
> instructions) in the end of each block.
> the instrumented code should contain in each block a method that 
> calculate the number of instructions

Have you read the documentation from the web site:

How to Write an LLVM Pass
LLVM Programmer's Manual
LLVM Language Reference Manual (you just need to skim it to get a basic 
understanding of what the IR looks like)

-- John T.

> Please Help me
> thank you
>
>
> -- 
> Nabila ABDESSAIED
> Tel     : (+216) 22 473 385 / (+216) 55 744 625
> Email : nabila.abdessaied at gmail.com <mailto:nabila.abdessaied at gmail.com>
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20110405/659c2405/attachment.html>


More information about the llvm-dev mailing list