[LLVMdev] Counting instructions
Kyller Costa GorgĂ´nio
kyllercg at kyllercg.net
Wed Feb 6 12:17:47 PST 2008
I'm not quite sure Chris. But I think Raul only wanna to execute some
specific instruction about every X instructions. He probably don't
need to modify the instruction generated, but only to count the number
of machine instructions and execute something after. Am I right Raul?
I believe he is trying to do that at the JIT level. These where my two
bits.... :)
In time, I don't know the answer for his question.
cheers
kyller
On 2/5/08, Chris Lattner <sabre at nondot.org> wrote:
> On Tue, 5 Feb 2008, Raul Fernandes Herbster wrote:
> > I need to instrument the code in order to generate an event (call a certain
> > function) whenever X instructions have been executed. I'm using
> > MachineFunctionPass to get machine-dependent representation of each LLVM
> > function in the program. However, such pass doesn't allow to modify such
> > functions. Is there any other class so I can modify MachineFunctions?
>
> I'm not sure I follow here: you want to insert your instrumentation at the
> machine code level, but you want to change the llvm ir? Once the
> instruction selection phase converts from llvm ir to machine code, the
> LLVM IR is mostly ignored. Changing it won't cause a change in the
> generated code.
>
> -Chris
>
> --
> http://nondot.org/sabre/
> http://llvm.org/
> _______________________________________________
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
>
--
|_|0|_|
|_|_|0|
|0|0|0|
More information about the llvm-dev
mailing list