This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug ipa/68035] New: ipa performance issue when no procedures are present


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]