summaryrefslogtreecommitdiff
path: root/lib/Transforms/Scalar/Reassociate.cpp
diff options
context:
space:
mode:
authorDuncan Sands <baldrick@free.fr>2012-05-26 07:47:48 +0000
committerDuncan Sands <baldrick@free.fr>2012-05-26 07:47:48 +0000
commit24dfa52fa20eee39440e5dec4d23359e5a6773c7 (patch)
tree38f5b29ba9e7d3aee145e0a6fd3467e496b68786 /lib/Transforms/Scalar/Reassociate.cpp
parentc7a884040e4ec7795515978a94803894ad08c4ca (diff)
downloadllvm-24dfa52fa20eee39440e5dec4d23359e5a6773c7.tar.gz
llvm-24dfa52fa20eee39440e5dec4d23359e5a6773c7.tar.bz2
llvm-24dfa52fa20eee39440e5dec4d23359e5a6773c7.tar.xz
Move this debug statement earlier so it is easy to see the order in
which operands come flying out of the linearization stage. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@157512 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms/Scalar/Reassociate.cpp')
-rw-r--r--lib/Transforms/Scalar/Reassociate.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/Transforms/Scalar/Reassociate.cpp b/lib/Transforms/Scalar/Reassociate.cpp
index 91a16c0d63..7a9a41c950 100644
--- a/lib/Transforms/Scalar/Reassociate.cpp
+++ b/lib/Transforms/Scalar/Reassociate.cpp
@@ -1446,6 +1446,8 @@ Value *Reassociate::ReassociateExpression(BinaryOperator *I) {
SmallVector<ValueEntry, 8> Ops;
LinearizeExprTree(I, Ops);
+ DEBUG(dbgs() << "RAIn:\t"; PrintOps(I, Ops); dbgs() << '\n');
+
// Now that we have linearized the tree to a list and have gathered all of
// the operands and their ranks, sort the operands by their rank. Use a
// stable_sort so that values with equal ranks will have their relative
@@ -1454,8 +1456,6 @@ Value *Reassociate::ReassociateExpression(BinaryOperator *I) {
// the vector.
std::stable_sort(Ops.begin(), Ops.end());
- DEBUG(dbgs() << "RAIn:\t"; PrintOps(I, Ops); dbgs() << '\n');
-
// OptimizeExpression - Now that we have the expression tree in a convenient
// sorted form, optimize it globally if possible.
if (Value *V = OptimizeExpression(I, Ops)) {