Related articles |
---|
GCC does not cope with my code braung@ert.rwth-aachen.de (Gunnar Braun) (2000-05-24) |
Re: GCC does not cope with my code mq@maq.org (2000-05-28) |
Re: GCC does not cope with my code webid@asi.fr (Armel) (2000-05-28) |
Re: GCC does not cope with my code chrisd@reservoir.com (Chris Dodd) (2000-05-28) |
Re: GCC does not cope with my code rus@tamu.edu (Silvius Rus) (2000-05-28) |
Re: GCC does not cope with my code bonzini@gnu.org (2000-05-28) |
Re: GCC does not cope with my code gnb@itga.com.au (Gregory Bond) (2000-05-28) |
Re: GCC does not cope with my code J.Scheerder@cwi.nl (2000-05-28) |
Re: GCC does not cope with my code Wilco.Dijkstra@arm.com (Wilco Dijkstra) (2000-05-28) |
Re: GCC does not cope with my code braung@ert.rwth-aachen.de (Gunnar Braun) (2000-05-31) |
Re: GCC does not cope with my code bosch@nile.gnat.com (Geert Bosch) (2000-06-04) |
From: | Silvius Rus <rus@tamu.edu> |
Newsgroups: | comp.compilers |
Date: | 28 May 2000 21:02:47 -0400 |
Organization: | Texas A&M University-Computer Science Department |
References: | 00-05-091 |
Keywords: | GCC, practice |
Hi, Gunnar!
I had a similar problem with automatically generated code using a
commercial f90 compiler.
I solved it by splitting the generated routine into several others.
Most compiler analysis are intra-procedural and they rely on implicit
assumptions, such as "the size of a procedure cannot be
greater than ***". The benchmarks used to test compilers are written by
humans. That implies a somewhat consistent
sparsity in internal representation graphs.
A worst-case input for a compiler does not have to be huge in terms of
text file size. For instance, if its control-flow graph is
dense, many optimization algorithms will increase their complexity by a
factor roughly equal to the number of statements in
the source code. That means time and space complexity.
However, coming back to the proposed solution, you might experience
significant performance loss if you do this blindly, since
some optimization oportunities will be lost.
Silvius
Gunnar Braun wrote:
> I'm currently developing tools that generate C++ code. The generated
> code contains a bunch of macros which are expanded by the preprocessor.
> No problem up to here. Now I'd like to compile the resulting file with
> g++, but it takes ages until I get the object file. It gets worse, if I
> try to optimize the code generation via -O (of course it gets). The
> problem is that the (source) file (after the macro expansion) isn't
> really large, it's below 700 kB. If the file gets above 700 kB, the
> compiler crashes with the famous signal 11 internal compiler error.
--
Silvius Rus
Texas A&M University Office (979) 862-2599
Computer Science Department Home (979) 695-8776
www.cs.tamu.edu/people/silviusr E-mail rus@tamu.edu
Return to the
comp.compilers page.
Search the
comp.compilers archives again.