#!/bin/tcsh # Script to perform manually a 3 stage bootstrap which goal is to have a new compiler # compiled with the new code generation and test it on itself. # stage 1: ec generates ec_stage1 that will generate code with new code generation # stage 2: ec_stage1 generates ec_stage2 that is generated with new code generation # and that will generate code with new code generation. # stage 3: verification `ec_stage3' and `ec_stage2' should be identical, but time # used to build ec_stage2 should be different from time to build ec_stage3. # Usually it should be shorter to generate ec_stage3, in which case we have # improved the performance of the compiler. # Remove old compilations rm -rf EIFGEN rm -f ec_stage1 rm -f ec_stage2 rm -f ec_stage3 rm -rf F_code_stage1 rm -rf F_code_stage2 rm -rf F_code_stage3 #set ace = "batch.unix.ace" set ace = "newbench.linux.ace" #First stage of bootstrap (time ec -finalize -ace $ace -batch >& e_comp1 )>> e_comp1 cd EIFGEN/F_code (time finish_freezing >& ../../c_comp1 )>> ../../c_comp1 strip ec mv ec ../../ec_stage1 cd .. mv F_code ../F_code_stage1 cd .. #If first stage succeeded, let's go for Second stage of bootstrap if ( -e ec_stage1 ) then rm -rf EIFGEN (time ./ec_stage1 -finalize -ace $ace -batch >& e_comp2 )>> e_comp2 cd EIFGEN/F_code (time finish_freezing >& ../../c_comp2)>> ../../c_comp2 strip ec mv ec ../../ec_stage2 cd .. mv F_code ../F_code_stage2 cd .. #if second stage succeeded, let's go for Third and final stage of bootstrap if ( -e ec_stage2) then rm -rf EIFGEN (time ./ec_stage2 -finalize -ace $ace -batch >& e_comp3 )>> e_comp3 cd EIFGEN/F_code (time finish_freezing >& ../../c_comp3)>> ../../c_comp3 strip ec mv ec ../../ec_stage3 cd .. mv F_code ../F_code_stage3 cd .. endif endif