[cfe-dev] Code Transformations and using llvm with clang
George Patsilaras
gpatsilaras at hotmail.com
Thu Mar 12 22:37:03 PDT 2009
Hello list,
I am new to LLVM and have very limited knowledge on clang so I would to ask some questions.
1st question: Is there anyway to use the clang uninitialized variable detection analysis with a llvm pass? If not, can I write a clang transformation that takes some C code and outputs C code in order to be able to use some of llvm's existing passes?
2nd question: Part of the project I am working on is to insert a monitor function call in the code. Can anyone point me to an example of such a code transformation using clang?
An example of what I m trying to do is this:
int foo(int y){
int x = 10;
return x;
}
and I would like to transform it to:
int foo(int y){
int x;
monitor (&x);
return x;
}
3rd question: Can clang use passes written for llvm (for example the anderson alias analysis pass)?
I feel like llvm has parts of what I need to use for my project and clang has some more advanced things (uninitialized variable detection) that I would have to implement otherwise in llvm so I am trying to see if there is anyway to combine some of these analysis tools.
Thanks,
George
_________________________________________________________________
HotmailĀ® is up to 70% faster. Now good news travels really fast.
http://windowslive.com/online/hotmail?ocid=TXT_TAGLM_WL_HM_70faster_032009
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20090313/52e5059b/attachment.html>
More information about the cfe-dev
mailing list