@notgull @cr1901 There are indeed a couple of optimizations, but not much. A cg_llvm compiled cg_clif builds the standard library in 19s. A cg_clif compiled rustc/cg_clif builds the standard library in 4m 42s, or in other words about a 14x slowdown. https://github.com/rust-lang/rustc_codegen_cranelift/actions/runs/10514598355/job/29132791693 To shrink the gap, implementing clif ir level inlining (which should be more effective than mir inlining) as well as better optimizations of loads and stores should help a fair bit.
@bjorn3 @notgull Idk about 14x, but I think even a 3x slowdown would be acceptable to me personally :P.