Thanks cedric, <br><br> I will look into the ways the debug information could be used. <br><br> However, it seems like i would have to write a piece of code that would successively reduce the conditional predicate in terms of the local and global variables (of the code). I plan to do it like this. 
<br><br>Since i am using a runonBasicblock pass, the context information between two basic blocks cannot be shared, since the pass runs on each basic block at a time. So the idea is to print the output of the pass into a database (a text file). This database is then parsed to populate a prefix tree, where the nodes are the temporary variables and llvm opcodes. This tree would be consumed to eliminate the temporary variables and replace the opcodes by an expression in a c like format (infix arithmetic notation ). 
<br><br>Since in the begining of each basic block the local/global variables are loaded into temporary variables, it is understood that the expression would be in terms of these local/global variables since the temporary variables would have been already consumed by the aforementioned process.
<br><br>How does it sound like? Is it possible for the llvm-gcc to emit the bitcode in a form which is close to the source language (atleast the variable names). Are there some optimizations possible ?<br><br>Thanks alot 
<br><br>Regards<br>Prabhat<br><br><div class="gmail_quote">On Dec 19, 2007 7:32 PM, Cédric Venet <<a href="mailto:cedric.venet@laposte.net">cedric.venet@laposte.net</a>> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div class="Ih2E3d">> The questions are:<br>> 1. Is it possible to somehow intersperse IR and highlevel code of the<br>program (in C or C++).<br><br></div><div class="Ih2E3d">> Suggestions and answers are welcome.
<br><br></div>You can probably use debug information (generated by llvm gcc on intrinsic<br>form, see MachineModuleInfo.h) to identify the source ligne for a condition<br>and the relation between the temporary llvm variable and the high level
<br>language variable.<br><br>Perharps it isn't very reliable but I don't see other solution with llvm.<br>(But I am just a novice).<br><br>If you are just doing flow graph analysis, you can consider doing it at the
<br>C/C++ level. Clang (which only support most of C at the moment) as a little<br>framework for this kind of analysis and it will probably be expended.<br><br>Just my 2cents<br><br>Regards,<br><font color="#888888"><br>--
<br>Cédric<br><br><br>_______________________________________________<br>LLVM Developers mailing list<br><a href="mailto:LLVMdev@cs.uiuc.edu">LLVMdev@cs.uiuc.edu</a>         <a href="http://llvm.cs.uiuc.edu" target="_blank">
http://llvm.cs.uiuc.edu</a><br><a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev</a><br></font></blockquote></div><br>