diff options
author | Chris Lattner <sabre@nondot.org> | 2001-06-25 03:55:37 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2001-06-25 03:55:37 +0000 |
commit | 53b1c0161d7fb6e8eb4bd1c49114a5cf57258364 (patch) | |
tree | 238404d6f47b30f208e0d0ef98eeaf5d7e6badc8 | |
parent | 23e36625a278c08d4d8a21dd9df1f302b216de27 (diff) |
A silly stupid test of the loop depth calculator was added. REMOVE in the
future.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | lib/Transforms/Scalar/InductionVars.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/lib/Transforms/Scalar/InductionVars.cpp b/lib/Transforms/Scalar/InductionVars.cpp index bd3bc1129e..206938bfa9 100644 --- a/lib/Transforms/Scalar/InductionVars.cpp +++ b/lib/Transforms/Scalar/InductionVars.cpp @@ -322,12 +322,23 @@ static bool ProcessIntervalPartition(cfg::IntervalPartition &IP) { ptr_fun(ProcessInterval)); } +#include "llvm/Analysis/LoopDepth.h" // DoInductionVariableCannonicalize - Simplify induction variables in loops. // This function loops over an interval partition of a program, reducing it // until the graph is gone. // bool DoInductionVariableCannonicalize(Method *M) { + if (1) { // Print basic blocks with their depth + LoopDepthCalculator LDC(M); + for (Method::iterator I = M->getBasicBlocks().begin(); + I != M->getBasicBlocks().end(); ++I) { + cerr << "Basic Block Depth: " << LDC.getLoopDepth(*I) << *I; + } + + } + + cfg::IntervalPartition *IP = new cfg::IntervalPartition(M); bool Changed = false; |