Aman Arora
a721957a3d
Don't introduce a block if a block exists
2021-04-01 21:08:04 -04:00
bors
d1065e6cef
Auto merge of #83663 - AngelicosPhosphoros:simplify_binary_and_to_get_better_asm, r=nagisa
...
Simplify logical operations CFG
This is basically same commit as e38e954a0d
which was reverted later in 676953fde9
In both cases, this changes weren't benchmarked.
e38e954a0d
leads to missed optimization described in [this issue](https://github.com/rust-lang/rust/issues/62993 )
676953fde9
leads to missed optimization described in [this issue](https://github.com/rust-lang/rust/issues/83623 )
2021-04-02 00:48:31 +00:00
hi-rustin
aa987c2f57
address comments
2021-04-02 08:08:02 +08:00
Aman Arora
18af989c06
Update lint message
2021-04-01 16:49:31 -04:00
bors
d474075a8f
Auto merge of #82780 - cjgillot:dep-stream, r=michaelwoerister
...
Stream the dep-graph to a file instead of storing it in-memory.
This is a reimplementation of #60035 .
Instead of storing the dep-graph in-memory, the nodes are encoded as they come
into the a temporary file as they come. At the end of a successful the compilation,
this file is renamed to be the persistent dep-graph, to be decoded during the next
compilation session.
This two-files scheme avoids overwriting the dep-graph on unsuccessful or crashing compilations.
The structure of the file is modified to be the sequence of `(DepNode, Fingerprint, EdgesVec)`.
The deserialization is responsible for going to the more compressed representation.
The `node_count` and `edge_count` are stored in the last 16 bytes of the file,
in order to accurately reserve capacity for the vectors.
At the end of the compilation, the encoder is flushed and dropped.
The graph is not usable after this point: any creation of a node will ICE.
I had to retrofit the debugging options, which is not really pretty.
2021-04-01 16:29:33 +00:00
AngelicosPhosphoros
4464cc2256
Simplify logical operations CFG
...
This is basically same commit as e38e954a0d
which was reverted later in 676953fde9
In both cases, this changes weren't benchmarked.
e38e954a0d
leads to missed optimization described in [this issue](https://github.com/rust-lang/rust/issues/62993 )
676953fde9
leads to missed optimization described in [this issue](https://github.com/rust-lang/rust/issues/83623 )
Also it changes some src/test/run-make-fulldeps/coverage-spanview/expected_mir_dump* files automatically.
2021-04-01 18:34:11 +03:00
hi-rustin
2c66e15468
add OR_PATTERNS_BACK_COMPAT lint
...
test: add more cases
test: add comments
refine msg
2021-04-01 23:14:14 +08:00
Oli Scherer
c6676db7ae
Some more fine-grained forced inlining
2021-04-01 10:40:50 +00:00
Oli Scherer
d81f5ab100
Inline some functions that suddenly show up more in traces
2021-04-01 09:22:12 +00:00
bors
49e1ec0995
Auto merge of #83736 - JohnTitor:fix-unsafe_block_in_unsafe_fn-stabilized-version, r=jyn514
...
Fix the `unsafe_block_in_unsafe_fn`s stabilized version
Fixes #83735
2021-04-01 05:34:54 +00:00
Yuki Okushi
fe9c4fbb9e
Fix the unsafe_block_in_unsafe_fn
s stabilized version
2021-04-01 10:56:51 +09:00
Yuki Okushi
b5782bad74
Catch a bad placeholder type error for statics in extern
s
2021-04-01 10:45:42 +09:00
Dylan DPC
1ef52ac5f5
Rollup merge of #83711 - JohnTitor:more-friendly-unknown-target-error, r=davidtwco
...
Clarify `--print target-list` is a rustc's option
Fixes #68238
2021-04-01 02:41:47 +02:00
b-naber
3194b26ab0
prevent very long compilation runtimes in LateBoundRegionNameCollector
2021-03-31 23:28:01 +02:00
JohnTitor
82c6709d6f
Clarify --print target-list
is a rustc's option
2021-04-01 01:59:50 +09:00
Camille GILLOT
f3dde45d2a
Enable debugging the dep-graph without debug-assertions.
...
It may also be useful in these cases,
and some CI configurations test without debug assertions.
2021-03-31 17:12:06 +02:00
Jack Huey
7108918db6
Cleanups and comments
2021-03-31 10:16:37 -04:00
Jack Huey
0c98dc66fd
Fix tests and AstConv -> dyn AstConv
2021-03-31 10:16:37 -04:00
Jack Huey
4ff65ec782
Fmt and test revert
2021-03-31 10:16:37 -04:00
Jack Huey
8ad7e5685e
Fix new problem from rebase and a little cleanup
2021-03-31 10:16:37 -04:00
Jack Huey
6d5efa9f04
Add var to BoundRegion. Add query to get bound vars for applicable items.
2021-03-31 10:16:37 -04:00
Jack Huey
666859a6f8
Make late and late_anon regions track the bound var position
2021-03-31 10:15:56 -04:00
Jack Huey
84f82d348c
Revert explicit lifetimes
2021-03-31 10:15:56 -04:00
Jack Huey
30187c81f6
Track bound vars
2021-03-31 10:15:27 -04:00
Jack Huey
62a49c3bb8
Add tcx lifetime to Binder
2021-03-31 10:13:57 -04:00
Jack Huey
74851f4cf3
count bound vars
2021-03-31 10:11:47 -04:00
Jack Huey
97a22a4f9c
Add u32 for bound variables to Binder
2021-03-31 10:05:32 -04:00
Jack Huey
4955d755d3
Some rebinds and dummys
2021-03-31 10:05:32 -04:00
Oli Scherer
d139968d19
bail out early when substituting mir constants that don't need substituting
2021-03-31 10:40:45 +00:00
Oli Scherer
4e8edfb5c2
Forward some layouts to prevent recomputation
2021-03-31 10:40:45 +00:00
Oli Scherer
dbacfbc368
Add a new normalization query just for mir constants
2021-03-31 10:40:42 +00:00
Oli Scherer
c7c39ce6d0
We should never see unevaluated type-level constants after monomorphization unless errors occurred
2021-03-31 09:13:45 +00:00
Oli Scherer
1d56b8a2bc
Make unevaluated DefId rendering deterministic
2021-03-31 09:13:45 +00:00
Aman Arora
e78fac5601
Handle the case of partially captured drop type
2021-03-31 04:40:31 -04:00
bors
a5029ac0ab
Auto merge of #83684 - cjgillot:csp, r=petrochenkov
...
Remove hir::CrateItem.
The crate span is exactly the crate module's inner span. There is no need to store it twice.
2021-03-31 08:34:40 +00:00
Hameer Abbasi
c3ec0add8b
Add allocation information to undefined behaviour errors.
2021-03-31 07:21:08 +00:00
bjorn3
5773e51678
Inline a few methods
2021-03-31 09:19:29 +02:00
bors
2a32abbcde
Auto merge of #83681 - jyn514:blanket-impls-tweaks, r=Aaron1011
...
rustdoc: Only look at blanket impls in `get_blanket_impls`
The idea here is that all the work in 16156fb278/compiler/rustc_middle/src/ty/trait_def.rs (L172-L186)
doesn't matter for `get_blanket_impls` - Rustdoc will already pick up on those blocks when it documents the item.
2021-03-31 05:47:22 +00:00
bors
6ff482bde5
Auto merge of #83666 - Amanieu:instrprof-order, r=tmandry
...
Run LLVM coverage instrumentation passes before optimization passes
This matches the behavior of Clang and allows us to remove several
hacks which were needed to ensure functions weren't optimized away
before reaching the instrumentation pass.
Fixes #83429
cc `@richkadel`
r? `@tmandry`
2021-03-31 03:20:33 +00:00
hi-rustin
8f77356249
give full path of constraint in suggest_constraining_type_param
...
revert file
bless with nll mode
2021-03-31 09:47:31 +08:00
Dylan DPC
7d888d100f
Rollup merge of #83654 - JohnTitor:issue-83606, r=estebank
...
Do not emit a suggestion that causes the E0632 error
Fixes #83606
2021-03-31 01:14:46 +02:00
Camille GILLOT
9d8f833e05
Remove hir::CrateItem.
2021-03-30 20:31:06 +02:00
bors
926ec1cb8b
Auto merge of #83639 - osa1:issue83638, r=estebank
...
Replace tabs in err messages before rendering
This is done in other call sites, but was missing in one place.
Fixes #83638
2021-03-30 17:07:19 +00:00
bjorn3
8331dbe6d0
Add an Mmap wrapper to rustc_data_structures
...
This wrapper implements StableAddress and falls back to directly reading
the file on wasm32
2021-03-30 18:57:03 +02:00
Joshua Nelson
6f06b761b9
Only look at blanket impls in get_blanket_impls
2021-03-30 12:28:33 -04:00
Camille GILLOT
8ee9322c10
Also profile finishing the encoding.
2021-03-30 18:10:08 +02:00
Camille GILLOT
df24315ddf
Adjust profiling.
2021-03-30 18:10:08 +02:00
Camille GILLOT
fe89f3236c
Address review.
2021-03-30 18:10:08 +02:00
Camille GILLOT
65a8681a17
Add documentation.
2021-03-30 18:10:07 +02:00
Camille GILLOT
c5c935af92
Simplify tracking the encoder state.
2021-03-30 18:10:07 +02:00