cache attributes of items from foreign crates

this avoids parsing item attributes on each call to `item_attrs`, which takes
off 33% (!) of translation time and 50% (!) of trans-item collection time.
This commit is contained in:
Ariel Ben-Yehuda 2017-04-20 15:08:41 +03:00 committed by Ariel Ben-Yehuda
parent acd0e40b86
commit ece6c8434b
11 changed files with 85 additions and 23 deletions

View file

@ -225,6 +225,8 @@ pub fn compile_input(sess: &Session,
sess.code_stats.borrow().print_type_sizes();
}
if ::std::env::var("SKIP_LLVM").is_ok() { ::std::process::exit(0); }
let phase5_result = phase_5_run_llvm_passes(sess, &trans, &outputs);
controller_entry_point!(after_llvm,