mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-14 11:32:34 +00:00
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
This commit is contained in:
parent
4f7815f684
commit
49d9a88428
@ -16,6 +16,7 @@
|
|||||||
#include "llvm/Assembly/Parser.h"
|
#include "llvm/Assembly/Parser.h"
|
||||||
#include "llvm/Analysis/Verifier.h"
|
#include "llvm/Analysis/Verifier.h"
|
||||||
#include "llvm/Support/PassNameParser.h"
|
#include "llvm/Support/PassNameParser.h"
|
||||||
|
#include "Support/Timer.h"
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
|
|
||||||
|
|
||||||
@ -101,11 +102,14 @@ static cl::list<const PassInfo*, bool,
|
|||||||
AnalysesList(cl::desc("Analyses available:"));
|
AnalysesList(cl::desc("Analyses available:"));
|
||||||
|
|
||||||
|
|
||||||
|
static Timer BytecodeLoadTimer("Bytecode Loader");
|
||||||
|
|
||||||
int main(int argc, char **argv) {
|
int main(int argc, char **argv) {
|
||||||
cl::ParseCommandLineOptions(argc, argv, " llvm analysis printer tool\n");
|
cl::ParseCommandLineOptions(argc, argv, " llvm analysis printer tool\n");
|
||||||
|
|
||||||
Module *CurMod = 0;
|
Module *CurMod = 0;
|
||||||
try {
|
try {
|
||||||
|
TimeRegion RegionTimer(BytecodeLoadTimer);
|
||||||
CurMod = ParseBytecodeFile(InputFilename);
|
CurMod = ParseBytecodeFile(InputFilename);
|
||||||
if (!CurMod && !(CurMod = ParseAssemblyFile(InputFilename))){
|
if (!CurMod && !(CurMod = ParseAssemblyFile(InputFilename))){
|
||||||
std::cerr << argv[0] << ": input file didn't read correctly.\n";
|
std::cerr << argv[0] << ": input file didn't read correctly.\n";
|
||||||
|
Loading…
Reference in New Issue
Block a user