No getSmallConstantTripCount function in current LLVM version

Hi,

I cannot find the getSmallConstantTripCount function in the current LLVM. Can anyone tell me whether there is still such a function to get the trip count in LLVM?

Thank you very much.

Best,
Han

Hi Han Li,

     AU.addRequired<ScalarEvolution>();
     AU.addPreserved<ScalarEvolution>();

    ScalarEvolution *SE = &getAnalysis<ScalarEvolution>();
    SE->getSmallConstantTripCount(L, ExitingBlock);

If you only want to handle single exit loops then:
   ExitingBlock = L->getExitingBlock()

-Andy