[llvm-commits] [llvm] r157512 - /llvm/trunk/lib/Transforms/Scalar/Reassociate.cpp
Duncan Sands
baldrick at free.fr
Sat May 26 00:47:48 PDT 2012
Author: baldrick
Date: Sat May 26 02:47:48 2012
New Revision: 157512
URL: http://llvm.org/viewvc/llvm-project?rev=157512&view=rev
Log:
Move this debug statement earlier so it is easy to see the order in
which operands come flying out of the linearization stage.
Modified:
llvm/trunk/lib/Transforms/Scalar/Reassociate.cpp
Modified: llvm/trunk/lib/Transforms/Scalar/Reassociate.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Scalar/Reassociate.cpp?rev=157512&r1=157511&r2=157512&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/Scalar/Reassociate.cpp (original)
+++ llvm/trunk/lib/Transforms/Scalar/Reassociate.cpp Sat May 26 02:47:48 2012
@@ -1446,6 +1446,8 @@
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 @@
// 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)) {
More information about the llvm-commits
mailing list