soundness and precision of LazyValueInfo and ValueTracking

I've been testing LVI and getKnownBits() using this little custom pass:

   https://github.com/regehr/llvm-test-lvi

It rewrites the code to dynamically check that compile-time dataflow facts are sound. So far it hasn't turned up any errors, for example in SPEC CPU 2006.

On the other hand, its debugging output has found some pretty obvious room for improvement in the precision of LVI:

   https://llvm.org/bugs/show_bug.cgi?id=27433
   https://llvm.org/bugs/show_bug.cgi?id=27434

See also this earlier one:

   https://llvm.org/bugs/show_bug.cgi?id=27296

Would it make sense to make to add some code for printing the results of LVI and ValueTracking so that we can test for precision regressions?

John

From: "John Regehr via llvm-dev" <llvm-dev@lists.llvm.org>
To: llvm-dev@lists.llvm.org
Sent: Wednesday, April 20, 2016 7:21:56 AM
Subject: [llvm-dev] soundness and precision of LazyValueInfo and ValueTracking

I've been testing LVI and getKnownBits() using this little custom
pass:

   https://github.com/regehr/llvm-test-lvi

It rewrites the code to dynamically check that compile-time dataflow
facts are sound. So far it hasn't turned up any errors, for example
in
SPEC CPU 2006.

On the other hand, its debugging output has found some pretty obvious
room for improvement in the precision of LVI:

   https://llvm.org/bugs/show_bug.cgi?id=27433
   https://llvm.org/bugs/show_bug.cgi?id=27434

See also this earlier one:

   https://llvm.org/bugs/show_bug.cgi?id=27296

Would it make sense to make to add some code for printing the results
of
LVI and ValueTracking so that we can test for precision regressions?

I think it makes sense for these to be independently testable.

-Hal