Factor the calculation details for PostDomTree out of PostDominators.cpp and
[oota-llvm.git] / lib / Analysis / ValueNumbering.cpp
index 963ccb90f3ea7cacb9c3680d9c21b77789556318..bdb9422c238a5ed83809e755f3cae2762d830ab3 100644 (file)
@@ -22,6 +22,7 @@
 #include "llvm/Support/Compiler.h"
 using namespace llvm;
 
+char ValueNumbering::ID = 0;
 // Register the ValueNumbering interface, providing a nice name to refer to.
 static RegisterAnalysisGroup<ValueNumbering> X("Value Numbering");
 
@@ -51,6 +52,9 @@ namespace {
   ///
   struct VISIBILITY_HIDDEN BasicVN 
       : public ImmutablePass, public ValueNumbering {
+    static char ID; // Class identification, replacement for typeinfo
+    BasicVN() : ImmutablePass((intptr_t)&ID) {}
+
     /// getEqualNumberNodes - Return nodes with the same value number as the
     /// specified Value.  This fills in the argument vector with any equal
     /// values.
@@ -61,6 +65,7 @@ namespace {
                                      std::vector<Value*> &RetVals) const;
   };
 
+  char BasicVN::ID = 0;
   // Register this pass...
   RegisterPass<BasicVN>
   X("basicvn", "Basic Value Numbering (default GVN impl)");