In https://reviews.llvm.org/D71059 LLVM 11, the time trace profiler was
extended to support multiple threads.
`timeTraceProfilerInitialize` creates a thread local profiler instance.
When a thread finishes `timeTraceProfilerFinishThread` moves a thread
local instance into a global collection of instances. Finally when all
codegen work is complete `timeTraceProfilerWrite` writes data from the
current thread local instance and the instances in global collection
of instances.
Previously, the profiler was intialized on a single thread only. Since
this thread performs no code generation on its own, the resulting
profile was empty.
Update LLVM codegen to initialize & finish time trace profiler on each
code generation thread.
Re-export some iterators from `core` in `std`
These iterators seem to have been forgotten to be re-exported from `std` (through `alloc`)
These are stable:
`core::slice::{SplitInclusive, SplitInclusiveMut}`
This one is still unstable:
`core::slice::EscapeAscii` (cc #77174)
Rollup of 9 pull requests
Successful merges:
- #90507 (Suggest `extern crate alloc` when using undeclared module `alloc`)
- #90530 (Simplify js tester a bit)
- #90533 (Add note about x86 instruction prefixes in asm! to unstable book)
- #90537 (Update aarch64 `target_feature` list for LLVM 12.)
- #90544 (Demote metadata load warning to "info".)
- #90554 (Clean up some `-Z unstable-options` in tests.)
- #90556 (Add more text and examples to `carrying_{add|mul}`)
- #90563 (rustbot allow labels)
- #90571 (Fix missing bottom border for headings in sidebar)
Failed merges:
r? `@ghost`
`@rustbot` modify labels: rollup
rustbot allow labels
`relnotes` was inspired by https://github.com/rust-lang/rust/pull/90521 , and by the various `must_use` PRs; in all of those cases, the submitter of the PR could know that `relnotes` applied, but couldn't apply it themselves.
For `needs-fcp`, I think people should be able to help triage by observing that a change needs an FCP before we can apply it.
Clean up some `-Z unstable-options` in tests.
Several of these tests were for features that have been stabilized, or otherwise don't need `-Z unstable-options`.
Demote metadata load warning to "info".
There is a warn log message for whenever the crate loader fails to load metadata from a candidate file. I think this warning is too aggressive, as there are several situations where metadata information might not be found in a candidate file, which is normal. Also, this warning is somewhat confusing, and non-actionable in most cases for a user (most users will not know what it means).
If the crate loader ultimately does not find a valid crate, then an error will be reported (and hopefully #88368 will improve that error message).
If a rustc developer wants to debug a loader problem, they can still use `RUSTC_LOG=rustc_metadata=debug` and get the details.
There is more discussion of this particular warning at https://github.com/rust-lang/rust/issues/89795#issuecomment-940798190.
Fixes#90525
Update aarch64 `target_feature` list for LLVM 12.
Many of these feature are now available on all valid LLVM versions.
I've also added a few new ones to the list.
r? `@Amanieu`
Add note about x86 instruction prefixes in asm! to unstable book
Since rustc doesn't do the assembly parsing itself, it is unable to detect when inline assembly ends with an instruction prefix, which doesn't make sense since it would apply to instructions from the compiler. This fixes#82314 by mentioning that x86 instruction prefixes must not be used in inline assembly. AFAICT x86 is the only instruction set with instruction prefixes.