Commit fa512650 authored by Kevin Modzelewski's avatar Kevin Modzelewski

Turn on LLVM's "basic regalloc" by default

Can still switch back to the default regalloc using the -b flag,
but it looks like the basic register allocator cuts the LLVM JIT
time significantly, and improves every one of our benchmarks.
parent 8ec73498
...@@ -102,7 +102,7 @@ For a full list, please check out the (Makefile)[https://github.com/dropbox/pyst ...@@ -102,7 +102,7 @@ For a full list, please check out the (Makefile)[https://github.com/dropbox/pyst
<dd>Use a stripped stdlib. When running pyston_dbg, the default is to use a stdlib with full debugging symbols enabled. Passing -r changes this behavior to load a slimmer, stripped stdlib.</dd> <dd>Use a stripped stdlib. When running pyston_dbg, the default is to use a stdlib with full debugging symbols enabled. Passing -r changes this behavior to load a slimmer, stripped stdlib.</dd>
<dt>-b</dt> <dt>-b</dt>
<dd>Experimental: use the LLVM "basic" register allocator.</dd> <dd>Use the default LLVM register allocator instead of the "basic" register allocator.</dd>
<dt>-x</dt> <dt>-x</dt>
<dd>Experimental: use the pypa parser.</dd> <dd>Experimental: use the pypa parser.</dd>
......
...@@ -122,6 +122,11 @@ static void compileIR(CompiledFunction* cf, EffortLevel::EffortLevel effort) { ...@@ -122,6 +122,11 @@ static void compileIR(CompiledFunction* cf, EffortLevel::EffortLevel effort) {
us_jitting.log(us); us_jitting.log(us);
static StatCounter num_jits("num_jits"); static StatCounter num_jits("num_jits");
num_jits.log(); num_jits.log();
if (VERBOSITY() >= 1&& us > 100000) {
printf("Took %.1fs to compile %s\n", us * 0.000001, cf->func->getName().str().c_str());
printf("Has %ld basic blocks\n", cf->func->getBasicBlockList().size());
}
} }
if (VERBOSITY("irgen") >= 1) { if (VERBOSITY("irgen") >= 1) {
......
...@@ -34,7 +34,7 @@ bool TRAP = false; ...@@ -34,7 +34,7 @@ bool TRAP = false;
bool USE_STRIPPED_STDLIB = true; // always true bool USE_STRIPPED_STDLIB = true; // always true
bool ENABLE_INTERPRETER = true; bool ENABLE_INTERPRETER = true;
bool ENABLE_PYPA_PARSER = false; bool ENABLE_PYPA_PARSER = false;
bool USE_REGALLOC_BASIC = false; bool USE_REGALLOC_BASIC = true;
static bool _GLOBAL_ENABLE = 1; static bool _GLOBAL_ENABLE = 1;
bool ENABLE_ICS = 1 && _GLOBAL_ENABLE; bool ENABLE_ICS = 1 && _GLOBAL_ENABLE;
......
...@@ -83,7 +83,7 @@ int main(int argc, char** argv) { ...@@ -83,7 +83,7 @@ int main(int argc, char** argv) {
} else if (code == 'r') { } else if (code == 'r') {
USE_STRIPPED_STDLIB = true; USE_STRIPPED_STDLIB = true;
} else if (code == 'b') { } else if (code == 'b') {
USE_REGALLOC_BASIC = true; USE_REGALLOC_BASIC = false;
} else if (code == 'x') { } else if (code == 'x') {
ENABLE_PYPA_PARSER = true; ENABLE_PYPA_PARSER = true;
} else if (code == '?') } else if (code == '?')
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment