[LLVMdev] getSmallConstantTripCount problem
Duncan Sands
baldrick at free.fr
Thu Apr 28 07:13:13 PDT 2011
Hi Bo,
> In my pass, I add LoopInfo as a required pass. Then I'd like to print the
> constant loop trip count of each loop if it has one. However, every time I call
> loop->
> getSmallConstantTripCount(), it returns 0, even for a very simple loop: for(i=0;
> i<3; ++i) {;} What's the possible cause of this problem?
this comes up regularly, so search the mailing list archives. IIRC, you need to
run some other passes first: mem2reg and probably some others I forget.
Ciao, Duncan.
More information about the llvm-dev
mailing list