From a10a05b6f2eb05213e137e228418f47947000f62 Mon Sep 17 00:00:00 2001 From: Ben Vanik Date: Wed, 23 Jan 2013 21:59:26 -0800 Subject: [PATCH] Misc output cleanup and a test run script. --- TODO.md | 3 +++ private/runtest.sh | 21 +++++++++++++++++++++ src/cpu/codegen/module_generator.cc | 2 ++ src/cpu/cpu.cc | 3 +++ src/cpu/exec_module.cc | 1 - 5 files changed, 29 insertions(+), 1 deletion(-) create mode 100755 private/runtest.sh diff --git a/TODO.md b/TODO.md index 69977d44f..2cb7f9442 100644 --- a/TODO.md +++ b/TODO.md @@ -154,3 +154,6 @@ Right now the SSA values seem to leak from the blocks somehow. All caching is disabled. ``` + +## Debugging + diff --git a/private/runtest.sh b/private/runtest.sh new file mode 100755 index 000000000..f021b5d8b --- /dev/null +++ b/private/runtest.sh @@ -0,0 +1,21 @@ +python xenia-build.py xethunk +python xenia-build.py build + +rm build/$1* + +./build/xenia/release/xenia-run \ + private/$1 \ + --optimize_ir_modules=false \ + --optimize_ir_functions=false \ + 2>build/run.llvm.txt 1>build/run.txt + +if [ ! -s build/run.llvm.txt ]; then + rm build/run.llvm.txt +fi + +if [ -e build/$1-preopt.bc ]; then + ./build/llvm/release/bin/llvm-dis build/$1-preopt.bc +fi +if [ -e build/$1.bc ]; then + ./build/llvm/release/bin/llvm-dis build/$1.bc +fi diff --git a/src/cpu/codegen/module_generator.cc b/src/cpu/codegen/module_generator.cc index 620e3c420..4147dce8d 100644 --- a/src/cpu/codegen/module_generator.cc +++ b/src/cpu/codegen/module_generator.cc @@ -111,6 +111,8 @@ int ModuleGenerator::Generate() { } } } + + // Build out all the user functions. for (std::map::iterator it = functions_.begin(); it != functions_.end(); ++it) { BuildFunction(it->second); diff --git a/src/cpu/cpu.cc b/src/cpu/cpu.cc index 147704bf9..c8f1f8db7 100644 --- a/src/cpu/cpu.cc +++ b/src/cpu/cpu.cc @@ -10,6 +10,9 @@ #include "cpu/cpu-private.h" +// Debugging: + + // Dumping: DEFINE_string(dump_path, "build/", "Directory that dump files are placed into."); diff --git a/src/cpu/exec_module.cc b/src/cpu/exec_module.cc index 158ac1a6f..1ec408dd9 100644 --- a/src/cpu/exec_module.cc +++ b/src/cpu/exec_module.cc @@ -251,5 +251,4 @@ int ExecModule::Uninit() { void ExecModule::Dump() { sdb_->Dump(); - gen_module_->dump(); }