c/1687: [3.3/3.4 regression] Extreme compile time regression from 2.95.3

Steven Bosscher s.bosscher@student.tudelft.nl
Thu Apr 17 13:16:00 GMT 2003


The following reply was made to PR c/1687; it has been noted by GNATS.

From: Steven Bosscher <s.bosscher@student.tudelft.nl>
To: gcc-gnats@gcc.gnu.org, kelley.cook@home.com,
	gcc-bugs@gcc.gnu.org, nobody@gcc.gnu.org, gcc-prs@gcc.gnu.org,
	mark@codesourcery.com
Cc:  
Subject: Re: c/1687: [3.3/3.4 regression] Extreme compile time regression
 from 2.95.3
Date: Thu, 17 Apr 2003 15:11:21 +0200

 Hi,
 
 The GCC C front end shows exponential behavior in time for this
 code with -finline-functions.  The time is spent in walk_tree but
 the problem may be elsewhere, I haven't looked at that yet.
 
 --------------------------------
 typedef int bool;
 bool in0, in1, in2, in3, in4, in5, in6, in7, in8, in9;
 unsigned long output;
 
 void mux(void)
 {
   output =
       (in0   ?  0x00000001 : 0) | (in1   ?  0x00000008 : 0) |
       (in2   ?  0x00000001 : 0) | (in3   ?  0x00000008 : 0) |
       (in4   ?  0x00000001 : 0) | (in5   ?  0x00000008 : 0) |
       (in6   ?  0x00000001 : 0) | (in7   ?  0x00000008 : 0) |
       (in8   ?  0x00000001 : 0) | (in9   ?  0x00000008 : 0)
   ;
 }
 --------------------------------
 
 This function has 10 variables "int ii??".  I have similair programs
 with 11, 12, 13, 14 and 15 "int ii??" variables (I started with 32,
 like the original test case, but it ate memory until it died).
 
 Here is the output for "time cc1 -quiet -O -finline-functions":
 
 # of in??      log(user+sys)   user+sys    user    sys
 10                -0.284         0.52      0.49    0.03
 11                 0.130         1.35      1.35    0
 12                 0.590         3.89      3.87    0.02
 13                 1.059        11.47     11.47    0
 14                 1.534        34.23     34.21    0.02
 15                 2.012       102.92    102.88    0.04
 
 GNU C version 3.4 20030417 (experimental) (i586-pc-linux-gnu)
     compiled by GNU C version 2.95.3 20010315 (SuSE).
 GGC heuristics: --param ggc-min-expand=42 --param ggc-min-heapsize=23891
 
 The C++ front end does not show this behavior.
 
 Greetz
 Steven
 
 http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=1687 
 
 



More information about the Gcc-prs mailing list