[Bug tree-optimization/101724] New: Compile-time hog w/ --param threader-mode=ranger

asolokha at gmx dot com gcc-bugzilla@gcc.gnu.org
Mon Aug 2 11:06:54 GMT 2021


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101724

            Bug ID: 101724
           Summary: Compile-time hog w/ --param threader-mode=ranger
           Product: gcc
           Version: 12.0
            Status: UNCONFIRMED
          Keywords: compile-time-hog
          Severity: normal
          Priority: P3
         Component: tree-optimization
          Assignee: unassigned at gcc dot gnu.org
          Reporter: asolokha at gmx dot com
  Target Milestone: ---

gcc-12.0.0-alpha20210801 snapshot (g:6f0c43e97825ee54e3779afbedcd0def12443001)
takes indefinite time to compile the following testcase w/ -O2 -fpeel-loops
--param fsm-scale-path-stmts=1 --param threader-iterative=1 --param
threader-mode=ranger:

int a;

__attribute__ ((simd)) char
foo (void)
{
  if (a < 0)
    a = 0;

  /* no return statement */
}

The (arbitrary trimmed) head of "perf top" output:

% timeout 10 gcc-12.0.0 -O2 -fpeel-loops --param fsm-scale-path-stmts=1 --param
threader-iterative=1 --param threader-mode=ranger -c tbimsyuw.c
zsh: exit 124

  50.63%  cc1           [.] path_range_query::precompute_ranges_in_block
  24.01%  cc1           [.] path_range_query::range_defined_in_block
   9.05%  cc1           [.] bitmap_bit_p
   6.93%  cc1           [.] gori_map::exports
   1.85%  cc1           [.] back_threader_profitability::profitable_path_p
   0.62%  cc1           [.] estimate_num_insns
   0.60%  cc1           [.] back_threader::find_paths_to_names
   0.55%  cc1           [.] find_edge
   0.55%  cc1           [.] hash_table<default_hash_traits<basic_block_def*>,
false, xcallocator>::find_slot_with_hash
   0.37%  cc1           [.] path_range_query::ssa_range_in_phi
   0.28%  cc1           [.] irange::varying_compatible_p
   0.25%  cc1           [.] wide_int_to_tree_1
   0.25%  cc1           [.] maybe_hot_count_p
   0.25%  cc1           [.] bitmap_clear_bit
   0.20%  cc1           [.] bitmap_set_bit
   0.18%  cc1           [.] irange::operator=
   0.18%  cc1           [.] optimize_function_for_size_p
   0.18%  cc1           [.] get_base_address
   0.17%  cc1           [.] profile_count::from_gcov_type
   0.15%  cc1           [.] path_range_query::precompute_ranges
   0.13%  cc1           [.] back_threader::resolve_phi
   0.13%  cc1           [.] fold_using_range::fold_stmt
   0.12%  cc1           [.] fold_using_range::range_of_range_op
   0.10%  cc1           [.] fold_using_range::postfold_gcond_edges
   0.10%  cc1           [.] optimize_bb_for_size_p
   0.10%  libc-2.33.so  [.] malloc
   0.10%  cc1           [.] profile_count::compatible_p
   0.08%  cc1           [.] bitmap_count_bits
   0.08%  cc1           [.] gimple_get_lhs
   0.08%  cc1           [.] operand_compare::verify_hash_value
   0.08%  cc1           [.] gimple_call_builtin_p
   0.08%  cc1           [.] last_stmt
   0.08%  cc1           [.] ssa_global_cache::set_global_range
   0.07%  cc1           [.] estimate_operator_cost
   0.07%  cc1           [.] get_gimple_control_stmt
   0.07%  libc-2.33.so  [.] cfree@GLIBC_2.2.5
   0.05%  cc1           [.] operator_lt::fold_range
   0.05%  cc1           [.] fur_stmt::get_phi_operand
   0.05%  cc1           [.] irange::set_varying
   0.05%  cc1           [.] wi::min_value
   0.05%  cc1           [.] cache_wide_int_in_type_cache
   0.05%  cc1           [.] ssa_global_cache::get_global_range
   0.05%  cc1           [.] wi::to_wide
   0.05%  cc1           [.] range_op_handler
   0.03%  cc1           [.] int_cst_hasher::hash
   0.03%  cc1           [.] wi::extended_tree<576>::extended_tree
   0.03%  cc1           [.] operand_compare::operand_equal_p
   0.03%  cc1           [.] irange::lower_bound
   0.03%  cc1           [.] irange::upper_bound


More information about the Gcc-bugs mailing list