Bug 36519 - [4.3 Regression] time/memory hog for c++ source.
Summary: [4.3 Regression] time/memory hog for c++ source.
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: tree-optimization (show other bugs)
Version: 4.3.2
: P2 normal
Target Milestone: 4.3.2
Assignee: Richard Biener
URL:
Keywords: alias, compile-time-hog, memory-hog
Depends on:
Blocks: 33870 36339
  Show dependency treegraph
 
Reported: 2008-06-13 08:15 UTC by Pawel Sikora
Modified: 2008-06-23 10:14 UTC (History)
2 users (show)

See Also:
Host:
Target: x86_64-gnu-linux
Build:
Known to work:
Known to fail: 4.3.1
Last reconfirmed: 2008-06-13 09:27:53


Attachments
testcase (116.86 KB, application/octet-stream)
2008-06-13 08:17 UTC, Pawel Sikora
Details
patch (1.49 KB, patch)
2008-06-13 10:02 UTC, Richard Biener
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Pawel Sikora 2008-06-13 08:15:41 UTC
i discovered one more problem with 4.3 branch head with patch suggested
in comment http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36498#c7

stats:
gcc-4.3-20080417   : ~500MB, 50 seconds.
gcc-4.3-head+patch : 5GB, 100% cpu, 40 minutes and still going...

# command line:
x86_64-gnu-linux-g++ esClockAnalyzerPrimitivesInitialization.ii \
                     -c -std=gnu++0x -g0 -O2

(gdb) bt
#0  0x0000000000703f4f in VN_INFO ()
#1  0x00000000007082ab in run_scc_vn ()
#2  0x00000000006fe95b in execute_pre ()
#3  0x00000000006ff27e in execute_fre ()
#4  0x00000000005f4c18 in execute_one_pass ()
#5  0x00000000005f4dac in execute_pass_list ()
#6  0x00000000005f4dbe in execute_pass_list ()
#7  0x0000000000697b22 in tree_rest_of_compilation ()
#8  0x0000000000796002 in cgraph_expand_function ()
#9  0x000000000079774e in cgraph_optimize ()
#10 0x000000000044864f in cp_write_global_declarations ()
#11 0x000000000066628e in toplev_main ()
#12 0x00002b6fe60a34a4 in __libc_start_main () from /lib64/libc.so.6
#13 0x0000000000402709 in _start ()
Comment 1 Pawel Sikora 2008-06-13 08:17:53 UTC
Created attachment 15759 [details]
testcase
Comment 2 Richard Biener 2008-06-13 09:15:30 UTC
Confirmed.

void es::ClockAnalyzer::initPrimitives()

is the offending function - yet another testcase with a huge initialization
sequence (we have problems there since long).  This is probably caused by
the fix for PR36339.

In the mean time building with -O1 is fine (the branch has SFTs disabled
there now), and the root of all evil is the fix for PR33870.
Comment 3 Richard Biener 2008-06-13 09:27:53 UTC
Mine.
Comment 4 Richard Biener 2008-06-13 10:02:06 UTC
Created attachment 15761 [details]
patch

Patch.  Wider testing appreciated.
Comment 5 Pawel Sikora 2008-06-14 14:04:58 UTC
(In reply to comment #4)
> Created an attachment (id=15761) [edit]
> patch
> 
> Patch.  Wider testing appreciated.
 
this patch fixes all my c++ hogs.
Comment 6 Richard Biener 2008-06-23 10:11:28 UTC
Subject: Bug 36519

Author: rguenth
Date: Mon Jun 23 10:10:38 2008
New Revision: 137033

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=137033
Log:
2008-06-23  Richard Guenther  <rguenther@suse.de>

	PR tree-optimization/36519
	* tree-ssa-alias.c (mem_sym_score): Count call-clobbered
	unpartitionable SFTs in the usual way.
	(compute_memory_partitions): Do partition call-clobbered
	unpartitionable SFTs, but make sure to partition all other
	SFTs of its parent var into the same partition.

Modified:
    branches/gcc-4_3-branch/gcc/ChangeLog
    branches/gcc-4_3-branch/gcc/tree-ssa-alias.c

Comment 7 Richard Biener 2008-06-23 10:14:45 UTC
Fixed.