public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug analyzer/96653] New: Compile time and memory hog w/ -O1 -fanalyzer
@ 2020-08-17 11:34 asolokha at gmx dot com
  2020-08-18  1:21 ` [Bug analyzer/96653] " dmalcolm at gcc dot gnu.org
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: asolokha at gmx dot com @ 2020-08-17 11:34 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 96653
           Summary: Compile time and memory hog w/ -O1 -fanalyzer
           Product: gcc
           Version: 11.0
            Status: UNCONFIRMED
          Keywords: compile-time-hog, memory-hog
          Severity: normal
          Priority: P3
         Component: analyzer
          Assignee: dmalcolm at gcc dot gnu.org
          Reporter: asolokha at gmx dot com
  Target Milestone: ---

Created attachment 49068
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=49068&action=edit
Testcase

gcc-11.0.0-alpha20200816 snapshot (g:c99116aeeb9644ebddec653ee8b19de4d38b65bd)
takes indefinite time and consumes ever-increasing amount of memory when
compiling the attached testcase, preprocessed and reduced from
drivers/media/v4l2-core/v4l2-ctrls.c from Linux 5.9-rc1, w/ -O1 -fanalyzer:

% timeout 60 gcc-11.0.0 -O1 -fanalyzer -c cdkkdewb.c
zsh: exit 124   timeout 60 gcc-11.0.0 -O1 -fanalyzer -c cdkkdewb.c

Typical profiles captured by perf top at different time:

  72.47%  cc1  [.] ana::constraint_manager::add_constraint_internal
  25.53%  cc1  [.] ana::constraint::implied_by
   0.80%  cc1  [.] ana::constraint_manager::get_equiv_class_by_svalue
   0.45%  cc1  [.] ana::constraint_manager::eval_condition
   0.20%  cc1  [.] ana::constraint_manager::validate
   0.15%  cc1  [.] ana::constraint_manager::eval_condition
   0.10%  cc1  [.] ana::constraint_manager::get_or_add_equiv_class
   0.10%  cc1  [.] fold_binary_loc
   0.07%  cc1  [.] ana::constraint_manager::get_ec_bounds
   0.07%  cc1  [.] tree_strip_sign_nop_conversions
   0.02%  cc1  [.] wi::lts_p<generic_wide_int<wi::extended_tree<192> >,
generic_wide_int<wi::extended_tree<192> > >
   0.02%  cc1  [.] tree_int_cst_equal

                 * * *

  48.80%  cc1           [.] ana::constraint_manager::add_constraint_internal
  25.31%  cc1           [.] ana::constraint_manager::get_equiv_class_by_svalue
  17.42%  cc1           [.] ana::constraint::implied_by
   1.40%  cc1           [.] qsort_chk
   0.95%  cc1           [.] ana::constraint_cmp
   0.62%  cc1           [.] fold_binary_loc
   0.55%  cc1           [.] cmp2to3
   0.55%  cc1           [.] ana::constraint_manager::hash
   0.55%  cc1           [.] ana::constraint_manager::eval_condition
   0.40%  cc1           [.] ana::constraint_manager::eval_condition
   0.32%  cc1           [.] hash_table<default_hash_traits<ana::equiv_class
const*>, false, xcallocator>::find_slot_with_hash
   0.30%  cc1           [.] mergesort<sort_ctx>
   0.27%  cc1           [.] ana::constraint_manager::validate
   0.22%  cc1           [.] ana::constraint_manager::eval_condition
   0.17%  cc1           [.] ana::constraint_manager::for_each_fact
   0.17%  cc1           [.] fold_relational_const
   0.17%  cc1           [.] ana::constraint_manager::get_ec_bounds
   0.15%  cc1           [.] const_binop
   0.15%  cc1           [.] ana::svalue::unwrap_any_unmergeable
   0.15%  cc1           [.] tree_int_cst_lt
   0.15%  libc-2.32.so  [.] memcpy@@GLIBC_2.14
   0.12%  cc1           [.] tree_strip_sign_nop_conversions
   0.12%  cc1           [.] ana::constant_svalue::get_kind
   0.12%  cc1           [.] wi::extended_tree<192>::extended_tree
   0.10%  cc1           [.] wi::lts_p<generic_wide_int<wi::extended_tree<192>
>, generic_wide_int<wi::extended_tree<192> > >
   0.10%  cc1           [.] constant_boolean_node
   0.10%  cc1           [.] ana::constraint_manager::constraint_manager
   0.07%  cc1           [.] ana::svalue::dyn_cast_unmergeable_svalue
   0.07%  cc1           [.] ana::constraint_manager::get_or_add_equiv_class
   0.07%  cc1           [.] ana::constraint_manager::canonicalize
   0.05%  cc1           [.] ana::equiv_class_cmp
   0.02%  libc-2.32.so  [.] _int_malloc
   0.02%  cc1           [.] ana::constraint_manager::operator==
   0.02%  cc1           [.] tree_int_cst_equal
   0.02%  cc1           [.] wi::eq_p<generic_wide_int<wi::extended_tree<192> >,
generic_wide_int<wi::extended_tree<192> > >
   0.02%  libc-2.32.so  [.] unlink_chunk.constprop.0
   0.02%  cc1           [.] ana::store::can_merge_p
   0.02%  cc1           [.] memcpy@plt
   0.02%  cc1           [.] cmp1<sort_ctx>
   0.02%  cc1           [.]
ana::constraint_manager::purge<ana::dead_svalue_purger>
   0.02%  cc1           [.] ana::store::canonicalize

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2020-09-16 23:40 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-08-17 11:34 [Bug analyzer/96653] New: Compile time and memory hog w/ -O1 -fanalyzer asolokha at gmx dot com
2020-08-18  1:21 ` [Bug analyzer/96653] " dmalcolm at gcc dot gnu.org
2020-09-14 16:29 ` cvs-commit at gcc dot gnu.org
2020-09-14 16:46 ` [Bug analyzer/96653] -Wanalyzer-too-complex on very large switch statement dmalcolm at gcc dot gnu.org
2020-09-16 23:05 ` cvs-commit at gcc dot gnu.org
2020-09-16 23:30 ` dmalcolm at gcc dot gnu.org
2020-09-16 23:35 ` dmalcolm at gcc dot gnu.org
2020-09-16 23:40 ` dmalcolm at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).