I want to get the results of ScalarEvolution analysis in a Function pass in order to get the tripcount for each loop.
I tried running this code:
llvm::ScalarEvolutionWrapperPass sewp = llvm::ScalarEvolutionWrapperPass();
llvm::ScalarEvolution &se = sewp.getSE();
unsigned tripcount = se.getSmallConstantTripCount(loop);
but getSE returns NULL.
Can anybody help?