librustc_mir: Implement def-use chains and trivial copy propagation on MIR.
This only supports trivial cases in which there is exactly one def and
one use.
Currently, some random unrelated MIR tests are failing, probably just because they haven't been updated.
r? @eddyb
Currently `TypedArena` allocates its first chunk, which is usually 4096
bytes, as soon as it is created. If no allocations are ever made from
the arena then this allocation (and the corresponding deallocation) is
wasted effort.
This commit changes `TypedArena` so it doesn't allocate the first chunk
until the first allocation is made.
This change speeds up rustc by a non-trivial amount because rustc uses
`TypedArena` heavily: compilation speed (producing debug builds) on
several of the rustc-benchmarks increases by 1.02--1.06x. The change
should never cause a slow-down because the hot `alloc` function is
unchanged. It does increase the size of `TypedArena` by one `usize`
field, however.
The commit also fixes some out-of-date comments.
mk: add a all-no-docs target to build everything except docs
This makes things slightly more efficient for Debian's auto-builders where the
docs can be built on just one architecture, and distributed to users of all
other architectures as well.
Fix overflow checking in unsigned pow()
The pow() method for unsigned integers produced 0 instead of trapping overflow for certain inputs. Calls such as 2u32.pow(1024) produced 0 when they should trap an overflow. This also adds tests for the correctly handling overflow in unsigned pow().
This was previously fixed for signed integers in #28248, but it seems unsigned integers got missed that time.
For issue number #34913
this flag lets you pass a _single_ argument to the linker but can be
used _repeatedly_. For example, instead of using:
```
rustc -C link-args='-l bar' (..)
```
you could write
```
rustc -C link-arg='-l' -C link-arg='bar' (..)
```
This new flag can be used with RUSTFLAGS where `-C link-args` has
problems with "nested" spaces:
```
RUSTFLAGS='-C link-args="-Tlayout.ld -nostartfiles"'
```
This passes three arguments to rustc: `-C` `link-args="-Tlayout.ld` and
`-nostartfiles"` to `rustc`. That's not what we meant. But this does
what we want:
```
RUSTFLAGS='-C link-arg=-Tlayout.ld -C link-arg=-nostartfiles`
```
cc rust-lang/rfcs#1509