about summary refs log tree commit diff
path: root/src/tools
AgeCommit message (Collapse)AuthorLines
2023-09-06Preparing for merge from rustcRalf Jung-1/+1
2023-09-06give josh more time to startRalf Jung-2/+2
2023-09-06Update cargoWeihang Lo-0/+0
2023-09-05Auto merge of #115507 - cjgillot:relative-source-file, r=oli-obkbors-20/+16
Use relative positions inside a SourceFile. This allows to remove the normalization of start positions for hashing, and simplify allocation of global address space. cc `@Zoxc`
2023-09-05Auto merge of #114843 - Zalathar:test-coverage-map, r=oli-obkbors-5/+614
coverage: Explicitly test the coverage maps produced by codegen/LLVM Our existing coverage tests verify the output of end-to-end coverage reports, but we don't have any way to test the specific mapping information (code regions and their associated counters) that are emitted by `rustc_codegen_llvm` and LLVM. That makes it harder to to be confident in changes that would modify those mappings (whether deliberately or accidentally). This PR addresses that by adding a new `coverage-map` test suite that does the following: - Compiles test files to LLVM IR assembly (`.ll`) - Feeds those IR files to a custom tool (`src/tools/coverage-dump`) that extracts and decodes coverage mappings, and prints them in a more human-readable format - Checks the output of that tool against known-good snapshots --- I recommend excluding the last commit while reviewing the main changes, because that last commit is just ~40 test files copied over from `tests/run-coverage`, plus their blessed coverage-map snapshots and a readme file. Those snapshots aren't really intended to be checked by hand; they're mostly there to increase the chances that an unintended change to coverage maps will be observable (even if it requires relatively specific circumstances to manifest).
2023-09-05Rollup merge of #115536 - RalfJung:interpreter-privacy, r=oli-obkMatthias Krüger-92/+86
interpret: make MemPlace, Place, Operand types private to the interpreter Outside the interpreter, only the typed versions should be used.
2023-09-05Auto merge of #115543 - Kobzol:opt-dist-retry-download, r=Mark-Simulacrumbors-1/+30
Retry download of rustc-perf in opt-dist This should help resolving spurious network errors. It also increases the timeout for the archive download. r? `@Mark-Simulacrum`
2023-09-05Add test suite `coverage-map` to test coverage mappings emitted by LLVMZalathar-5/+74
We compile each test file to LLVM IR assembly, and then pass that IR to a dedicated program that can decode LLVM coverage maps and print them in a more human-readable format. We can then check that output against known-good snapshots. This test suite has some advantages over the existing `run-coverage` tests: - We can test coverage instrumentation without needing to run target binaries. - We can observe subtle improvements/regressions in the underlying coverage mappings that don't make a visible difference to coverage reports.
2023-09-05Add tool `src/tools/coverage-dump` for use by some new coverage testsZalathar-0/+540
2023-09-04Auto merge of #114089 - Urgau:allow-with-implied-by, r=petrochenkovbors-0/+838
Add an allow attribute suggestion along with the implied by suggestion This PR adds an `#[allow(...)]` attribute hep suggestion along with the implied by suggestion: ```diff note: `-W dead-code` implied by `-W unused` + help: to override `-W unused` add `#[allow(dead_code)]` ``` This PR also adds the `OnceHelp` lint level (similar to `OnceNote`) to only put the help message one time, like the implied note. Related to https://github.com/rust-lang/rust/issues/114030
2023-09-04Retry download of rustc-perf in opt-distJakub Beránek-1/+30
This should help resolving spurious network errors. It also increases the timeout for the archive download.
2023-09-04Mirror the rustc-perf sourceMark Rousskov-1/+1
This avoids issues with the GitHub /archive/ links which can be somewhat unreliable and are currently causing CI issues.
2023-09-04interpret: make MemPlace, Place, Operand types private to the interpreterRalf Jung-92/+86
2023-09-04Adjust clippy tests with new rustc help suggestion for lintsUrgau-0/+838
2023-09-03rustdoc: fix test case for generics that look like namesMichael Howell-1/+3
2023-09-03Fix clippy.Camille GILLOT-15/+11
2023-09-03Use relative positions inside a SourceFile.Camille GILLOT-7/+7
2023-09-03Merge from rustcRalf Jung-35/+107
2023-09-03Preparing for merge from rustcRalf Jung-1/+1
2023-09-03Stabilize the Saturating type (saturating_int_impl, gh-87920)Michael Watzko-1/+1
Also stabilizes saturating_int_assign_impl, gh-92354. And also make pub fns const where the underlying saturating_* fns became const in the meantime since the Saturating type was created.
2023-09-02Auto merge of #115409 - RalfJung:llvm-merge-reland, r=lqdbors-18/+20
bootstrap: use git merge-base for LLVM CI download logic This re-lands https://github.com/rust-lang/rust/pull/113588, now that the perf issues are hopefully fixed by https://github.com/rust-lang/rustc-perf/pull/1684. r? `@lqd` `@Mark-Simulacrum` Fixes https://github.com/rust-lang/rust/issues/101907
2023-09-02Rollup merge of #115443 - epage:os_str, r=cuviperMatthias Krüger-6/+5
feat(std): Stabilize 'os_str_bytes' feature Closes #111544
2023-09-02Merge from rustcRalf Jung-11/+15
2023-09-02Preparing for merge from rustcRalf Jung-1/+1
2023-09-01fix(std): Rename os_str_bytes to encoded_bytesEd Page-5/+5
2023-09-01Rollup merge of #115411 - RalfJung:miri-abi, r=oli-obkMatthias Krüger-21/+16
miri ABI check: fix handling of 1-ZST; don't accept sign differences r? `@oli-obk`
2023-09-01feat(std): Stabilize 'os_str_bytes' featureEd Page-1/+0
Closes #111544
2023-09-01[`clippy`] Use symbols intended for `arithmetic_side_effects`Caio-11/+82
2023-09-01add '--skip-children' to rustfmt invocationRalf Jung-1/+1
2023-08-31miri ABI check: fix handling of 1-ZST; don't accept sign differencesRalf Jung-11/+15
2023-08-31update abi_compat.rsRalf Jung-12/+3
2023-08-31don't ignore sign for ABI checkRalf Jung-7/+1
2023-08-31update target support sectionRalf Jung-21/+16
2023-08-31bootstrap: use git merge-base for LLVM CI download logicRalf Jung-18/+20
2023-08-31more ABI compat testsRalf Jung-12/+48
2023-08-31fmtRalf Jung-1/+1
2023-08-31Merge from rustcRalf Jung-12/+117
2023-08-31Preparing for merge from rustcRalf Jung-1/+1
2023-08-31make sure we test all tier 1 targets: i686-pc-windows-gnu was missingRalf Jung-1/+1
2023-08-31fmtThe Miri Conjob Bot-13/+12
2023-08-31Merge from rustcThe Miri Conjob Bot-9662/+16495
2023-08-31Preparing for merge from rustcThe Miri Conjob Bot-1/+1
2023-08-30miri function ABI check: specifically look for repr(transparent)Ralf Jung-0/+35
2023-08-30organize failing ABI compat tests and add some moreRalf Jung-10/+58
2023-08-30interpret: make sure we accept transparent newtypes as ABI-compatibleRalf Jung-1/+23
also we were missing the case for Vector arguments, so handle those as well
2023-08-30compiletest: support for newer lldb versionsDavid Wood-0/+9
Newer lldb versions disable printing of persistent results by default, but lots of rustc debuginfo tests rely on these being printed, so re-enable this by defining an alias as suggested by the patch which disabled persistent result printing in lldb. Signed-off-by: David Wood <david@davidtw.co>
2023-08-30storage_live: avoid computing the layout unless necessaryRalf Jung-4/+4
2023-08-30move marking-locals-live out of push_stack_frame, so it happens with ↵Ralf Jung-19/+16
argument passing this entirely avoids even creating unsized locals in Immediate::Uninitialized state
2023-08-30interpret: fix projecting into an unsized field of a localRalf Jung-0/+24
new invariant: Place::Local never refers to something unsized
2023-08-30Auto merge of #111713 - Zoxc:lock-switch, r=nnethercotebors-7/+7
Use conditional synchronization for Lock This changes `Lock` to use synchronization only if `mode::is_dyn_thread_safe` could be true. This reduces overhead for the parallel compiler running with 1 thread. The emitters are changed to use `DynSend` instead of `Send` so they can still use `Lock`. A Rayon thread pool is not used with 1 thread anymore, as session globals contains `Lock`s which are no longer `Sync`. Performance improvement with 1 thread and `cfg(parallel_compiler)`: <table><tr><td rowspan="2">Benchmark</td><td colspan="1"><b>Before</b></th><td colspan="2"><b>After</b></th></tr><tr><td align="right">Time</td><td align="right">Time</td><td align="right">%</th></tr><tr><td>🟣 <b>clap</b>:check</td><td align="right">1.7665s</td><td align="right">1.7336s</td><td align="right">💚 -1.86%</td></tr><tr><td>🟣 <b>hyper</b>:check</td><td align="right">0.2780s</td><td align="right">0.2736s</td><td align="right">💚 -1.61%</td></tr><tr><td>🟣 <b>regex</b>:check</td><td align="right">0.9994s</td><td align="right">0.9824s</td><td align="right">💚 -1.70%</td></tr><tr><td>🟣 <b>syn</b>:check</td><td align="right">1.5875s</td><td align="right">1.5656s</td><td align="right">💚 -1.38%</td></tr><tr><td>🟣 <b>syntex_syntax</b>:check</td><td align="right">6.0682s</td><td align="right">5.9532s</td><td align="right">💚 -1.90%</td></tr><tr><td>Total</td><td align="right">10.6997s</td><td align="right">10.5083s</td><td align="right">💚 -1.79%</td></tr><tr><td>Summary</td><td align="right">1.0000s</td><td align="right">0.9831s</td><td align="right">💚 -1.69%</td></tr></table> cc `@SparrowLii`