chicken-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: [Chicken-users] Compile problem on cygwin


From: Jonah Beckford
Subject: RE: [Chicken-users] Compile problem on cygwin
Date: Thu, 27 Feb 2003 07:29:06 -0500

Hadn't realized there was a 0.1088 out ...

Your comment about not having all the information about the call-sites
and targets is absolutely right.  However, the C compiler also won't
have any information on these call-sites either ==> the C ompiler won't
be able to optimize it ==> the call sites and targets can be in separate
files without any performance degradation.  At the end of the day, the
CHICKEN compiler will always have more information than the C compiler.

Now as to how easy the algorithm should be, can't say off the top of my
head.  First, graph partitioning is a NP-complete problem, but
heuristics work well in practice, and the call-sites/targets dependency
graph will be quite spare, which makes things quite simpler.  Second, I
have no idea on how to construct this dependency graph (I am not that
familiar with the .scm code for the compiler) ... I will likely need
help on that.

Jonah

-----Original Message-----
From: Felix Winkelmann [mailto:address@hidden 
Sent: February 27, 2003 2:41 AM
To: Jonah Beckford
Cc: address@hidden
Subject: Re: [Chicken-users] Compile problem on cygwin


Jonah Beckford wrote:
> I am not sure if this is particular to my installation of cygwin, but 
> my
> gcc 3.2 blows up on syntax-case.c using -O3 optimization:
>  
> *************
> chicken syntax-case.scm -quiet -debug-level 0 -optimize-level 2
> -include-path . -no-warnings  -output-file syntax-case.c -explicit-use
>  
> /bin/bash ./libtool --mode=compile gcc -DHAVE_CONFIG_H -I. -I. -I.
> -DC_STACK_GROWS_DOWNWARD=1 
> -DC_INSTALL_LIB_HOME='"/usr/local/lib/chicken"' -DC_USE_C_DEFAULTS    
> -O3 -fomit-frame-pointer -DHAVE_ALLOCA_H -fstrict-aliasing  -c -o 
> syntax-case.lo `test -f 'syntax-case.c' || echo './'`syntax-case.c
>  gcc -DHAVE_CONFIG_H -I. -I. -I. -DC_STACK_GROWS_DOWNWARD=1 
> -DC_INSTALL_LIB_HOME=\"/usr/local/lib/chicken\" -DC_USE_C_DEFAULTS -O3

> -fomit-frame-pointer -DHAVE_ALLOCA_H -fstrict-aliasing -c
syntax-case.c  
> -DPIC -o .libs/syntax-case.o
>  
> cc1: Cannot allocate 786992560 bytes after allocating 95600640 bytes
> make: *** [syntax-case.lo] Error 1
> *************

syntax-case.c should be about 22k lines. Because of exactly this problem
a special declaration was added (compress-literals) to reduce the amount
of code needed to create the relatively large literal objects in the
file.

Actually, the "-no-warnings" option suppresses a warning about the
non-implemented declaration. I will have to fix that.

So: I guess you are using an old version of chicken to build from CVS,
right? What does "chicken -version" show? You need at least build 1088
to compile from sources:

http://www.call-with-current-continuation.org/chicken-0.1088.tar.gz
http://www.call-with-current-continuation.org/chicken-0.1097.tar.gz

(note that 1097 above is slightly older than the current CVS version)

>  
> The -O3 is standard for CHICKEN on cygwin ... I could implement a
> standard partitioning algorithm (which will have to minimize the
number 
> of cross-file continuation/function calls while maximizing the number 
> of continuations in a given file, so we get the maximum optimization 
> possible) to split up CHICKEN generated .c files so they don't get so 
> large.  Anyone have any other suggestions or an objection?
 >
 > The modification would probably look like:
 > % chicken syntax-case.scm -split 4 -output-prefix syntax-case  >
which would generate four files: syntax-case[1-4].c

That's a pretty cool idea. How difficult would that be? Wouldn't you
need quite a lot of information about call-sites/-targets? (which isn't
always available).


cheers,
felix





reply via email to

[Prev in Thread] Current Thread [Next in Thread]