Fix typo that changed the logic to something wrong.
[oota-llvm.git] / lib / Transforms / Scalar / GCSE.cpp
index 39a1b257258073a123d797f30df865593bae909d..94cdcb1400f1bc34c83ce4b3b72e6a6a9b9a104a 100644 (file)
@@ -9,9 +9,12 @@
 //
 // This pass is designed to be a very quick global transformation that
 // eliminates global common subexpressions from a function.  It does this by
-// using an existing value numbering implementation to identify the common
+// using an existing value numbering analysis pass to identify the common
 // subexpressions, eliminating them when possible.
 //
+// This pass is deprecated by the Global Value Numbering pass (which does a
+// better job with its own value numbering).
+//
 //===----------------------------------------------------------------------===//
 
 #define DEBUG_TYPE "gcse"
@@ -52,11 +55,12 @@ namespace {
       AU.addRequired<ValueNumbering>();
     }
   };
-
-  char GCSE::ID = 0;
-  RegisterPass<GCSE> X("gcse", "Global Common Subexpression Elimination");
 }
 
+char GCSE::ID = 0;
+static RegisterPass<GCSE>
+X("gcse", "Global Common Subexpression Elimination");
+
 // createGCSEPass - The public interface to this file...
 FunctionPass *llvm::createGCSEPass() { return new GCSE(); }