Listing all loops in a function

Hi,
      I am new to LLVM. I want to go through all loops in a function. I see
that there is a LoopPass manager that I can use. But that is not much of
help, as I want to get the order of loops in CallGraphSCC order, hence I
visit each function and then just want to go over the loops.

Regards,

Prasenjit Chakraborty
Performance Modeling and Analysis
IBM Systems & Technology Lab

Hi Prasenjit,

In a limited scope that we needed this kind of a method, we added dummy functions to the header of every loop and then generated the call graph for the module and we then traverse the call graph. I m not really sure if this will work for u , but it did do the limited job we were interested in.

–Aparna

Graduate Student
University of Maryland, College Park