Hi all, <br>  I am working on the extraction of the conditional predicates from the basic blocks using LLVM. <br><br>I have written a pass using which i am able to extract the conditional as well as unconditional branch instructions corresponding to different basic blocks. I have written a separate tool to extract the control flow graph (granularity of the level of basic blocks). Now i have to extract the conditions from the IR which causes the branching. 
<br><br>Now, these predicate are in terms of conditions involving temporary variables (llvm specific), in order to maintain consistent behaviour when using this information with anyother simulator, it would be better if these predicates have syntax very similar (or exactly) as that of the high level language.
<br><br>The questions are:<br>1. Is it possible to somehow intersperse IR and highlevel code of the program (in C or C++).<br>2. Is it possible to incorporate some optimizations using llvm-gcc to make the generated IR very close to the high level language, without affecting the branch information.
<br><br>Suggestions and answers are welcome.<br><br>Regards<br>Prabhat<br><br>