[SROA] Add a debugging tool which shuffles the slices sequence prior to
authorChandler Carruth <chandlerc@gmail.com>
Tue, 25 Feb 2014 03:59:29 +0000 (03:59 +0000)
committerChandler Carruth <chandlerc@gmail.com>
Tue, 25 Feb 2014 03:59:29 +0000 (03:59 +0000)
commiteb1b5ba880cbbc5aab1064c2ad0a95c8ca253de8
treedc27540f371e96e18b9ca7b8f11fbbfeea77558b
parent2516e7fb22773bb841a63c64f31fd259620b7b77
[SROA] Add a debugging tool which shuffles the slices sequence prior to
sorting it. This helps uncover latent reliance on the original ordering
which aren't guaranteed to be preserved by std::sort (but often are),
and which are based on the use-def chain orderings which also aren't
(technically) guaranteed.

Only available in C++11 debug builds, and behind a flag to prevent noise
at the moment, but this is generally useful so figured I'd put it in the
tree rather than keeping it out-of-tree.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202106 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Transforms/Scalar/SROA.cpp