From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 52419 invoked by alias); 20 Oct 2015 20:46:46 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Received: (qmail 46651 invoked by uid 48); 20 Oct 2015 20:46:42 -0000 From: "ncahill_alt at yahoo dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug ipa/68035] New: ipa performance issue when no procedures are present Date: Tue, 20 Oct 2015 20:46:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: ipa X-Bugzilla-Version: 5.2.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: minor X-Bugzilla-Who: ncahill_alt at yahoo dot com X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter target_milestone attachments.created Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2015-10/txt/msg01675.txt.bz2 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68035 Bug ID: 68035 Summary: ipa performance issue when no procedures are present Product: gcc Version: 5.2.0 Status: UNCONFIRMED Severity: minor Priority: P3 Component: ipa Assignee: unassigned at gcc dot gnu.org Reporter: ncahill_alt at yahoo dot com Target Milestone: --- Created attachment 36552 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=36552&action=edit source code showing the ipa performance I have source code showing a possible issue with the IPA code. Here is a summary of the source code: ------------------------------------------------------------ static const unsigned short cmu_us_slt_single_param_frame_n[] = { 49599, 18026, 47807, 8034, 31572, 26974, 49436, 23817, 50405, 9699, 41910, 10941, 26670, 21736, 32950, 17162, 35655, 38672, 26306, 14334, 28846, 22876, 22807, 18244, 33990, 21391, 34908, 20997, 31472, 23683, 30802, 22362, 49567, 19033, 34344, 20446, 34123, 25460, 18742, 28898, 36004, 30362, 8420, 14034, 27906, 25618, 22903, 21679, 28720, 27544, 23251, 10290, 22366, 3628, 9385, 13003, 50521, 14289, 23453, 15166, 40948, 19686, 46409, 27702, 47343, 20878, 42959, 30179, 35689, 18748, 33039, 33196, 45794, 22963, 40203, 25433, 35522, 43226, 39469, 31271, 31140, 31707, 40340, 32122, 40396, 28629, 35648, 32788, 15916, 30503, 37380, 28145, 33163, 42595, 38038, 32304, 25717, 37299, 46007, 42212, 38235, 34110, 64844, 1078, 34616, 43377, 18897, 34936, 13503, 23790, 20927, 37384, 60936, 33438, }; const unsigned short * const cmu_us_slt_single_model_vectors[] = { cmu_us_slt_single_param_frame_0, cmu_us_slt_single_param_frame_1, cmu_us_slt_single_param_frame_2, ... cmu_us_slt_single_param_frame_8872, }; ---------------------------------------------------------- Here is the profile showing the IPA functions: 13712 16.4822 cc1 ipa_icf::sem_variable::equals(tree_node*, tree_node*) 8578 10.3110 cc1 ipa_icf::sem_item_optimizer::do_congruence_step_for_index(ipa_icf::congruence_class*, unsigned int) 6427 7.7254 cc1 ipa_icf::sem_variable::equals(ipa_icf::sem_item*, hash_map&) 1891 2.2730 cc1 ipa_icf_gimple::func_checker::compatible_types_p(tree_node*, tree_node*) 803 0.9652 cc1 ipa_icf::sem_item_optimizer::subdivide_classes_by_equality(bool) This may be normal, I don't know, but ~40% for IPA when there are no procedures seems very wrong. I did build GCC with -fno-inline so that could be a factor. The code is too large to attach even as an xz. I will attach a shortened version. I get these results on the shorter code: 1476 11.9689 cc1 ipa_icf::sem_variable::equals(tree_node*, tree_node*) 364 2.9517 cc1 ipa_icf::sem_item_optimizer::do_congruence_step_for_index(ipa_icf::congruence_class*, unsigned int) 306 2.4813 cc1 ipa_icf::sem_variable::equals(ipa_icf::sem_item*, hash_map&) 140 1.1353 cc1 ipa_icf_gimple::func_checker::compatible_types_p(tree_node*, tree_node*) 98 0.7947 cc1 ipa_icf::sem_item_optimizer::subdivide_classes_by_equality(bool) To build the code: gunzip bug.c.gz && gcc -m32 -O2 -c bug.c -o bug.o This is with GCC 5.2.0, 32-bit x86. Thank you. Neil.