Adjust the heuristics used to decide when SROA is likely to be profitable.
[oota-llvm.git] / lib / Transforms / IPO / DeadTypeElimination.cpp
index 18724bb9db313484eb07c5eb02e0448ba44efb6f..025d77e0c83dd73e69d75734715dbf103d8cf20e 100644 (file)
@@ -2,8 +2,8 @@
 //
 //                     The LLVM Compiler Infrastructure
 //
-// This file was developed by the LLVM research group and is distributed under
-// the University of Illinois Open Source License. See LICENSE.TXT for details.
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
 //
 //===----------------------------------------------------------------------===//
 //
@@ -25,6 +25,9 @@ STATISTIC(NumKilled, "Number of unused typenames removed from symtab");
 
 namespace {
   struct DTE : public ModulePass {
+    static char ID; // Pass identification, replacement for typeid
+    DTE() : ModulePass(&ID) {}
+
     // doPassInitialization - For this pass, it removes global symbol table
     // entries for primitive types.  These are never used for linking in GCC and
     // they make the output uglier to look at, so we nuke them.
@@ -39,9 +42,11 @@ namespace {
       AU.addRequired<FindUsedTypes>();
     }
   };
-  RegisterPass<DTE> X("deadtypeelim", "Dead Type Elimination");
 }
 
+char DTE::ID = 0;
+static RegisterPass<DTE> X("deadtypeelim", "Dead Type Elimination");
+
 ModulePass *llvm::createDeadTypeEliminationPass() {
   return new DTE();
 }