Add a timer to evaluate bytecode load time and space requirements


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4679 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/tools/analyze/analyze.cpp b/tools/analyze/analyze.cpp
index 8844b73..4669c66 100644
--- a/tools/analyze/analyze.cpp
+++ b/tools/analyze/analyze.cpp
@@ -16,6 +16,7 @@
 #include "llvm/Assembly/Parser.h"
 #include "llvm/Analysis/Verifier.h"
 #include "llvm/Support/PassNameParser.h"
+#include "Support/Timer.h"
 #include <algorithm>
 
 
@@ -101,11 +102,14 @@
 AnalysesList(cl::desc("Analyses available:"));
 
 
+static Timer BytecodeLoadTimer("Bytecode Loader");
+
 int main(int argc, char **argv) {
   cl::ParseCommandLineOptions(argc, argv, " llvm analysis printer tool\n");
 
   Module *CurMod = 0;
   try {
+    TimeRegion RegionTimer(BytecodeLoadTimer);
     CurMod = ParseBytecodeFile(InputFilename);
     if (!CurMod && !(CurMod = ParseAssemblyFile(InputFilename))){
       std::cerr << argv[0] << ": input file didn't read correctly.\n";