aboutsummaryrefslogtreecommitdiff
path: root/lib/IRReader
diff options
context:
space:
mode:
authorEli Bendersky <eliben@chromium.org>2013-07-19 14:51:07 -0700
committerEli Bendersky <eliben@chromium.org>2013-07-19 14:51:07 -0700
commit58dfde724a201838b40f1314590ec4a1a7f2a601 (patch)
tree34120ef2526819189d4cc82408085c03681ab1eb /lib/IRReader
parent41207d5da325e654ccf583c97e048afc3cba78a1 (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
Diffstat (limited to 'lib/IRReader')
-rw-r--r--lib/IRReader/IRReader.cpp5
1 files changed, 3 insertions, 2 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