-
Notifications
You must be signed in to change notification settings - Fork 13.8k
llvm: update remarks support on LLVM 22 #146905
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
This comment has been minimized.
This comment has been minimized.
I've logged #146912 for the future work required on this. I didn't do enough digging today to figure out if the feature even makes sense with the changes in LLVM. |
36e8c75
to
f9c040b
Compare
Won't we need something like |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Given the additional information in #146912, we should not land this patch and instead make the minor necessary changes to support the change.
f9c040b
to
2ef90bb
Compare
This comment has been minimized.
This comment has been minimized.
2ef90bb
to
156cfb3
Compare
This comment has been minimized.
This comment has been minimized.
LLVM change dfbd76bda01e removed separate remark support entirely, but it turns out we can just drop the parameter and everything appears to work fine. Fixes 146912 as far as I can tell (the test passes.) @rustbot label llvm-main
156cfb3
to
42cf78f
Compare
The upgrade remarks also mention release/finalization:
I'm not sure off-hand where that should go... |
If I understand correctly, we should get an assertion failure if we're using it incorrectly. Assuming the tests don't assert on LLVM 22, we should be fine. |
@nikic -- I do not fully understand the context here but our builders are broken and this patch could unblock us. What else that needs to happen here to land this change besides the concern about necessary finalization? |
They don't assert as far as I can tell. Our buildkite has been happy with this patch applied. |
Is that with or without the |
Shoot, I forgot we'd also done that. I just ran that test on my workstation with this PR applied at LLVM HEAD and it's passing without any assertion output that I see:
|
You need
|
Okay, then we do need a call to finalizeOptimizationRemarks(). I think the destructor of RustDiagnosticHandler would work for that purpose? |
I added a destructor, and it fixes the assertion while passing our test. r? nikic |
A job failed! Check out the build log: (web) (plain enhanced) (plain) Click to see the possible cause of the failure (guessed by this bot)
|
@bors r+ rollup |
… r=nikic llvm: update remarks support on LLVM 22 LLVM change dfbd76bda01e removed separate remark support entirely, but it turns out we can just drop the parameter and everything appears to work fine. Fixes rust-lang#146912 as far as I can tell (the test passes.)
Rollup of 14 pull requests Successful merges: - #145067 (RawVecInner: add missing `unsafe` to unsafe fns) - #145277 (Do not materialise X in [X; 0] when X is unsizing a const) - #145973 (Add `std` support for `armv7a-vex-v5`) - #146667 (Add an attribute to check the number of lanes in a SIMD vector after monomorphization) - #146735 (unstably constify float mul_add methods) - #146737 (f16_f128: enable some more tests in Miri) - #146766 (Add attributes for #[global_allocator] functions) - #146905 (llvm: update remarks support on LLVM 22) - #146982 (Remove erroneous normalization step in `tests/run-make/linker-warning`) - #147005 (Small string formatting cleanup) - #147007 (Explicitly note `&[SocketAddr]` impl of `ToSocketAddrs`) - #147008 (bootstrap.py: Respect build.jobs while building bootstrap tool) - #147013 (rustdoc: Fix documentation for `--doctest-build-arg`) - #147015 (Use `LLVMDisposeTargetMachine`) r? `@ghost` `@rustbot` modify labels: rollup
Rollup merge of #146905 - durin42:llvm-22-bitstream-remarks, r=nikic llvm: update remarks support on LLVM 22 LLVM change dfbd76bda01e removed separate remark support entirely, but it turns out we can just drop the parameter and everything appears to work fine. Fixes #146912 as far as I can tell (the test passes.)
Rollup of 14 pull requests Successful merges: - rust-lang/rust#145067 (RawVecInner: add missing `unsafe` to unsafe fns) - rust-lang/rust#145277 (Do not materialise X in [X; 0] when X is unsizing a const) - rust-lang/rust#145973 (Add `std` support for `armv7a-vex-v5`) - rust-lang/rust#146667 (Add an attribute to check the number of lanes in a SIMD vector after monomorphization) - rust-lang/rust#146735 (unstably constify float mul_add methods) - rust-lang/rust#146737 (f16_f128: enable some more tests in Miri) - rust-lang/rust#146766 (Add attributes for #[global_allocator] functions) - rust-lang/rust#146905 (llvm: update remarks support on LLVM 22) - rust-lang/rust#146982 (Remove erroneous normalization step in `tests/run-make/linker-warning`) - rust-lang/rust#147005 (Small string formatting cleanup) - rust-lang/rust#147007 (Explicitly note `&[SocketAddr]` impl of `ToSocketAddrs`) - rust-lang/rust#147008 (bootstrap.py: Respect build.jobs while building bootstrap tool) - rust-lang/rust#147013 (rustdoc: Fix documentation for `--doctest-build-arg`) - rust-lang/rust#147015 (Use `LLVMDisposeTargetMachine`) r? `@ghost` `@rustbot` modify labels: rollup
LLVM change dfbd76bda01e removed separate remark support entirely, but
it turns out we can just drop the parameter and everything appears to
work fine.
Fixes #146912 as far as I can tell (the test passes.)