diff options
author | Eli Bendersky <eliben@chromium.org> | 2013-07-19 14:51:07 -0700 |
---|---|---|
committer | Eli Bendersky <eliben@chromium.org> | 2013-07-19 14:51:07 -0700 |
commit | 58dfde724a201838b40f1314590ec4a1a7f2a601 (patch) | |
tree | 34120ef2526819189d4cc82408085c03681ab1eb | |
parent | 41207d5da325e654ccf583c97e048afc3cba78a1 (diff) |
Switch to the upstream way to measure IR parsing time, since we have 3.3 now
BUG=https://code.google.com/p/nativeclient/issues/detail?id=3349
R=stichnot@chromium.org
Review URL: https://codereview.chromium.org/19500012
-rw-r--r-- | lib/IRReader/IRReader.cpp | 5 | ||||
-rw-r--r-- | tools/pnacl-llc/pnacl-llc.cpp | 16 |
2 files changed, 4 insertions, 17 deletions
diff --git a/lib/IRReader/IRReader.cpp b/lib/IRReader/IRReader.cpp index 7e42eef571..41727bd044 100644 --- a/lib/IRReader/IRReader.cpp +++ b/lib/IRReader/IRReader.cpp @@ -90,11 +90,12 @@ Module *llvm::ParseIRFile(const std::string &Filename, SMDiagnostic &Err, } // @LOCALMOD-BEGIN -// Note: Code below based on ParseIR and ParseIRFile in llvm/Support/IRReader.h Module *llvm::NaClParseIR(MemoryBuffer *Buffer, NaClFileFormat Format, SMDiagnostic &Err, LLVMContext &Context) { + NamedRegionTimer T(TimeIRParsingName, TimeIRParsingGroupName, + TimePassesIsEnabled); if ((Format == PNaClFormat) && isNaClBitcode((const unsigned char *)Buffer->getBufferStart(), (const unsigned char *)Buffer->getBufferEnd())) { @@ -141,4 +142,4 @@ Module *llvm::NaClParseIRFile(const std::string &Filename, return NaClParseIR(File.take(), Format, Err, Context); } -// @LOCALMOD-END
\ No newline at end of file +// @LOCALMOD-END diff --git a/tools/pnacl-llc/pnacl-llc.cpp b/tools/pnacl-llc/pnacl-llc.cpp index 6c79555b14..a57cb2c318 100644 --- a/tools/pnacl-llc/pnacl-llc.cpp +++ b/tools/pnacl-llc/pnacl-llc.cpp @@ -55,14 +55,6 @@ int GetObjectFileFD(); DataStreamer* NaClBitcodeStreamer; #endif -const char *TimeIRParsingGroupName = "LLVM IR Parsing"; -const char *TimeIRParsingName = "Parse IR"; - -bool TimeIRParsingIsEnabled = false; -static cl::opt<bool,true> -EnableTimeIRParsing("time-ir-parsing", cl::location(TimeIRParsingIsEnabled), - cl::desc("Measure the time IR parsing takes")); - cl::opt<NaClFileFormat> InputFileFormat( "bitcode-format", @@ -299,13 +291,7 @@ static int compileModule(char **argv, LLVMContext &Context) { llvm_unreachable("native client SRPC only supports streaming"); } #else - { - // TODO: after the next merge this can be removed. - // https://code.google.com/p/nativeclient/issues/detail?id=3349 - NamedRegionTimer T(TimeIRParsingName, TimeIRParsingGroupName, - TimeIRParsingIsEnabled); - M.reset(NaClParseIRFile(InputFilename, InputFileFormat, Err, Context)); - } + M.reset(NaClParseIRFile(InputFilename, InputFileFormat, Err, Context)); #endif // __native_client__ mod = M.get(); |