restore doxygen comment.

llvm-svn: 50881
This commit is contained in:
Chris Lattner 2008-05-09 04:43:13 +00:00
parent 63b6127a73
commit e7f0afe168
1 changed files with 16 additions and 17 deletions

View File

@ -9,23 +9,6 @@
// //
// This file implements the Jump Threading pass. // 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" #define DEBUG_TYPE "jump-threading"
@ -50,6 +33,22 @@ Threshold("jump-threading-threshold",
cl::init(6), cl::Hidden); cl::init(6), cl::Hidden);
namespace { 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 { class VISIBILITY_HIDDEN JumpThreading : public FunctionPass {
public: public:
static char ID; // Pass identification static char ID; // Pass identification