Repository navigation
Stop useless caching of post-LTO artifact caching for fat LTO - #163317
Conversation
|
|
|
r? @mejrs rustbot has assigned @mejrs. Use Why was this reviewer chosen?The reviewer was selected based on:
|
This comment has been minimized.
This comment has been minimized.
bc690ff to
980f03b
Compare
| if !self.check_config(cfg) { | ||
| debug!("check_attr: config does not match, ignoring attr"); | ||
| return; | ||
| continue; |
There was a problem hiding this comment.
This caused us to skip all assertions after the first one with a cfg that doesn't match. Surprisingly nothing regressed by the lack of test coverage since the introduction of this bug.
| }; | ||
|
|
||
| // FIXME include pre-LTO bitcode in workproduct tracking | ||
| // FIXME add separate incr comp session for post-LTO outputs to use during link step |
There was a problem hiding this comment.
How important are these FIXMEs? Are you planning to fix them?
There was a problem hiding this comment.
I'm working on a follow up PR to do this.
|
@bors r=nnethercote |
Fix incremental compilation for fat LTO Previously we would copy post-LTO artifacts into the incr comp cache for fat LTO despite them never getting used. Also the pre-LTO bitcode didn't get tracked and thus `determine_cgu_reuse` believed it had to regenerate bitcode for all CGUs even when all CGUs would be green. Also move incr comp session dirs out of `CodegenContext`. `CodegenContext` will in the future be serialized and deserialized into a different rustc instance when `-Zno-link`/`-Zlink-only` is used. A separate incr comp session has to be used for both rustc invocations. Part of rust-lang/compiler-team#908
Fix incremental compilation for fat LTO Previously we would copy post-LTO artifacts into the incr comp cache for fat LTO despite them never getting used. Also the pre-LTO bitcode didn't get tracked and thus `determine_cgu_reuse` believed it had to regenerate bitcode for all CGUs even when all CGUs would be green. Also move incr comp session dirs out of `CodegenContext`. `CodegenContext` will in the future be serialized and deserialized into a different rustc instance when `-Zno-link`/`-Zlink-only` is used. A separate incr comp session has to be used for both rustc invocations. Part of rust-lang/compiler-team#908
…uwer Rollup of 13 pull requests Successful merges: - #163317 (Fix incremental compilation for fat LTO) - #163582 (Reapply "bootstrap: Enable rustdoc mergeable CCI for std and internal docs") - #151793 (Add mul_add_relaxed methods for floating-point types) - #162782 (Fix rustdoc ICE caused by mishandling of ambiguity errors) - #163010 (Miri can do dirfd now) - #163535 (Improve `DocStrings` perf) - #163576 (Fix `TypeOutlives` fast-path) - #163587 (Several small span improvements) - #163612 (fix `ValidateBoundVars`) - #163632 (bump rustc-build-sysroot) - #163635 (Revert note about signum of NaN) - #163644 (Add mailmap entry) - #163651 (Remove variants from `feature-gate-autodiff-use` test)
|
💔 I suspect this PR failed tests as part of a rollup After fixing the problem, consider running a try job for the failed job before re-approving. Link to failure: #163650 (comment) @bors try jobs=test-x86_64-mingw-1 |
|
This pull request was unapproved. This PR was contained in a rollup (#163656), which was unapproved. |
993bdd7 to
5951d04
Compare
|
Reverted some changes that turned out needed to be reverted anyway in the follow up PR. @bors try jobs=test-x86_64-mingw-1 |
This comment has been minimized.
This comment has been minimized.
Fix incremental compilation for fat LTO try-job: test-x86_64-mingw-1
|
💔 Test for d316683 failed: CI. Failed job:
|
This comment has been minimized.
This comment has been minimized.
These artifacts are never actually used. Only the pre-LTO artifacts would be useful, but caching that seems a bit more tricky and is not that important for now. Fat LTO itself is very slow anyway.
5951d04 to
51e5451
Compare
|
When reproducing the MinGW failure, I noticed that the PR was accidentally also caching the bitcode of dependencies in the incr comp cache, which doesn't have any benefit. I've removed the support for pre-LTO caching for fat LTO from this PR for now. So this PR now only does refactorings and removes the useless post-LTO artifact caching for fat LTO. I've confirmed that the test that previously failed on MinGW now passes. @rustbot ready |
|
@bors r+ |
Stop useless caching of post-LTO artifact caching for fat LTO These artifacts are never actually used. Only the pre-LTO artifacts would be useful, but caching that seems a bit more tricky and is not that important for now. Fat LTO itself is very slow anyway. Also move incr comp session dirs out of `CodegenContext`. `CodegenContext` will in the future be serialized and deserialized into a different rustc instance when `-Zno-link`/`-Zlink-only` is used. A separate incr comp session has to be used for both rustc invocations. Part of rust-lang/compiler-team#908
…uwer Rollup of 19 pull requests Successful merges: - #163664 (Add new `RUSTC_BOOTSTRAP=-allow-unstable-compiler-flags` mode for testing stable compiler behavior in UI tests) - #163668 (Remap syntax contexts and expansion ids for det. metadata encoding) - #160404 (fd-views: AsRef<File>&Co. for BorrowedFd) - #163104 ([debuginfo] Emit `usize` and `isize` as typedefs) - #163317 (Stop useless caching of post-LTO artifact caching for fat LTO) - #163701 (add ReadDir::dir to get the directory handle of the underlying directory) - #164488 (Don't try to skip anything in `Skip::advance_by(0)`) - #164507 (Encode HashMap and HashSet in deterministic order when an encoder requires determinism) - #164611 (Improve bit permutation codegen) - #164612 (std: Combine `is_powerpc64_feature_detected` into `is_powerpc_feature_detected`) - #148842 (Avoid incorrect lifetime suggestion involving `sym::anon`) - #162668 (document that `!` does bitwise and logical negation) - #164264 (lint: suggest `fXX::is_nan` for unsuffixed NaN comparisons) - #164509 (layout invariant: turn delayed bug back into proper assertion) - #164540 (Minor optimizations around macro parsing) - #164594 (rustdoc: Correctly handle inner `deprecated` attribute on modules) - #164595 (Allow attributes in function trait parameters) - #164641 (Stabilize `slice_split_once`) - #164646 (Adjust rustfmt subtree sync docs to not use `--allow-noop` for now)
Rollup of 20 pull requests Successful merges: - #163664 (Add new `RUSTC_BOOTSTRAP=-allow-unstable-compiler-flags` mode for testing stable compiler behavior in UI tests) - #163668 (Remap syntax contexts and expansion ids for det. metadata encoding) - #163104 ([debuginfo] Emit `usize` and `isize` as typedefs) - #163317 (Stop useless caching of post-LTO artifact caching for fat LTO) - #163701 (add ReadDir::dir to get the directory handle of the underlying directory) - #164488 (Don't try to skip anything in `Skip::advance_by(0)`) - #164507 (Encode HashMap and HashSet in deterministic order when an encoder requires determinism) - #164611 (Improve bit permutation codegen) - #164612 (std: Combine `is_powerpc64_feature_detected` into `is_powerpc_feature_detected`) - #148842 (Avoid incorrect lifetime suggestion involving `sym::anon`) - #162668 (document that `!` does bitwise and logical negation) - #164264 (lint: suggest `fXX::is_nan` for unsuffixed NaN comparisons) - #164509 (layout invariant: turn delayed bug back into proper assertion) - #164540 (Minor optimizations around macro parsing) - #164594 (rustdoc: Correctly handle inner `deprecated` attribute on modules) - #164595 (Allow attributes in function trait parameters) - #164616 (Add test for VecDeque with a custom allocator) - #164629 (arch::breakpoint: avoid confusing 'equivalent' terminology) - #164641 (Stabilize `slice_split_once`) - #164646 (Adjust rustfmt subtree sync docs to not use `--allow-noop` for now)
Rollup merge of #163317 - bjorn3:lto_refactors22, r=nnethercote Stop useless caching of post-LTO artifact caching for fat LTO These artifacts are never actually used. Only the pre-LTO artifacts would be useful, but caching that seems a bit more tricky and is not that important for now. Fat LTO itself is very slow anyway. Also move incr comp session dirs out of `CodegenContext`. `CodegenContext` will in the future be serialized and deserialized into a different rustc instance when `-Zno-link`/`-Zlink-only` is used. A separate incr comp session has to be used for both rustc invocations. Part of rust-lang/compiler-team#908
Rollup of 20 pull requests Successful merges: - rust-lang/rust#163664 (Add new `RUSTC_BOOTSTRAP=-allow-unstable-compiler-flags` mode for testing stable compiler behavior in UI tests) - rust-lang/rust#163668 (Remap syntax contexts and expansion ids for det. metadata encoding) - rust-lang/rust#163104 ([debuginfo] Emit `usize` and `isize` as typedefs) - rust-lang/rust#163317 (Stop useless caching of post-LTO artifact caching for fat LTO) - rust-lang/rust#163701 (add ReadDir::dir to get the directory handle of the underlying directory) - rust-lang/rust#164488 (Don't try to skip anything in `Skip::advance_by(0)`) - rust-lang/rust#164507 (Encode HashMap and HashSet in deterministic order when an encoder requires determinism) - rust-lang/rust#164611 (Improve bit permutation codegen) - rust-lang/rust#164612 (std: Combine `is_powerpc64_feature_detected` into `is_powerpc_feature_detected`) - rust-lang/rust#148842 (Avoid incorrect lifetime suggestion involving `sym::anon`) - rust-lang/rust#162668 (document that `!` does bitwise and logical negation) - rust-lang/rust#164264 (lint: suggest `fXX::is_nan` for unsuffixed NaN comparisons) - rust-lang/rust#164509 (layout invariant: turn delayed bug back into proper assertion) - rust-lang/rust#164540 (Minor optimizations around macro parsing) - rust-lang/rust#164594 (rustdoc: Correctly handle inner `deprecated` attribute on modules) - rust-lang/rust#164595 (Allow attributes in function trait parameters) - rust-lang/rust#164616 (Add test for VecDeque with a custom allocator) - rust-lang/rust#164629 (arch::breakpoint: avoid confusing 'equivalent' terminology) - rust-lang/rust#164641 (Stabilize `slice_split_once`) - rust-lang/rust#164646 (Adjust rustfmt subtree sync docs to not use `--allow-noop` for now)
Rollup of 20 pull requests Successful merges: - rust-lang/rust#163664 (Add new `RUSTC_BOOTSTRAP=-allow-unstable-compiler-flags` mode for testing stable compiler behavior in UI tests) - rust-lang/rust#163668 (Remap syntax contexts and expansion ids for det. metadata encoding) - rust-lang/rust#163104 ([debuginfo] Emit `usize` and `isize` as typedefs) - rust-lang/rust#163317 (Stop useless caching of post-LTO artifact caching for fat LTO) - rust-lang/rust#163701 (add ReadDir::dir to get the directory handle of the underlying directory) - rust-lang/rust#164488 (Don't try to skip anything in `Skip::advance_by(0)`) - rust-lang/rust#164507 (Encode HashMap and HashSet in deterministic order when an encoder requires determinism) - rust-lang/rust#164611 (Improve bit permutation codegen) - rust-lang/rust#164612 (std: Combine `is_powerpc64_feature_detected` into `is_powerpc_feature_detected`) - rust-lang/rust#148842 (Avoid incorrect lifetime suggestion involving `sym::anon`) - rust-lang/rust#162668 (document that `!` does bitwise and logical negation) - rust-lang/rust#164264 (lint: suggest `fXX::is_nan` for unsuffixed NaN comparisons) - rust-lang/rust#164509 (layout invariant: turn delayed bug back into proper assertion) - rust-lang/rust#164540 (Minor optimizations around macro parsing) - rust-lang/rust#164594 (rustdoc: Correctly handle inner `deprecated` attribute on modules) - rust-lang/rust#164595 (Allow attributes in function trait parameters) - rust-lang/rust#164616 (Add test for VecDeque with a custom allocator) - rust-lang/rust#164629 (arch::breakpoint: avoid confusing 'equivalent' terminology) - rust-lang/rust#164641 (Stabilize `slice_split_once`) - rust-lang/rust#164646 (Adjust rustfmt subtree sync docs to not use `--allow-noop` for now)
Rollup of 20 pull requests Successful merges: - rust-lang/rust#163664 (Add new `RUSTC_BOOTSTRAP=-allow-unstable-compiler-flags` mode for testing stable compiler behavior in UI tests) - rust-lang/rust#163668 (Remap syntax contexts and expansion ids for det. metadata encoding) - rust-lang/rust#163104 ([debuginfo] Emit `usize` and `isize` as typedefs) - rust-lang/rust#163317 (Stop useless caching of post-LTO artifact caching for fat LTO) - rust-lang/rust#163701 (add ReadDir::dir to get the directory handle of the underlying directory) - rust-lang/rust#164488 (Don't try to skip anything in `Skip::advance_by(0)`) - rust-lang/rust#164507 (Encode HashMap and HashSet in deterministic order when an encoder requires determinism) - rust-lang/rust#164611 (Improve bit permutation codegen) - rust-lang/rust#164612 (std: Combine `is_powerpc64_feature_detected` into `is_powerpc_feature_detected`) - rust-lang/rust#148842 (Avoid incorrect lifetime suggestion involving `sym::anon`) - rust-lang/rust#162668 (document that `!` does bitwise and logical negation) - rust-lang/rust#164264 (lint: suggest `fXX::is_nan` for unsuffixed NaN comparisons) - rust-lang/rust#164509 (layout invariant: turn delayed bug back into proper assertion) - rust-lang/rust#164540 (Minor optimizations around macro parsing) - rust-lang/rust#164594 (rustdoc: Correctly handle inner `deprecated` attribute on modules) - rust-lang/rust#164595 (Allow attributes in function trait parameters) - rust-lang/rust#164616 (Add test for VecDeque with a custom allocator) - rust-lang/rust#164629 (arch::breakpoint: avoid confusing 'equivalent' terminology) - rust-lang/rust#164641 (Stabilize `slice_split_once`) - rust-lang/rust#164646 (Adjust rustfmt subtree sync docs to not use `--allow-noop` for now)
View all comments
These artifacts are never actually used. Only the pre-LTO artifacts would be useful, but caching that seems a bit more tricky and is not that important for now. Fat LTO itself is very slow anyway.
Also move incr comp session dirs out of
CodegenContext.CodegenContextwill in the future be serialized and deserialized into a different rustc instance when-Zno-link/-Zlink-onlyis used. A separate incr comp session has to be used for both rustc invocations.Part of rust-lang/compiler-team#908