[LLVMdev] getTripCount()

Anthony Danalis adanalis at eecs.utk.edu
Sun Mar 8 13:15:42 PDT 2009


Hello,

   I'm writing a new function pass, and I'm having trouble with  
getTripCount() in Loop.  If I generate the bitcode for the test code  
with no optimization then getTripCount() returns NULL, but if I pass - 
O3 to the front-end then getTripCount() returns fine.  My phase calls  
addRequiredID(LoopSimplifyID) from getAnalysisUsage() and I also tried  
putting -mem2reg at the front of the arguments to opt as advised in
bug 2253 (http://llvm.org/bugs/show_bug.cgi?id=2253), but it still  
behaves the same.
Am I missing something, or is there a bug associated with  
getTripCount() ?

thanks,
Anthony



More information about the llvm-dev mailing list