9:59:59.000,9:59:59.000 Okay, hi everybody, I am Scott. 9:59:59.000,9:59:59.000 My mentor is Nico. I am from 9:59:59.000,9:59:59.000 Perdue University. I am a PhD student. 9:59:59.000,9:59:59.000 My talk is on MIR Optimizations. I work on 9:59:59.000,9:59:59.000 the rust compiler. So this is the "get 9:59:59.000,9:59:59.000 pumped up!" slide. I'm going to tell you 9:59:59.000,9:59:59.000 these things and feel free to cheer 9:59:59.000,9:59:59.000 whenever you're ready. Do you want faster 9:59:59.000,9:59:59.000 programs? Yeah! 9:59:59.000,9:59:59.000 [audience cheering "yeah!"] 9:59:59.000,9:59:59.000 [audience laughs] 9:59:59.000,9:59:59.000 Do you want longer battery life? 9:59:59.000,9:59:59.000 [audience cheering "hell yeah!] 9:59:59.000,9:59:59.000 Do you want more free memory? 9:59:59.000,9:59:59.000 [audience cheering] 9:59:59.000,9:59:59.000 We want all these things and how are we 9:59:59.000,9:59:59.000 going to get them? We're going to get them 9:59:59.000,9:59:59.000 through compiler optimization. 9:59:59.000,9:59:59.000 [audience laughs] 9:59:59.000,9:59:59.000 Okay, so I need to do some background 9:59:59.000,9:59:59.000 before I jump into what I did this summer, but 9:59:59.000,9:59:59.000 it's going to be pretty brief and high 9:59:59.000,9:59:59.000 level, so I'll go fast just so we're all 9:59:59.000,9:59:59.000 on the same page. We start from the Rust 9:59:59.000,9:59:59.000 Source, which Cameron talked about Rust 9:59:59.000,9:59:59.000 in his previous presentation. Basically 9:59:59.000,9:59:59.000 it's a high level systems programming 9:59:59.000,9:59:59.000 language. And the compiler doesn't just 9:59:59.000,9:59:59.000 compile Rust line by line in the machine 9:59:59.000,9:59:59.000 code, it goes through intermediate steps. 9:59:59.000,9:59:59.000 It compiles the Rust Source to High Level 9:59:59.000,9:59:59.000 Intermediate Representation to LLVM 9:59:59.000,9:59:59.000 Intermediate Remediation, and then to 9:59:59.000,9:59:59.000 Machine Code. This is pretty much how most 9:59:59.000,9:59:59.000 compilers work of high level (incoherent) 9:59:59.000,9:59:59.000 languages. You don't want to go from 9:59:59.000,9:59:59.000 Source to Machine Code in one step. 9:59:59.000,9:59:59.000 What we do recently--actually today the 9:59:59.000,9:59:59.000 Rust team flipped the switch and now MIR 9:59:59.000,9:59:59.000 is part of the Rust Compiler. MIR stands 9:59:59.000,9:59:59.000 for "Middle Intermediate Representation" 9:59:59.000,9:59:59.000 and it's coincidentally the same name of a 9:59:59.000,9:59:59.000 space ship...that's the space ship. 9:59:59.000,9:59:59.000 So what did we do? There's now a tiny 9:59:59.000,9:59:59.000 space ship in the compiler and it's 9:59:59.000,9:59:59.000 between the High Level and LLVM IR. 9:59:59.000,9:59:59.000 So, why would we do this? What's MIR 9:59:59.000,9:59:59.000 good for? Basically, it's the simple core 9:59:59.000,9:59:59.000 of Rust. It makes things explicit that 9:59:59.000,9:59:59.000 were not explicit in Rust's code because 9:59:59.000,9:59:59.000 you wouldn't want the [incoherent] to 9:59:59.000,9:59:59.000 detect these things out, obviously. Types 9:59:59.000,9:59:59.000 of variables should be elighted in certain