http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60243

            Bug ID: 60243
           Summary: IPA is slow on large cgraph tree
           Product: gcc
           Version: 4.9.0
            Status: UNCONFIRMED
          Keywords: compile-time-hog
          Severity: normal
          Priority: P3
         Component: ipa
          Assignee: unassigned at gcc dot gnu.org
          Reporter: rguenth at gcc dot gnu.org

I've built that testcase to show quadraticness in ipa_modify_call_arguments
calls to update_ssa:

#!/bin/sh

for i in `seq $1`; do
    echo "static void test$i (int);"
done

for i in `seq $1`; do
    echo "void test$i (int i) {"
    echo "asm (\"\":::\"memory\");"
    for j in `seq $i $1`; do
        if ! test $i == $j; then
            echo "test$j (i);"
        fi
    done
    echo "}"
done

echo "int main() { test1 (5); return 0; }"

but curiously I see (for 1000 and using 4.8):

 ipa inlining heuristics :   2.78 ( 6%) usr   0.02 ( 0%) sys   2.80 ( 5%) wall 
  1546 kB ( 0%) ggc
 ipa profile             :  14.34 (29%) usr   0.01 ( 0%) sys  14.35 (25%) wall 
     0 kB ( 0%) ggc
 ipa SRA                 :   2.32 ( 5%) usr   2.09 (34%) sys   4.49 ( 8%) wall 
281101 kB (32%) ggc
 tree SSA rewrite        :   0.54 ( 1%) usr   0.68 (11%) sys   1.99 ( 4%) wall 
 87933 kB (10%) ggc
 tree SSA incremental    :   0.02 ( 0%) usr   0.02 ( 0%) sys   0.07 ( 0%) wall 
     0 kB ( 0%) ggc
 TOTAL                 :  49.83             6.10            56.55            
883870 kB

that's because all affected bodies are not yet in SSA form ... heh.  So
that part may not be a real issue.

But the IPA profile part?  At -O2?

Reply via email to