[llvm-dev] Find loops in LLVM bytecode
Jia-Ju Bai via llvm-dev
llvm-dev at lists.llvm.org
Tue Sep 22 17:22:38 PDT 2015
I want to find simple loops in LLVM bytecode, and extract the basic
information of the loop.
for (i=0; i<1000; i++)
sum += i;
I want to extract the bound [0, 1000), the loop variable "i" and the
loop body (sum += i).
What should I do?
I read the LLVM API document, and find some useful classes like "Loop",
But I do not know how to use them in detail.
Could you please give me some help? A detailed usage may be more helpful.
More information about the llvm-dev