File tree Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -724,6 +724,10 @@ pub fn run_passes(sess: &Session,
724724 work_items. push ( work) ;
725725 }
726726
727+ if sess. time_passes ( ) && sess. opts . incremental . is_some ( ) {
728+ dump_incremental_data ( & trans) ;
729+ }
730+
727731 // Process the work items, optionally using worker threads.
728732 // NOTE: This code is not really adapted to incremental compilation where
729733 // the compiler decides the number of codegen units (and will
@@ -901,6 +905,17 @@ pub fn run_passes(sess: &Session,
901905 }
902906}
903907
908+ fn dump_incremental_data ( trans : & CrateTranslation ) {
909+ let mut reuse = 0 ;
910+ for mtrans in trans. modules . iter ( ) {
911+ match mtrans. source {
912+ ModuleSource :: Preexisting ( ..) => reuse += 1 ,
913+ ModuleSource :: Translated ( ..) => ( ) ,
914+ }
915+ }
916+ println ! ( "incremental: re-using {} out of {} modules" , reuse, trans. modules. len( ) ) ;
917+ }
918+
904919struct WorkItem {
905920 mtrans : ModuleTranslation ,
906921 config : ModuleConfig ,
You can’t perform that action at this time.
0 commit comments