[llvm-dev] Representations of IR in the output of opt

S├ębastien Michelland via llvm-dev llvm-dev at lists.llvm.org
Thu May 30 13:41:44 PDT 2019

Hello again,

> It may be desirable to sort the table before writing the bitcode out, 
> adding Peter to the thread for his opinion.

Thanks for this!

Now it seems I've been optimistic about this result. I have instrumented 
the test suite to check it on a wider amount of files and quickly 
discovered that it fails for larger optimization sequences.

In particular, the default -O3 set in which I'm interested is not 
reproduced easily. I'm attaching a script that demonstrates this.

It contains the extracted -O3 set in two groups, and checks that [opt 
-debug-pass=Arguments] reports the same sequences when called with -O3 
and the individual arguments. If a file name is provided, it also checks 
that the outputs are the same (or in our case, different).

Many real files fail to pass this test, for instance bilateral_grid.bc:


The diffs are very large even in text mode, and include lots of code.

I'm puzzled again. Any clue on the behavior of opt is very welcome. :)

S├ębastien Michelland
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not-associative.sh
Type: application/x-shellscript
Size: 4156 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20190530/67f4fbdf/attachment.bin>

More information about the llvm-dev mailing list