[M3devel] changing m3middle/m3back to have multiple passes?

hendrik at topoi.pooq.com hendrik at topoi.pooq.com
Sun Apr 4 03:20:57 CEST 2010


On Thu, Apr 01, 2010 at 03:10:04PM +0000, Jay K wrote:
> 
>  However memory capacity has increased tremendously.
> 
>  
> 
>  
> 
> Whereas I'm only thinking about multiple passes, while still compiling 
> one file at a time,
> 
> other compilation systems have capitalized on larger memories and now 
> compile entire programs at once, including multiple passes.
> 
>   This goes by multiple names -- "whole program optimization", "link 
> time codegen (LTCG)".

Link-time code generation was already involved in Mark Rain's Mary 2 
compiler in the early 80's.  It didn't actually require today's huge 
memories.

Every now and then the Modula 3 compiler seems to decide to recompile 
something because new source had been discovered, or soething like that. 
I suspect this is because a new .m3 file changes the memory layout that 
was assumed in aanother source file, so that other one needs to be 
reconsidered.  Is the complexity of tracking that simpler or more 
complex than doing whole-program compilation?

It's possible that file-by-file compilation is a simpler match for 
interacting with foreign-language compilations, theough.  It two 
languages insist on only compiling whole programs, it makes 
mixed-language programming difficult.

-- hendrik



More information about the M3devel mailing list