Skip to content

update toolchain to nightly-2026-04-08#554

Open
Firestar99 wants to merge 1 commit intomainfrom
toolchain-2026-04-08
Open

update toolchain to nightly-2026-04-08#554
Firestar99 wants to merge 1 commit intomainfrom
toolchain-2026-04-08

Conversation

@Firestar99
Copy link
Copy Markdown
Member

No description provided.

@Firestar99 Firestar99 force-pushed the toolchain-2026-04-08 branch from 4d4995b to 707de59 Compare April 8, 2026 16:23

fn alloca_with_ty(&mut self, _layout: TyAndLayout<'tcx>) -> Self::Value {
bug!("scalable alloca is not supported in SPIR-V backend")
}
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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!()
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants