[LLVMdev] -stats prints nothing, though something is expected

Rob Stewart robstewart57 at gmail.com
Wed Feb 18 08:58:51 PST 2015


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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20150218/d78731f6/attachment.html>


More information about the llvm-dev mailing list