[LLVMdev] Conditional Predicate Extraction
Prabhat Kumar Saraswat
prabhat.saraswat at gmail.com
Wed Dec 19 02:49:47 PST 2007
I am working on the extraction of the conditional predicates from the
basic blocks using LLVM.
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.
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
The questions are:
1. Is it possible to somehow intersperse IR and highlevel code of the
program (in C or C++).
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.
Suggestions and answers are welcome.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the llvm-dev