Conversation
4d4995b to
707de59
Compare
|
|
||
| fn alloca_with_ty(&mut self, _layout: TyAndLayout<'tcx>) -> Self::Value { | ||
| bug!("scalable alloca is not supported in SPIR-V backend") | ||
| } |
There was a problem hiding this comment.
this is the replacement for scalable_alloca, otherwise this is never called, although judging by the name who knows what'll be used for in the future
| ) -> (Vec<ThinModule<Self>>, Vec<WorkProduct>) { | ||
| link::run_thin(cgcx, modules, cached_modules) | ||
| // Note(@firestar99): gcc impl this as unreachable as well | ||
| unreachable!() |
There was a problem hiding this comment.
Are we sure this is unreachable? What if someone sets LTO to thin?
https://doc.rust-lang.org/cargo/reference/profiles.html#lto
Wouldn't what we did before, just pass-through, not be better?
There was a problem hiding this comment.
The gcc impl is just unreachable!(), as gcc doesn't seem to have ThinLTO: rust-lang
I personally feel like we've got quite a few things implemented "in case they are used" without actually knowing when they're used. So we can't test them either, so there's no way to know whether our "mock" implementations actually work. To me, removing these dead code paths by a hard error and seeing it never trigger is a good thing, as it means less code to maintain.
With the ThinLTO interface having gotten a refactor the past week, I don't exactly know how to actually implement this pass-through correctly, and even worse, how to even test it.
No description provided.