[LLVMdev] What are all the LLVM IRs that will write into memory?
Reid Kleckner
reid.kleckner at gmail.com
Wed Jan 5 18:16:04 PST 2011
On Wed, Jan 5, 2011 at 7:03 PM, Chuck Zhao <czhao at eecg.toronto.edu> wrote:
> LLVMers,
>
> I need to intercept all LLVM IR instructions that will write into memory and
> start to do analysis on these instructions.
...
> Does that mean any LLVM IR that has a valid result field will be able to
> store the result into memory?
Yes, if the value ends up getting spilled to the stack.
> How about those temps allocated into registers via register allocation?
> Is there a way to tell such temps at compile time before RA?
No, I think you need to perform register allocation in order to know
about writes to the stack.
Are you doing a static analysis on the instructions or are you trying
to instrument all memory stores? If so, Pin and DynamoRIO seem like
better choices, unless you want to do a static instrumentation, in
which case I don't know what the right tool would be.
Reid
More information about the llvm-dev
mailing list