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

            Bug ID: 88217
           Summary: [8/9 Regression] Compile time and memory hog w/ -O2
                    -fstrict-enums -fno-tree-forwprop -fno-tree-fre
           Product: gcc
           Version: 8.0
            Status: UNCONFIRMED
          Keywords: compile-time-hog, memory-hog
          Severity: normal
          Priority: P3
         Component: tree-optimization
          Assignee: unassigned at gcc dot gnu.org
          Reporter: asolokha at gmx dot com
  Target Milestone: ---

g++-9.0.0-alpha20181125 snapshot (r266441) takes inordinate amount of time and
memory compiling gcc/testsuite/g++.dg/cpp0x/range-for17.C w/ -O2 (-O3, -Ofast)
-fstrict-enums -fno-tree-forwprop -fno-tree-fre:

% timeout 10 gcc-9.0.0-alpha20181125 -O2 -fstrict-enums -fno-tree-forwprop
-fno-tree-fre -c gcc/testsuite/g++.dg/cpp0x/range-for17.C
zsh: exit 124   timeout 10 gcc-9.0.0-alpha20181125 -O2 -fstrict-enums
-fno-tree-forwprop  -c

perf top:

Overhead  Shared Objec  Symbol
  10.15%  cc1plus       [.] compare_values_warnv
   8.78%  cc1plus       [.] operand_equal_p
   6.99%  cc1plus       [.] tree_int_cst_compare
   4.56%  cc1plus       [.] tree_int_cst_equal
   4.30%  cc1plus       [.] value_range_base::check
   3.66%  cc1plus       [.] get_single_symbol
   2.85%  cc1plus       [.] wide_int_to_tree_1
   2.57%  cc1plus       [.] operand_less_p
   2.56%  cc1plus       [.] value_range::intersect_helper
   2.39%  cc1plus       [.] wi::lts_p<generic_wide_int<wi::extended_tree<192>
>, generic_wide_int<wi::extended_tree<192> > >
   2.22%  cc1plus       [.] hash_table<int_cst_hasher,
xcallocator>::find_slot_with_hash
   2.06%  cc1plus       [.] int_cst_hasher::hash
   2.03%  cc1plus       [.] int_cst_hasher::equal
   1.78%  cc1plus       [.] wi::extended_tree<192>::extended_tree
   1.45%  cc1plus       [.] fold_convert_loc
   1.37%  cc1plus       [.] vr_values::get_value_range
   1.29%  cc1plus       [.] value_range::set
   1.29%  cc1plus       [.] is_gimple_min_invariant
   1.25%  cc1plus       [.] inchash::add_expr
   1.20%  cc1plus       [.] wi::force_to_size
   1.19%  cc1plus       [.] vrp_operand_equal_p
   1.16%  cc1plus       [.] add_ssa_edge
   1.05%  cc1plus       [.] gimple_simplify
   0.94%  cc1plus       [.] vr_values::update_value_range
   0.94%  cc1plus       [.] value_range_base::set_and_canonicalize
   0.94%  cc1plus       [.] get_range_info
   0.89%  cc1plus       [.] int_const_binop
   0.89%  cc1plus       [.] tree_ssa_useless_type_conversion
   0.89%  cc1plus       [.] bitmap_set_bit
   0.82%  cc1plus       [.] ssa_propagation_engine::simulate_stmt
   0.76%  cc1plus       [.] iterative_hash_host_wide_int
   0.74%  cc1plus       [.] vrp_valueize_1
   0.73%  cc1plus       [.] get_range_info
   0.71%  cc1plus       [.] value_range::set_equiv
   0.68%  cc1plus       [.] extract_range_into_wide_ints
   0.66%  cc1plus       [.] wi::to_wide
   0.66%  cc1plus       [.] get_int_cst_ext_nunits
   0.59%  cc1plus       [.] vrp_prop::visit_stmt
   0.58%  cc1plus       [.] extract_range_from_binary_expr
   0.58%  cc1plus       [.] extract_range_from_unary_expr
   0.58%  cc1plus       [.] ssa_propagation_engine::ssa_propagate
   0.54%  cc1plus       [.] gimple_fold_stmt_to_constant_1
   0.53%  cc1plus       [.] bitmap_copy
   0.48%  cc1plus       [.] stmt_interesting_for_vrp
   0.48%  cc1plus       [.] vr_values::vrp_visit_assignment_or_call
   0.46%  cc1plus       [.] vr_values::extract_range_from_phi_node
   0.43%  cc1plus       [.] instantiate_scev_r
   0.41%  cc1plus       [.] tree_ssa_strip_useless_type_conversions
   0.41%  cc1plus       [.] value_range::check
   0.41%  cc1plus       [.] canonize
   0.41%  cc1plus       [.] bitmap_clear_bit
   0.41%  cc1plus       [.] wide_int_range_convert
   0.41%  cc1plus       [.] vrp_valueize
   0.41%  cc1plus       [.] wi::divmod_internal

Reply via email to