Loop identification algorithm

Hi all,

Can anyone tell which loop identification algorithm is used in LLVM and what is its time complexity ?

Thanks,
Siddharth