diff options
author | Aldy Hernandez <aldyh@gcc.gnu.org> | 2019-04-25 09:59:03 +0000 |
---|---|---|
committer | Aldy Hernandez <aldyh@gcc.gnu.org> | 2019-04-25 09:59:03 +0000 |
commit | 90638b0f7e1993b8d8ca92ae7c1c012aba2ee299 (patch) | |
tree | 0dd435c702c5ea0aa1792d00c85236b5b062cd88 /gcc | |
parent | 06efc3ba59991482c42cf47f3cdb0eb9256f73f6 (diff) | |
download | gcc-90638b0f7e1993b8d8ca92ae7c1c012aba2ee299.zip gcc-90638b0f7e1993b8d8ca92ae7c1c012aba2ee299.tar.gz gcc-90638b0f7e1993b8d8ca92ae7c1c012aba2ee299.tar.bz2 |
Add option to disable range based threading.
Add option to disable range based threading. This makes it easier to
compare [re]vrp without the noise introduced by the threader's
changes to the IL.
Default is on:
--param fsm-range-based-threading=1
From-SVN: r270567
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/params.def | 9 | ||||
-rw-r--r-- | gcc/tree-ssa-threadbackward.c | 3 | ||||
-rw-r--r-- | gcc/vr-values.c | 3 |
3 files changed, 13 insertions, 2 deletions
diff --git a/gcc/params.def b/gcc/params.def index 3c9c5fc..ef0bf2a 100644 --- a/gcc/params.def +++ b/gcc/params.def @@ -1301,6 +1301,15 @@ DEFPARAM (PARAM_FSM_SCALE_PATH_BLOCKS, "Scale factor to apply to the number of blocks in a threading path when comparing to the number of (scaled) statements.", 3, 1, 10) +/* Temporary aid to disable the range based threader while + benchmarking. This is needed because early threading (which runs + before [er]vrp) will modify the IL and make it harder to compare + [er]vrp speeds. */ +DEFPARAM (PARAM_FSM_RANGE_BASED_THREADING, + "fsm-range-based-threading", + "Set to 1 if range based threading is enabled in backwards threader.", + 1, 0, 1) + DEFPARAM (PARAM_MAX_FSM_THREAD_PATH_INSNS, "max-fsm-thread-path-insns", "Maximum number of instructions to copy when duplicating blocks on a finite state automaton jump thread path.", diff --git a/gcc/tree-ssa-threadbackward.c b/gcc/tree-ssa-threadbackward.c index be5e365..9d72ea1 100644 --- a/gcc/tree-ssa-threadbackward.c +++ b/gcc/tree-ssa-threadbackward.c @@ -1474,7 +1474,8 @@ thread_jumps::find_jump_threads_backwards (basic_block bb, bool speed_p) /* If we didn't thread any paths, try threading by making use of available range information. */ - if (m_max_threaded_paths == PARAM_VALUE (PARAM_MAX_FSM_THREAD_PATHS)) + if (PARAM_VALUE (PARAM_FSM_RANGE_BASED_THREADING) + && m_max_threaded_paths == PARAM_VALUE (PARAM_MAX_FSM_THREAD_PATHS)) find_range_based_jump_threads (name, bb); } diff --git a/gcc/vr-values.c b/gcc/vr-values.c index 02ab7a2..2fc79ca 100644 --- a/gcc/vr-values.c +++ b/gcc/vr-values.c @@ -3303,7 +3303,8 @@ range_misc::simplify_bit_ops_using_ranges (gimple_stmt_iterator *gsi, ir0 = get_irange (op0, stmt); ir1 = get_irange (op1, stmt); - if (ir0.varying_p () || ir1.varying_p ()) + if (ir0.varying_p () || ir1.varying_p () + || ir0.undefined_p () || ir1.undefined_p ()) return false; irange_set_zero_nonzero_bits (ir0, &may_be_nonzero0, &must_be_nonzero0); |