Bug 43654 - [graphite] Very long compile time with -O2 -floop-block
Summary: [graphite] Very long compile time with -O2 -floop-block
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: middle-end (show other bugs)
Version: 4.5.0
: P3 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords: compile-time-hog
Depends on:
Blocks:
 
Reported: 2010-04-05 20:44 UTC by Zdenek Sojka
Modified: 2013-07-13 18:24 UTC (History)
2 users (show)

See Also:
Host: x86_64-pc-linux-gnu
Target: x86_64-pc-linux-gnu
Build:
Known to work:
Known to fail:
Last reconfirmed:


Attachments
reduced testcase (111 bytes, text/plain)
2010-04-05 20:49 UTC, Zdenek Sojka
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Zdenek Sojka 2010-04-05 20:44:27 UTC
Tested revisions:
r157965 - fail (~140s)
r153685 - crash
4.4 r157895 - OK (~0.2s)

Executed on a 1.6GHz CPU, CLooG-PPL 0.15.8, PPL 0.10.2:
$ /mnt/svn/gcc-trunk/binary-157965-lto/bin/gcc -O2 -floop-block testcase.c -ftime-report -c

Execution times (seconds)
 Graphite loop transforms: 135.75 (100%) usr   0.88 (100%) sys 137.88 (100%) wall      26 kB ( 1%) ggc
 Graphite data dep analysis:   0.02 ( 0%) usr   0.00 ( 0%) sys   0.01 ( 0%) wall       0 kB ( 0%) ggc
 Graphite code generation:   0.05 ( 0%) usr   0.00 ( 0%) sys   0.06 ( 0%) wall      59 kB ( 3%) ggc
 tree iv optimization  :   0.01 ( 0%) usr   0.00 ( 0%) sys   0.01 ( 0%) wall     151 kB ( 8%) ggc
 tree STMT verifier    :   0.00 ( 0%) usr   0.00 ( 0%) sys   0.01 ( 0%) wall       0 kB ( 0%) ggc
 loop invariant motion :   0.01 ( 0%) usr   0.00 ( 0%) sys   0.01 ( 0%) wall       5 kB ( 0%) ggc
 branch prediction     :   0.01 ( 0%) usr   0.00 ( 0%) sys   0.00 ( 0%) wall       2 kB ( 0%) ggc
 reload                :   0.01 ( 0%) usr   0.00 ( 0%) sys   0.01 ( 0%) wall       4 kB ( 0%) ggc
 TOTAL                 : 135.87             0.88           137.99               1961 kB
Extra diagnostic checks enabled; compiler may run slowly.
Configure with --enable-checking=release to disable checks.

Disabling checking doesn't help.
Comment 1 Zdenek Sojka 2010-04-05 20:49:40 UTC
Created attachment 20316 [details]
reduced testcase

When the loop body is changed to:
        x[i][j][k] = i + j + k;
compilation finishes in ~85s
Comment 2 Zdenek Sojka 2010-04-18 22:14:26 UTC
-floop-block -fstrict-aliasing also makes gfortran.fortran-torture/execute/forall_1.f90 to timeout at -O[123s]
Comment 3 Sebastian Pop 2013-07-13 18:24:02 UTC
This is fixed on trunk r200918.

On my ARM exynos5 laptop, -ftime-report on the reduced testcase of comment#1 is:

 Graphite loop transforms:   0.72 (74%) usr   0.00 ( 0%) sys   0.76 (54%) wall      17 kB ( 1%) ggc
 Graphite data dep analysis:   0.02 ( 2%) usr   0.00 ( 0%) sys   0.02 ( 1%) wall       0 kB ( 0%) ggc
 Graphite code generation:   0.06 ( 6%) usr   0.00 ( 0%) sys   0.07 ( 5%) wall      20 kB ( 1%) ggc