Commit graph

127540 commits

Author SHA1 Message Date
bors
ac19c3bda1 Auto merge of #76856 - jonas-schievink:dist-rustc-src, r=Mark-Simulacrum
Distribute rustc sources as part of `rustc-dev`

They can be used to provide IDE features when working on rustc plugins/backends/etc without having to locate a separate Rust checkout.

r? `@Mark-Simulacrum`
2020-09-19 04:21:11 +00:00
bors
a2c82df1f5 Auto merge of #76838 - est31:dogfood_uninit_features, r=oli-obk
Dogfood new_uninit and maybe_uninit_slice in rustc_arena

Dogfoods a few cool `MaybeUninit` related features in the compiler's rustc_arena crate.

Split off from #76821

r? `@oli-obk`
2020-09-19 02:21:19 +00:00
bors
c6ab8e5fe0 Auto merge of #76787 - lzutao:slice_iters_new, r=lcnr
Using <Iter>::new instead of exposing internal fields

As requested in https://github.com/rust-lang/rust/pull/76311#discussion_r487685126
2020-09-18 23:38:17 +00:00
bors
bbc677480d Auto merge of #76782 - lzutao:rd-cap, r=jyn514
Specialize merge_attrs in good case

Just a non-important micro-optimization.
r? `@jyn514`
2020-09-18 21:31:08 +00:00
Jonas Schievink
2f9271b14c Clarify FIXME 2020-09-18 21:23:01 +02:00
Jonas Schievink
ffd9445812 Return Place by value 2020-09-18 21:23:01 +02:00
Jonas Schievink
682de94e31 Move inner items outside 2020-09-18 21:23:01 +02:00
Jonas Schievink
cd5d7201ad Fix rebase fallout 2020-09-18 21:23:01 +02:00
Jonas Schievink
7af964fecf Limit block count 2020-09-18 21:23:01 +02:00
Jonas Schievink
5728834448 Fix rebase fallout 2020-09-18 21:23:01 +02:00
Jonas Schievink
484db5b08a Properly inherit conflicts when merging locals 2020-09-18 21:23:01 +02:00
Jonas Schievink
934634eacc More logging 2020-09-18 21:23:01 +02:00
Jonas Schievink
88538adf9a Record intra-statement/terminator conflicts
Some MIR statements and terminators have an (undocumented...) invariant
that some of their input and outputs must not overlap. This records
conflicts between locals used in these positions.
2020-09-18 21:23:01 +02:00
Jonas Schievink
ddd6930b54 perf: bail out when there's >500 candidate locals 2020-09-18 21:23:01 +02:00
Jonas Schievink
ab26fb140c perf: only calculate conflicts for candidates 2020-09-18 21:23:01 +02:00
Jonas Schievink
665a98d21f Fix dest-prop mir-opt tests 2020-09-18 21:23:00 +02:00
Jonas Schievink
402f863d8a perf: walk liveness backwards in Conflicts::build 2020-09-18 21:23:00 +02:00
Jonas Schievink
7dbc7f76e1 Add a few dest-prop MIR tests 2020-09-18 21:23:00 +02:00
Jonas Schievink
812d4bbc8d Fix dataflow assert errors 2020-09-18 21:23:00 +02:00
Jonas Schievink
8a3e2b78bb Bless mir-opt tests 2020-09-18 21:23:00 +02:00
Jonas Schievink
8a7b1c3894 Make nrvo-simple set mir-opt-level=1
The additional copies are due to the lack of copy propagation
2020-09-18 21:23:00 +02:00
Jonas Schievink
1649895385 simplify_try: clean up test 2020-09-18 21:23:00 +02:00
Jonas Schievink
43ad8e4260 simplify_try: print dest_prop diff and bless
The new diff is to convince me that this is correct and nothing funky
is going on.
2020-09-18 21:23:00 +02:00
Jonas Schievink
78ff69ba10 Implement a destination propagation pass 2020-09-18 21:23:00 +02:00
bors
2cbc570e58 Auto merge of #76884 - Mark-Simulacrum:fix-macos-ci, r=pietroalbini
Add host triples to target lists

This PR is primarily intended to fix https://github.com/rust-lang/rustup/issues/2494, which is the second commit. That bug was introduced by #76415, and incompletely fixed by #76639. (#76639 added host triples, which gave us compilers, but missed that we also need documentation and other target-only things). However, it also removes duplicate macOS CI builders.

r? `@pietroalbini`
2020-09-18 19:13:02 +00:00
bors
9f8ac718f4 Auto merge of #76575 - lcnr:abstract-const, r=oli-obk
compare generic constants using `AbstractConst`s

