[M3devel] [M3commit] CVS Update: cm3

Jay K jay.krell at cornell.edu
Wed Jun 6 11:38:18 CEST 2012


5.8.6 does allow many optimizations to occur.
We turn off a very small number directly.
Functions that call setjmp have optimizations inhibited by declaring all locals volatile.
We don't give the compiler good type information, and we take the address of stuff more than necessary, by
generating very low level code.
Where you have e.g.
MODULE Foo;
TYPE Point =  RECORD x,y:INTEGER END;
PROCEDURE GetY(VAR pt:Point):INTEGER = BEGIN RETURN pt.y; END GetY;


We generate the equivalent of:


typedef ptrdiff_t INTEGER;
typedef char* ADDRESS;
INTEGER Foo_GetY(ADDRESS pt) { return *(INTEGER*)(pt + sizeof(INTEGER)); }


Maybe I'll wrap up 4.6, not enable it, and move on to 4.7..



 - Jay


________________________________
> Subject: Re: [M3devel] [M3commit] CVS Update: cm3 
> From: dragisha at m3w.org 
> Date: Wed, 6 Jun 2012 10:51:33 +0200 
> CC: jkrell at elego.de; m3devel at elegosoft.com 
> To: jay.krell at cornell.edu 
>  
> I am using it, and I need it. 
>  
> Does it run better/faster? I didn't test, but is it something to even  
> ask, these days, architectures, … ? 
>  
> Only if you turned everything off in 5.8.6 and later, as you'r doing it  
> now, then probably my "-O2" default it is of no benefit at all :). 
>  
> Generally, our "pitch" to "sell"  
> super-modern-ultra-blast-mega-fast-superlative-OO and everything else  
> you only dreamed about… And add "no CPU optimizations"… Imagine that. 
>  
> On Jun 6, 2012, at 10:10 AM, Jay K wrote: 
>  
> 7) Do folks out there really use the Modula-3/gcc optimizer, and notice  
> it produces code that runs much faster? 
>  
 		 	   		  


More information about the M3devel mailing list