From 7226fe23aa0c7f4e477de3711ed356f5ddb281c2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Bylica?= Date: Fri, 10 Apr 2015 14:47:43 +0200 Subject: [PATCH] Change instruction scheduler Try different instruction scheduler in LLVM, other crashes sometimes. Also parse command line options properly for random tests. --- evmjit/libevmjit/ExecutionEngine.cpp | 4 ++-- test/state.cpp | 2 ++ test/vm.cpp | 2 ++ 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/evmjit/libevmjit/ExecutionEngine.cpp b/evmjit/libevmjit/ExecutionEngine.cpp index 0ed4a65b5..e15dad969 100644 --- a/evmjit/libevmjit/ExecutionEngine.cpp +++ b/evmjit/libevmjit/ExecutionEngine.cpp @@ -88,10 +88,10 @@ void parseOptions() //cl::ParseEnvironmentOptions("evmjit", "EVMJIT", "Ethereum EVM JIT Compiler"); // FIXME: LLVM workaround: - // Manually select instruction scheduler other than "source". + // Manually select instruction scheduler. Confirmed bad schedulers: source, list-burr, list-hybrid. // "source" scheduler has a bug: http://llvm.org/bugs/show_bug.cgi?id=22304 auto envLine = std::getenv("EVMJIT"); - auto commandLine = std::string{"evmjit "} + (envLine ? envLine : "") + " -pre-RA-sched=list-burr\0"; + auto commandLine = std::string{"evmjit "} + (envLine ? envLine : "") + " -pre-RA-sched=list-ilp\0"; static const auto c_maxArgs = 20; char const* argv[c_maxArgs] = {nullptr, }; auto arg = std::strtok(&*commandLine.begin(), " "); diff --git a/test/state.cpp b/test/state.cpp index 813c3b4d7..65f333538 100644 --- a/test/state.cpp +++ b/test/state.cpp @@ -218,6 +218,8 @@ BOOST_AUTO_TEST_CASE(stCreateTest) BOOST_AUTO_TEST_CASE(stRandom) { + test::Options::get(); // parse command line options, e.g. to enable JIT + string testPath = dev::test::getTestPath(); testPath += "/StateTests/RandomTests"; diff --git a/test/vm.cpp b/test/vm.cpp index d92989133..4728b8a53 100644 --- a/test/vm.cpp +++ b/test/vm.cpp @@ -524,6 +524,8 @@ BOOST_AUTO_TEST_CASE(vmInputLimitsLightTest) BOOST_AUTO_TEST_CASE(vmRandom) { + test::Options::get(); // parse command line options, e.g. to enable JIT + string testPath = getTestPath(); testPath += "/VMTests/RandomTests";