What will you do?
Research the utility of TBAA for Rust. More specifically, how TBAA metadata could improve optimization in Rust’s LLVM backend, the difficulties of doing so, and whether current LLVM optimizations fully leverage Rust’s type system.
How will you do it?
To evaluate the utility of TBAA for Rust, I will do the following:
- Study how TBAA works in LLVM and how it is applied in other languages (like C/C++) to inform potential benefits for Rust.
- Examine Rust’s LLVM IR output (using rustc --emit=llvm-ir) to determine whether and how TBAA metadata is currently used.
- Modify small Rust test programs to explore aliasing behaviors and inspect resulting optimizations with and without TBAA-related metadata.
Consult compiler sources: Review relevant parts of rustc_codegen_llvm to understand current TBAA integration and identify missing opportunities.
How will you empirically measure success?
I will measure the differences in generated LLVM IR and resulting performance (e.g., runtime, binary size, optimization passes triggered) with and without TBAA metadata, assess whether Rust’s aliasing semantics could safely permit more aggressive optimizations under TBAA assumptions without violating language safety guarantees. All of these will be supported with code examples and performance data.
Team members:
Me (Jonathan Brown)😃
What will you do?
Research the utility of TBAA for Rust. More specifically, how TBAA metadata could improve optimization in Rust’s LLVM backend, the difficulties of doing so, and whether current LLVM optimizations fully leverage Rust’s type system.
How will you do it?
To evaluate the utility of TBAA for Rust, I will do the following:
Consult compiler sources: Review relevant parts of rustc_codegen_llvm to understand current TBAA integration and identify missing opportunities.
How will you empirically measure success?
I will measure the differences in generated LLVM IR and resulting performance (e.g., runtime, binary size, optimization passes triggered) with and without TBAA metadata, assess whether Rust’s aliasing semantics could safely permit more aggressive optimizations under TBAA assumptions without violating language safety guarantees. All of these will be supported with code examples and performance data.
Team members:
Me (Jonathan Brown)😃