This is a MVP of rust-lang/compiler-team#340. The changes in this PR should only be relevant if `feature(const_evaluatable_checked)` is enabled.

~~currently based on top of #76559, so blocked on that.~~

r? `@oli-obk` cc `@varkor` `@eddyb`
2020-09-18 16:59:50 +00:00
Aaron Hill
6a96aea36a
Wrap recursive predicate evaluation with ensure_sufficient_stack
I haven't been able to come up with a minimized test case for #76770,
but this fixes a stack overflow in rustc as well.
2020-09-18 12:24:42 -04:00
Mark Rousskov
d0dff8f873 Make sure we build target-only things (e.g., docs) for host platforms too 2020-09-18 12:00:53 -04:00
Mark Rousskov
15adc2ee83 Remove duplicate macOS builders 2020-09-18 12:00:40 -04:00
Bastian Kauschke
b7641209d7 add const-evaluatable_checked check back in 2020-09-18 17:36:11 +02:00
Bastian Kauschke
09e6254496 review, small cleanup 2020-09-18 17:11:34 +02:00
Bastian Kauschke
1b275d08ad document const_evaluatable 2020-09-18 17:11:34 +02:00
Bastian Kauschke
7fff155d2a remove allow(warnings) 2020-09-18 17:11:34 +02:00
Bastian Kauschke
30ff1ef3d0 support const_evaluatable_checked across crate boundaries 2020-09-18 17:11:34 +02:00
Bastian Kauschke
82ebbd7d6b add test for let-bindings 2020-09-18 17:11:34 +02:00
Bastian Kauschke
c7d16df1d8 add function calls 2020-09-18 17:11:34 +02:00
Bastian Kauschke
d1294e0ce2 allow unary operations and ignore StorageLive/Dead stmts 2020-09-18 17:11:34 +02:00
Bastian Kauschke
5a277822a5 use newtype_index for abstract_const::NodeId 2020-09-18 17:11:34 +02:00
Bastian Kauschke
f24d532749 refactor AbstractConstBuilder 2020-09-18 17:11:34 +02:00
Bastian Kauschke
c3a772f55f use abstract consts when unifying ConstKind::Unevaluated 2020-09-18 17:11:34 +02:00
Bastian Kauschke
d327fa112b initial working state 2020-09-18 16:25:25 +02:00
bors
fdc3405c20 Auto merge of #72412 - VFLashM:issue-72408-nested-closures-exponential, r=tmandry
Issue 72408 nested closures exponential

This fixes #72408.

Nested closures were resulting in exponential compilation time.

This PR is enhancing asymptotic complexity, but also increasing the constant, so I would love to see perf run results.
2020-09-18 14:08:39 +00:00
Jake Goulding
9803c9b252 Update cc crate to understand aarch64-apple-darwin with clang 2020-09-18 09:22:07 -04:00
Jake Goulding
15bd2365fc Upgrade libz-sys to 1.1.2 2020-09-18 09:18:10 -04:00
bors
2c69266c06 Auto merge of #76837 - wesleywiser:disable_consideredequal, r=oli-obk
[mir-opt] Disable the `ConsideredEqual` logic in SimplifyBranchSame opt

The logic is currently broken and we need to disable it to fix a beta
regression (see #76803)

r? `@oli-obk`
2020-09-18 10:54:14 +00:00
Tyler Mandry
3ccb1c37e6 Remove redundancy in cache key 2020-09-18 09:03:53 +00:00
Lzu Tao
b65937031d inline inner function of inlining methods 2020-09-18 08:36:21 +00:00
Lzu Tao
53d5261c69 Move unsafe code of slice new function of their Iterator structs
Init false state in Split* constructors
2020-09-18 08:36:21 +00:00
bors
953f33c5cb Auto merge of #76854 - aDotInTheVoid:mir-opt-32-64-diff-name, r=oli-obk
Rename mir-opt diff tests with 32/64 bit

Now syntax highlighting should work.

I've tested that `--bless` works localy, but I'm not sure it's possible on CI

Fixes #75746

r? `@oli-obk`
2020-09-18 08:28:03 +00:00
bors
a0925fba74 Auto merge of #76790 - ssomers:btree_slice_slasher_returns, r=Mark-Simulacrum
BTreeMap: avoid slices even more

Epilogue to #73971: it seems the compiler is unable to realize that creating a slice and `get_unchecked`-ing one element is a simple fetch. So try to spell it out for the only remaining but often invoked case.

Also, the previous code doesn't seem fair game to me, using `get_unchecked` to reach beyond the end of a slice. Although the local function `slice_insert` also does that.

r? `@Mark-Simulacrum`
2020-09-18 05:47:00 +00:00