[LLVMdev] getTripCount requires which optimization passes?
ether zhhb
etherzhhb at gmail.com
Thu May 6 18:32:41 PDT 2010
hi,
On Fri, May 7, 2010 at 8:59 AM, Trevor Harmon <Trevor.W.Harmon at nasa.gov>wrote:
> Hi,
>
> For me, getTripCount always returns null, even for trivial loops such
> as:
>
> void simple(int j) {
> for (int i = 0; i < 10; i++) {
> j++;
> }
> }
>
> Looking through the mailing list archive, it appears that getTripCount
> requires certain optimization passes to run first, but it's not clear
> which ones. There doesn't seem to be any documentation on this. Does
> anybody know exactly which passes must run in order for getTripCount
> to work?
>
As the comment said:
/// The IndVarSimplify pass transforms loops to have a form that this
/// function easily understands.
you could try -indvars.
>
> Thanks,
>
> Trevor
>
> _______________________________________________
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
>
best regards
ether
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20100507/1b26a0b9/attachment.html>
More information about the llvm-dev
mailing list