[llvm-commits] [llvm] r50881 - /llvm/trunk/lib/Transforms/Scalar/JumpThreading.cpp

Chris Lattner sabre at nondot.org
Thu May 8 21:43:14 PDT 2008


Author: lattner
Date: Thu May  8 23:43:13 2008
New Revision: 50881

URL: http://llvm.org/viewvc/llvm-project?rev=50881&view=rev
Log:
restore doxygen comment.

Modified:
    llvm/trunk/lib/Transforms/Scalar/JumpThreading.cpp

Modified: llvm/trunk/lib/Transforms/Scalar/JumpThreading.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Scalar/JumpThreading.cpp?rev=50881&r1=50880&r2=50881&view=diff

==============================================================================
--- llvm/trunk/lib/Transforms/Scalar/JumpThreading.cpp (original)
+++ llvm/trunk/lib/Transforms/Scalar/JumpThreading.cpp Thu May  8 23:43:13 2008
@@ -9,23 +9,6 @@
 //
 // This file implements the Jump Threading pass.
 //
-// Jump threading tries to find distinct threads of control flow running through
-// a basic block. This pass looks at blocks that have multiple predecessors and
-// multiple successors.  If one or more of the predecessors of the block can be
-// proven to always cause a jump to one of the successors, we forward the edge
-// from the predecessor to the successor by duplicating the contents of this
-// block.
-//
-// An example of when this can occur is code like this:
-//
-//   if () { ...
-//     X = 4;
-//   }
-//   if (X < 3) {
-//
-// In this case, the unconditional branch at the end of the first if can be
-// revectored to the false side of the second if.
-//
 //===----------------------------------------------------------------------===//
 
 #define DEBUG_TYPE "jump-threading"
@@ -50,6 +33,22 @@
           cl::init(6), cl::Hidden);
 
 namespace {
+  /// This pass performs 'jump threading', which looks at blocks that have
+  /// multiple predecessors and multiple successors.  If one or more of the
+  /// predecessors of the block can be proven to always jump to one of the
+  /// successors, we forward the edge from the predecessor to the successor by
+  /// duplicating the contents of this block.
+  ///
+  /// An example of when this can occur is code like this:
+  ///
+  ///   if () { ...
+  ///     X = 4;
+  ///   }
+  ///   if (X < 3) {
+  ///
+  /// In this case, the unconditional branch at the end of the first if can be
+  /// revectored to the false side of the second if.
+  ///
   class VISIBILITY_HIDDEN JumpThreading : public FunctionPass {
   public:
     static char ID; // Pass identification





More information about the llvm-commits mailing list