[llvm-dev] Replace "while" "for" loops with "If-Else"

Shen Liu via llvm-dev llvm-dev at lists.llvm.org
Sat Oct 21 22:51:10 PDT 2017


Hi everyone,

I hope to implement a feature to transform an IR with "while" or "for"
loops to a new IR with no loop. Instead, I just want to use if-else
statements in the new IR to implement the original semantics.

I can easily write a transform pass to handle the 1-level loop case, but
for nested loops it seems a little harder.

Can you show me some hints? Thank you very much!

Best regards,

Shen
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20171022/66ced890/attachment.html>


More information about the llvm-dev mailing list