Repository navigation
Rollup of 2 pull requests - #163017
Rollup of 2 pull requests#163017
Conversation
This makes it easier to confirm that the move itself doesn't modify any code.
Having non-trivial code in the crate root causes a few problems, most of which stem from every item being effectively `pub(crate)`: - Fields/methods can't be private, so enforcing abstractions is impossible - Every `use` becomes a de-facto re-export, leading to messy imports - Moving items out of the root requires visibility adjustment
cg_llvm: Move all code out of the crate root Having non-trivial code in the crate root causes a few problems, most of which stem from every item being effectively `pub(crate)`: - Fields/methods can't be private, so enforcing abstractions is impossible - Every `use` becomes a de-facto re-export, leading to messy imports - Moving items out of the root requires visibility adjustment This PR therefore moves all non-trivial code out of the crate root, and into `rustc_codegen_llvm::back::llvm_backend`. --- Deciding where to move the code *to* was a bit tricky. But the code being moved delegates a lot of its methods to other submodules in `back`, so creating another submodule in `back` seemed reasonable. I certainly like it more than the status-quo. The main commit doesn't modify any of the code being moved, other than updating imports, as verified manually by: ```shell git diff --color-moved --color-moved-ws=allow-indentation-change head^ head ``` There should be no change to compiler behaviour.
…-doc, r=Darksonn
Add safety section for transmute_neo
Refer to [`transmute`](crate::mem::transmute) for safety requirements. This function is semantically identical to `transmute`.
According to my investigation, the transmute uses typeck to guarantee the size equality of from and to, while the transmute_neo uses const { assert! } to guarantee it. And in codegen, the unreachable fallback covers transmute_unchecked (also for transmute and transmute_neo, but it is the only guarantee for transmute_unchecked). So transmute_neo's safety doc referring to transmute poses no problem and risk.
|
@bors r+ p=5 |
This comment has been minimized.
This comment has been minimized.
What is this?This is an experimental post-merge analysis report that shows differences in test outcomes between the merged PR and its parent PR.Comparing 36b04f3 (parent) -> feaadee (this PR) Test differencesShow 40 test diffs40 doctest diffs were found. These are ignored, as they are noisy. Test dashboardRun cargo run --manifest-path src/ci/citool/Cargo.toml -- \
test-dashboard feaadeeaca7db0594da854e7c8c07495341c7439 --output-dir test-dashboardAnd then open Job duration changes
How to interpret the job duration changes?Job durations can vary a lot, based on the actual runner instance |
|
📌 Perf builds for each rolled up PR:
parent commit: 36b04f3ad1 In the case of a perf regression, run the following command for each PR you suspect might be the cause: |
|
Finished benchmarking commit (feaadee): comparison URL. Overall result: ❌ regressions - no action needed@rustbot label: -perf-regression Instruction countOur most reliable metric. Used to determine the overall result above. However, even this metric can be noisy.
Max RSS (memory usage)Results (primary -2.5%)A less reliable metric. May be of interest, but not used to determine the overall result above.
CyclesResults (secondary 3.0%)A less reliable metric. May be of interest, but not used to determine the overall result above.
Binary sizeThis perf run didn't have relevant results for this metric. Bootstrap: 497.193s -> 502.551s (1.08%) |
Successful merges:
r? @ghost
Create a similar rollup