Move this debug statement earlier so it is easy to see the order in
authorDuncan Sands <baldrick@free.fr>
Sat, 26 May 2012 07:47:48 +0000 (07:47 +0000)
committerDuncan Sands <baldrick@free.fr>
Sat, 26 May 2012 07:47:48 +0000 (07:47 +0000)
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

lib/Transforms/Scalar/Reassociate.cpp

index 91a16c0d63ef79b9f9b3cfde5597da6badd8775d..7a9a41c950a49b775e282c3b56ea7d68a0bd55fa 100644 (file)
@@ -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)) {