How to identify loop header

I would like to know how one can identify whether a basic block is a loop
header?

Regards,
Ashutosh Shukla,
10305052
M. Tech 1
Dept of Computer Science and Engg.

LoopInfo::isLoopHeader(bb) from llvm/Analysis/LoopInfo.h.

I would like to know how one can identify whether a basic block is a loop
header?

I think the LoopInfo pass has a method to do this. Note that you'll probably want to run -loopsimplify first to put the loops into a canonical form.

-- John T.