aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/IRReader/IRReader.cpp5
-rw-r--r--tools/pnacl-llc/pnacl-llc.cpp16
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();