Move the deadargelim code for intrinsically alive functions into its own
[oota-llvm.git] / lib / Analysis / ProfileInfoLoaderPass.cpp
index 12b18f736c25461f3c3e279b0288ff2ac5c162b1..b2fa9e45e71759d85979c8794a2cc0165fc90b40 100644 (file)
 #include "llvm/Support/Streams.h"
 using namespace llvm;
 
-namespace {
-  cl::opt<std::string>
-  ProfileInfoFilename("profile-info-file", cl::init("llvmprof.out"),
-                      cl::value_desc("filename"),
-                      cl::desc("Profile file loaded by -profile-loader"));
+static cl::opt<std::string>
+ProfileInfoFilename("profile-info-file", cl::init("llvmprof.out"),
+                    cl::value_desc("filename"),
+                    cl::desc("Profile file loaded by -profile-loader"));
 
+namespace {
   class VISIBILITY_HIDDEN LoaderPass : public ModulePass, public ProfileInfo {
     std::string Filename;
   public:
     static char ID; // Class identification, replacement for typeinfo
     explicit LoaderPass(const std::string &filename = "")
-      : ModulePass((intptr_t)&ID, true), Filename(filename) {
+      : ModulePass((intptr_t)&ID), Filename(filename) {
       if (filename.empty()) Filename = ProfileInfoFilename;
     }
 
@@ -49,13 +49,13 @@ namespace {
     /// run - Load the profile information from the specified file.
     virtual bool runOnModule(Module &M);
   };
+}  // End of anonymous namespace
 
-  char LoaderPass::ID = 0;
-  RegisterPass<LoaderPass>
-  X("profile-loader", "Load profile information from llvmprof.out");
+char LoaderPass::ID = 0;
+static RegisterPass<LoaderPass>
+X("profile-loader", "Load profile information from llvmprof.out", false, true);
 
-  RegisterAnalysisGroup<ProfileInfo> Y(X);
-}  // End of anonymous namespace
+static RegisterAnalysisGroup<ProfileInfo> Y(X);
 
 ModulePass *llvm::createProfileLoaderPass() { return new LoaderPass(); }