aboutsummaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2002-11-10 06:55:02 +0000
committerChris Lattner <sabre@nondot.org>2002-11-10 06:55:02 +0000
commit49d9a884286364f92fbc4fc50d96c1e83586a2ab (patch)
tree78fcc9caf43b9c06f4e820beec1d27e8f2ca7578 /tools
parent4f7815f68449fae2f21bc10ce89479346ba995d1 (diff)
downloadexternal_llvm-49d9a884286364f92fbc4fc50d96c1e83586a2ab.zip
external_llvm-49d9a884286364f92fbc4fc50d96c1e83586a2ab.tar.gz
external_llvm-49d9a884286364f92fbc4fc50d96c1e83586a2ab.tar.bz2
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
Diffstat (limited to 'tools')
-rw-r--r--tools/analyze/analyze.cpp4
1 files changed, 4 insertions, 0 deletions
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 @@ 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";