[m-rev.] [reuse] for review: files erronuously touchedu

Nancy Mazur Nancy.Mazur at cs.kuleuven.ac.be
Sat Aug 11 02:04:35 AEST 2001


> On 10-Aug-2001, Nancy Mazur <Nancy.Mazur at cs.kuleuven.ac.be> wrote:
> > Estimated hours taken: 1
> > Branches: reuse
> > 
> > In combination with smart_recompilation, problems occurred as
> > files were erronuously touched where they shouldn't. This problem 
> > is caused by the fact that we delay the generation of the .trans_opt
> > file till after stage 50 (as reuse analysis will only be done 
> > by then). Normally it assumed that once after stage 50, 
> > full compilation will be required, hence touching all the necessary
> > files. 
> > 
> > mercury_compile.m:
> > 	After stage 50, either check whether only the trans_opts
> > 	need to be generated. If so, do so, if not, go on, and compile till 
> > 	the end, including touching all possible files. 
> 
> This change stops the compiler touching the `.c_date' file when writing
> the `.trans_opt' file, but the compiler will still be doing some other
> things it shouldn't do when writing the `.trans_opt' file, for example
> generating the profiling call graph and generating Aditi bytecode.
> 
> Given that all you really want is to make sure the middle (optimization)
> passes are run before the `.trans_opt' file is written out, it would be
> much simpler to put the call to mercury_compile__output_trans_opt_file
> back where it is in the main branch compiler, and call
> mercury_compile__middle_pass from there.
> 
> Simon.
>  
> --- mercury_compile.m.old	Sat Aug 11 01:46:06 2001
> +++ mercury_compile.m	Sat Aug 11 01:46:38 2001
> @@ -1000,6 +1000,9 @@
>  	    ; { MakeOptInt = yes } ->
>  		% only run up to typechecking when making the .opt file
>  		[]
> +	    ; { MakeTransOptInt = yes } ->
> +		mercury_compile__middle_pass(ModuleName, HLDS21, HLDS50, _),
> +	    	mercury_compile__output_trans_opt_file(HLDS50)
>  	    ;
>  		mercury_compile__maybe_output_prof_call_graph(HLDS21,
>  			Verbose, Stats, HLDS25),
> @@ -1029,9 +1032,6 @@
>  				Verbose, MaybeRLFile),
>  		    ( { AditiOnly = yes } ->
>  			{ HLDS = HLDS50 }
> -		    ; { MakeTransOptInt = yes } -> 
> -			{ HLDS = HLDS50 },
> -			mercury_compile__output_trans_opt_file(HLDS50)
>  		    ; { Target = il } ->
>  			{ HLDS = HLDS50 },
>  			mercury_compile__mlds_backend(HLDS, MLDS),

Hmm, cool, I didn't think of that! 

Thx, 

Nancy

--------------------------------------------------------------------------
mercury-reviews mailing list
post:  mercury-reviews at cs.mu.oz.au
administrative address: owner-mercury-reviews at cs.mu.oz.au
unsubscribe: Address: mercury-reviews-request at cs.mu.oz.au Message: unsubscribe
subscribe:   Address: mercury-reviews-request at cs.mu.oz.au Message: subscribe
--------------------------------------------------------------------------



More information about the reviews mailing list