public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug ipa/68035] New: ipa performance issue when no procedures are present
@ 2015-10-20 20:46 ncahill_alt at yahoo dot com
  2015-10-21  8:18 ` [Bug ipa/68035] " rguenth at gcc dot gnu.org
  2015-10-21  8:19 ` [Bug ipa/68035] [5/6 Regression] " rguenth at gcc dot gnu.org
  0 siblings, 2 replies; 3+ messages in thread
From: ncahill_alt at yahoo dot com @ 2015-10-20 20:46 UTC (permalink / raw)
  To: gcc-bugs

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<symtab_node*,
ipa_icf::sem_item*, default_hashmap_traits>&)
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<symtab_node*,
ipa_icf::sem_item*, default_hashmap_traits>&)
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.


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

* [Bug ipa/68035] ipa performance issue when no procedures are present
  2015-10-20 20:46 [Bug ipa/68035] New: ipa performance issue when no procedures are present ncahill_alt at yahoo dot com
@ 2015-10-21  8:18 ` rguenth at gcc dot gnu.org
  2015-10-21  8:19 ` [Bug ipa/68035] [5/6 Regression] " rguenth at gcc dot gnu.org
  1 sibling, 0 replies; 3+ messages in thread
From: rguenth at gcc dot gnu.org @ 2015-10-21  8:18 UTC (permalink / raw)
  To: gcc-bugs

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

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |mliska at suse dot cz

--- Comment #1 from Richard Biener <rguenth at gcc dot gnu.org> ---
We try to remove equivalent static const globals (thus unify them).  But we
should quickly arrive to the conclusion they are not equal, sth that doesn't
work here.  Eventually the hashing is also bad.


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

* [Bug ipa/68035] [5/6 Regression] ipa performance issue when no procedures are present
  2015-10-20 20:46 [Bug ipa/68035] New: ipa performance issue when no procedures are present ncahill_alt at yahoo dot com
  2015-10-21  8:18 ` [Bug ipa/68035] " rguenth at gcc dot gnu.org
@ 2015-10-21  8:19 ` rguenth at gcc dot gnu.org
  1 sibling, 0 replies; 3+ messages in thread
From: rguenth at gcc dot gnu.org @ 2015-10-21  8:19 UTC (permalink / raw)
  To: gcc-bugs

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

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |compile-time-hog
   Target Milestone|---                         |5.3
            Summary|ipa performance issue when  |[5/6 Regression] ipa
                   |no procedures are present   |performance issue when no
                   |                            |procedures are present


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

end of thread, other threads:[~2015-10-21  8:19 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-10-20 20:46 [Bug ipa/68035] New: ipa performance issue when no procedures are present ncahill_alt at yahoo dot com
2015-10-21  8:18 ` [Bug ipa/68035] " rguenth at gcc dot gnu.org
2015-10-21  8:19 ` [Bug ipa/68035] [5/6 Regression] " rguenth 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).