LoopInfo pass

Hello,

Apologies for a rather simple question -- I am trying to run the LoopInfo pass in my code (a standalone program that is not a pass itself), and I did this:

FunctionPassManager fpm(mod);
LoopInfo * li = new LoopInfo();
fpm.add(li);
fpm.run(fn);

but when I ran this on a simple program like:

int main (int argc, char * argv ) {
   int i, ret;
   for (i = 0; i < 10; ++i)

     ++ret;
   return ret;
}

The pass didn't generate any loop info. (I have checked the bytecode to make sure that the loop wasn't optimized away etc.) So I am wondering if I have invoked the pass incorrectly?

Thanks,
Alvin