[LLVMdev] -stats prints nothing, though something is expected
Rob Stewart
robstewart57 at gmail.com
Thu Feb 19 07:00:11 PST 2015
Hi Philip,
On Wed Feb 18 2015 at 10:11:32 PM Philip Reames <listmail at philipreames.com>
wrote:
> You are mostly likely using a Release build. -stats only does anything
> with Assertions enabled.
>
So to use the -stats flag, I must compile LLVM and clang from source, with
--enable-assertions ? That seems quite drastic just to see the printout of
statistics for each pass applied on my IR.
--
Rob
>
> On 02/18/2015 08:58 AM, Rob Stewart wrote:
>
> Given the program:
>
> int sum(int i,int j)
> { return i+j; }
>
> int main()
> { sum(3,2); }
>
> $ clang -S -emit-llvm foo.c
>
> Now I'd like to print all statistics. Unfortunately, the following
> prints nothing:
>
> $ opt -S -O3 -stats < foo.ll > /dev/null
>
> However, running the following prints an IR that is different to the
> contents of foo.ll:
>
> $ opt -S -O3 foo.ll
>
> I'm using LLVM 3.5. I'm doing something very obviously wrong. What is it?
>
> --
> Rob
>
>
> _______________________________________________
> LLVM Developers mailing listLLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.eduhttp://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20150219/8596ea3c/attachment.html>
More information about the llvm-dev
mailing list