File tree 1 file changed +15
-0
lines changed
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,
724
724
work_items. push ( work) ;
725
725
}
726
726
727
+ if sess. time_passes ( ) && sess. opts . incremental . is_some ( ) {
728
+ dump_incremental_data ( & trans) ;
729
+ }
730
+
727
731
// Process the work items, optionally using worker threads.
728
732
// NOTE: This code is not really adapted to incremental compilation where
729
733
// the compiler decides the number of codegen units (and will
@@ -901,6 +905,17 @@ pub fn run_passes(sess: &Session,
901
905
}
902
906
}
903
907
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
+
904
919
struct WorkItem {
905
920
mtrans : ModuleTranslation ,
906
921
config : ModuleConfig ,
You can’t perform that action at this time.
0 commit comments