Add a timer to evaluate bytecode load time and space requirements
authorChris Lattner <sabre@nondot.org>
Sun, 10 Nov 2002 06:55:02 +0000 (06:55 +0000)
committerChris Lattner <sabre@nondot.org>
Sun, 10 Nov 2002 06:55:02 +0000 (06:55 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4679 91177308-0d34-0410-b5e6-96231b3b80d8

tools/analyze/analyze.cpp

index 8844b7316c4d5076a2ba882fc9e161a4502fef9e..4669c66b03884e560a8a5aca87959136041c1ba0 100644 (file)
@@ -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 @@ static cl::list<const PassInfo*, bool,
 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";