Commit 4a8040cf authored by Kevin Modzelewski's avatar Kevin Modzelewski Committed by Kevin Modzelewski

Rename our '-O' flag to '-L'

to not conflict with CPython's -O.  They're quite similar
(increase optimization level), but some tests ask for -O when
they don't really want our version of it.
parent ee912194
......@@ -333,7 +333,7 @@ endmacro()
add_pyston_test(defaults tests --order-by-mtime -t50)
add_pyston_test(force_llvm tests -a=-n -t90)
if(${CMAKE_BUILD_TYPE} STREQUAL "Release")
add_pyston_test(max_compilation_tier tests -a=-O -t50)
add_pyston_test(max_compilation_tier tests -a=-L -t50)
endif()
add_pyston_test(defaults cpython --exit-code-only --skip-failing -t100)
add_pyston_test(defaults integration --exit-code-only --skip-failing -t900)
......
......@@ -764,7 +764,7 @@ check$1 test$1: $(PYTHON_EXE_DEPS) pyston$1
$(PYTHON) $(TOOLS_DIR)/tester.py -q -R pyston$1 -j$(TEST_THREADS) -a=-S -k --exit-code-only --skip-failing -t50 $(TEST_DIR)/cpython $(ARGS)
$(PYTHON) $(TOOLS_DIR)/tester.py -q -R pyston$1 -j$(TEST_THREADS) -k -a=-S --exit-code-only --skip-failing -t600 $(TEST_DIR)/integration $(ARGS)
$(PYTHON) $(TOOLS_DIR)/tester.py -q -R pyston$1 -j$(TEST_THREADS) -a=-n -a=-S -t50 -k $(TESTS_DIR) $(ARGS)
$(PYTHON) $(TOOLS_DIR)/tester.py -q -R pyston$1 -j$(TEST_THREADS) -a=-O -a=-S -k $(TESTS_DIR) $(ARGS)
$(PYTHON) $(TOOLS_DIR)/tester.py -q -R pyston$1 -j$(TEST_THREADS) -a=-L -a=-S -k $(TESTS_DIR) $(ARGS)
.PHONY: run$1 dbg$1
run$1: pyston$1 $$(RUN_DEPS)
......
......@@ -182,9 +182,11 @@ static void enableGdbSegfaultWatcher() {
}
int handleArg(char code) {
if (code == 'O')
if (code == 'O') {
Py_OptimizeFlag++;
} else if (code == 'L') {
FORCE_OPTIMIZE = true;
else if (code == 'q')
} else if (code == 'q')
GLOBAL_VERBOSITY = 0;
else if (code == 'v') {
if (GLOBAL_VERBOSITY)
......@@ -219,6 +221,8 @@ int handleArg(char code) {
USE_REGALLOC_BASIC = false;
} else if (code == 'E') {
Py_IgnoreEnvironmentFlag = 1;
} else if (code == 'B') {
Py_DontWriteBytecodeFlag++;
} else if (code == 'P') {
PAUSE_AT_ABORT = true;
} else if (code == 'F') {
......@@ -327,7 +331,7 @@ static int main(int argc, char** argv) noexcept {
// Suppress getopt errors so we can throw them ourselves
opterr = 0;
while ((code = getopt(argc, argv, "+:OqdIibpjtrTRSUvnxXEac:FuPTGm:")) != -1) {
while ((code = getopt(argc, argv, "+:OLqdIibpjtrTRSUvnxXEBac:FuPTGm:")) != -1) {
if (code == 'c') {
assert(optarg);
command = optarg;
......
# run_args: -n
# statcheck: ("-O" in EXTRA_JIT_ARGS) or (1 <= stats["num_osr_exits"] <= 2)
# statcheck: ("-L" in EXTRA_JIT_ARGS) or (1 <= stats["num_osr_exits"] <= 2)
# statcheck: noninit_count('slowpath_binop') <= 10
x = 100000
......
# skip-if: '-n' in EXTRA_JIT_ARGS or '-O' in EXTRA_JIT_ARGS
# skip-if: '-n' in EXTRA_JIT_ARGS or '-L' in EXTRA_JIT_ARGS
# Tests to see if we add any extra refs to function arguments.
import sys
......
# statcheck: '-O' in EXTRA_JIT_ARGS or 1 <= stats['num_osr_exits'] <= 5
# statcheck: '-L' in EXTRA_JIT_ARGS or 1 <= stats['num_osr_exits'] <= 5
def f(x):
def inner():
......
# skip-if: '-O' in EXTRA_JIT_ARGS or '-n' in EXTRA_JIT_ARGS
# skip-if: '-L' in EXTRA_JIT_ARGS or '-n' in EXTRA_JIT_ARGS
# statcheck: 4 <= noninit_count('num_deopt') < 50
# statcheck: 1 <= stats["num_osr_exits"] <= 2
......
# skip-if: '-O' in EXTRA_JIT_ARGS
# skip-if: '-L' in EXTRA_JIT_ARGS
# expected: statfail
# statcheck: 4 <= noninit_count('num_deopt') < 50
# statcheck: 1 <= stats["num_osr_exits"] <= 2
......
# skip-if: '-O' in EXTRA_JIT_ARGS or '-n' in EXTRA_JIT_ARGS
# skip-if: '-L' in EXTRA_JIT_ARGS or '-n' in EXTRA_JIT_ARGS
# statcheck: 4 <= noninit_count('num_deopt') < 50
# statcheck: 1 <= stats["num_osr_exits"] <= 2
......
# skip-if: '-O' in EXTRA_JIT_ARGS or '-n' in EXTRA_JIT_ARGS
# skip-if: '-L' in EXTRA_JIT_ARGS or '-n' in EXTRA_JIT_ARGS
# statcheck: 4 == noninit_count('num_deopt')
# this used to hit an abort in our LLVM tier codegen
try:
......
# skip-if: '-O' in EXTRA_JIT_ARGS or '-n' in EXTRA_JIT_ARGS
# skip-if: '-L' in EXTRA_JIT_ARGS or '-n' in EXTRA_JIT_ARGS
# statcheck: noninit_count('num_deopt') == 2
try:
......
# statcheck: ("-O" in EXTRA_JIT_ARGS) or (1 <= stats["num_osr_exits"] <= 2)
# statcheck: ("-L" in EXTRA_JIT_ARGS) or (1 <= stats["num_osr_exits"] <= 2)
# While perhaps not required in practice, we should have the ability to
# OSR from inside a list comprehension.
......
# statcheck: '-O' in EXTRA_JIT_ARGS or 1 <= stats['num_osr_exits'] <= 5
# statcheck: '-L' in EXTRA_JIT_ARGS or 1 <= stats['num_osr_exits'] <= 5
# "big osr" in terms of lots of live variables needing to be passed through:
......
# statcheck: '-O' in EXTRA_JIT_ARGS or 1 <= stats['num_osr_exits'] <= 5
# statcheck: '-L' in EXTRA_JIT_ARGS or 1 <= stats['num_osr_exits'] <= 5
# Try to trick the JIT into OSR'ing into an optimized version with a speculation
# that has already failed.
......
# statcheck: '-O' in EXTRA_JIT_ARGS or 1 <= stats['num_osr_exits'] <= 5
# statcheck: '-L' in EXTRA_JIT_ARGS or 1 <= stats['num_osr_exits'] <= 5
# Regression test to make sure we can do an OSR if one of the live variables
# is potentially-undefined.
......
# statcheck: '-O' in EXTRA_JIT_ARGS or 1 <= stats['num_osr_exits'] <= 5
# statcheck: '-L' in EXTRA_JIT_ARGS or 1 <= stats['num_osr_exits'] <= 5
# Regression test to make sure we can do an OSR if one of the live variables
# is potentially-undefined.
......
# skip-if: '-n' not in EXTRA_JIT_ARGS and '-O' not in EXTRA_JIT_ARGS
# skip-if: '-n' not in EXTRA_JIT_ARGS and '-L' not in EXTRA_JIT_ARGS
# statcheck: noninit_count('slowpath_setattr') < 50
class MyDescr(object):
......
# skip-if: '-n' in EXTRA_JIT_ARGS or '-O' in EXTRA_JIT_ARGS
# skip-if: '-n' in EXTRA_JIT_ARGS or '-L' in EXTRA_JIT_ARGS
# Make sure that we can fork from a threaded environment
#
# Running this test with -n or -O has horrible performance, since
# Running this test with -n or -L has horrible performance, since
# we will freshly JIT all of the post-fork code after every fork.
import subprocess
......
# fail-if: '-n' not in EXTRA_JIT_ARGS and '-O' not in EXTRA_JIT_ARGS
# fail-if: '-n' not in EXTRA_JIT_ARGS and '-L' not in EXTRA_JIT_ARGS
# - This test needs type profiling to be enabled to trigger the bug
# This test throws an irgen assertion.
......
# run_args: -n
#
# statcheck: "-O" in EXTRA_JIT_ARGS or 'slowpath_getclsattr' in stats or 'slowpath_callattr' in stats
# statcheck: "-L" in EXTRA_JIT_ARGS or 'slowpath_getclsattr' in stats or 'slowpath_callattr' in stats
# statcheck: noninit_count('slowpath_getclsattr') <= 20
# statcheck: noninit_count('slowpath_callattr') <= 22
......
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