diff options
author | Chris Lattner <sabre@nondot.org> | 2008-05-09 04:43:13 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2008-05-09 04:43:13 +0000 |
commit | 94019f8e064bf84085b44c35ab0c1efb76fb94f7 (patch) | |
tree | 6d4b7563d783facc7222f814239ee582e33b0c73 | |
parent | 90dcff71902ad0d3b3d92b26cce2b9b11bea7ff8 (diff) |
restore doxygen comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50881 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | lib/Transforms/Scalar/JumpThreading.cpp | 33 |
1 files changed, 16 insertions, 17 deletions
diff --git a/lib/Transforms/Scalar/JumpThreading.cpp b/lib/Transforms/Scalar/JumpThreading.cpp index 964fe90c46..991b11110b 100644 --- a/lib/Transforms/Scalar/JumpThreading.cpp +++ b/lib/Transforms/Scalar/JumpThreading.cpp @@ -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 @@ Threshold("jump-threading-threshold", 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 |