[LLVMdev] How to transform loop to if-else using LLVM?

zhiyuan yang sjtu.yzy at gmail.com
Tue Apr 16 21:28:32 PDT 2013


Hello everyone,

Sorry to bother you. I'm an undergraduate, and I'm trying to finish my
graduation project using LLVM. In this project, I hope to transform all
loop in program to condition statement. For example,
Before transformation: for (int i = 0; i < 5; i++) a++;
After transformation: int i = 0; if (i < 5) a++; i++;
The idea is very clear, however, I'm a newbie to LLVM. After read code of
some LLVM's transformation, I still have no idea of how to implement this
idea.
Hope you can give me some hint. Thank you very much!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20130417/d7850ae3/attachment.html>


More information about the llvm-dev mailing list