Revert r177543: Add timing of the IR parsing code with a new
authorChandler Carruth <chandlerc@gmail.com>
Fri, 22 Mar 2013 02:20:34 +0000 (02:20 +0000)
committerChandler Carruth <chandlerc@gmail.com>
Fri, 22 Mar 2013 02:20:34 +0000 (02:20 +0000)
-time-ir-parsing flag

This breaks the layering of the Support library. We can't add an
implementation side to IRReader because it refers directly to entities
only accessible as part of the IR, AsmParser, and BitcodeReader
libraries. It can only be used in a context where all of those libraries
will be available.

We'll need to find some other way to get this functionality, and
hopefully solve the long-standing layering problem of IRReader.h...

llvm-svn: 177695

llvm/include/llvm/Support/IRReader.h
llvm/lib/Support/CMakeLists.txt
llvm/lib/Support/IRReader.cpp [deleted file]

index c3ee3ed..6d8a9b3 100644 (file)
@@ -25,7 +25,6 @@
 #include "llvm/Support/MemoryBuffer.h"
 #include "llvm/Support/SourceMgr.h"
 #include "llvm/Support/system_error.h"
-#include "llvm/Support/Timer.h"
 
 namespace llvm {
 
@@ -70,10 +69,6 @@ namespace llvm {
     return getLazyIRModule(File.take(), Err, Context);
   }
 
-  extern const char *TimeIRParsingGroupName;
-  extern const char *TimeIRParsingName;
-  extern bool TimeIRParsingIsEnabled;
-
   /// If the given MemoryBuffer holds a bitcode image, return a Module
   /// for it.  Otherwise, attempt to parse it as LLVM Assembly and return
   /// a Module for it. This function *always* takes ownership of the given
@@ -81,8 +76,6 @@ namespace llvm {
   inline Module *ParseIR(MemoryBuffer *Buffer,
                          SMDiagnostic &Err,
                          LLVMContext &Context) {
-    NamedRegionTimer T(TimeIRParsingName, TimeIRParsingGroupName,
-                       TimeIRParsingIsEnabled);
     if (isBitcode((const unsigned char *)Buffer->getBufferStart(),
                   (const unsigned char *)Buffer->getBufferEnd())) {
       std::string ErrMsg;
index f661249..5ba69fc 100644 (file)
@@ -27,7 +27,6 @@ add_llvm_library(LLVMSupport
   IntEqClasses.cpp
   IntervalMap.cpp
   IntrusiveRefCntPtr.cpp
-  IRReader.cpp
   IsInf.cpp
   IsNAN.cpp
   Locale.cpp
diff --git a/llvm/lib/Support/IRReader.cpp b/llvm/lib/Support/IRReader.cpp
deleted file mode 100644 (file)
index 1dc56dd..0000000
+++ /dev/null
@@ -1,21 +0,0 @@
-//===- IRReader.cpp - Reader for LLVM IR files ----------------------------===//
-//
-//                     The LLVM Compiler Infrastructure
-//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
-//
-//===----------------------------------------------------------------------===//
-
-#include "llvm/Support/CommandLine.h"
-#include "llvm/Support/IRReader.h"
-using namespace llvm;
-
-const char *llvm::TimeIRParsingGroupName = "LLVM IR Parsing";
-const char *llvm::TimeIRParsingName = "Parse IR";
-
-bool llvm::TimeIRParsingIsEnabled = false;
-static cl::opt<bool,true>
-EnableTimeIRParsing("time-ir-parsing", cl::location(TimeIRParsingIsEnabled),
-                    cl::desc("Measure the time IR parsing takes"));
-