[LLVMdev] What are all the LLVM IRs that will write into memory?
Chuck Zhao
czhao at eecg.toronto.edu
Wed Jan 5 18:03:45 PST 2011
LLVMers,
I need to intercept all LLVM IR instructions that will write into memory
and start to do analysis on these instructions.
In addition to StoreInst, what are all other IRs that will write into
memory?
E.g.
char * ptr = malloc(...);
///...
//with use(s) of ptr later
The LLVM IR for the above code would be:
%0 = tail call noalias i8* @malloc(i32 137) nounwind
///...
// use(s) of %0
LLVM's Language Reference has the instruction format for CallInst:
<result> = [tail] call [cconv <http://llvm.org/docs/LangRef.html#callingconv>] [ret attrs <http://llvm.org/docs/LangRef.html#paramattrs>]<ty> [<fnty>*]<fnptrval>(<function args>) [fn attrs <http://llvm.org/docs/LangRef.html#fnattrs>]
Does that mean any LLVM IR that has a valid result field will be able to
store the result into memory?
How about those temps allocated into registers via register allocation?
Is there a way to tell such temps at compile time before RA?
Thank you very much
Chuck
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20110105/b08d1d27/attachment.html>
More information about the llvm-dev
mailing list