IPO: Add use-list-order verifier
authorDuncan P. N. Exon Smith <dexonsmith@apple.com>
Fri, 25 Jul 2014 14:49:26 +0000 (14:49 +0000)
committerDuncan P. N. Exon Smith <dexonsmith@apple.com>
Fri, 25 Jul 2014 14:49:26 +0000 (14:49 +0000)
commit7bf73bd378b900db725820c17ff67460143f7024
treec0318a734cd0d00ef60a9dd791da414019b3a9b5
parentdb4f73f6d993e4a99280c9ed093a84047ecb3553
IPO: Add use-list-order verifier

Add a -verify-use-list-order pass, which shuffles use-list order, writes
to bitcode, reads back, and verifies that the (shuffled) order matches.

  - The utility functions live in lib/IR/UseListOrder.cpp.

  - Moved (and renamed) the command-line option to enable writing
    use-lists, so that this pass can return early if the use-list orders
    aren't being serialized.

It's not clear that this pass is the right direction long-term (perhaps
a separate tool instead?), but short-term it's a great way to test the
use-list order prototype.  I've added an XFAIL-ed testcase that I'm
hoping to get working pretty quickly.

This is part of PR5680.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@213945 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/IR/UseListOrder.h [new file with mode: 0644]
include/llvm/InitializePasses.h
include/llvm/LinkAllPasses.h
include/llvm/Transforms/IPO.h
lib/Bitcode/Writer/BitcodeWriter.cpp
lib/IR/CMakeLists.txt
lib/IR/UseListOrder.cpp [new file with mode: 0644]
lib/Transforms/IPO/CMakeLists.txt
lib/Transforms/IPO/IPO.cpp
lib/Transforms/IPO/VerifyUseListOrder.cpp [new file with mode: 0644]
test/Bitcode/use-list-order.ll [new file with mode: 0644]