about summary refs log tree commit diff
path: root/src/librustc_mir
AgeCommit message (Collapse)AuthorLines
2020-03-31Use Place directly in peek_at, it's CopySantiago Pastorino-4/+4
2020-03-31Use Place directly on place_contents_drop_state_cannot_differ, it's CopySantiago Pastorino-2/+2
2020-03-31Use Place directly in place_as_reborrow, it's CopySantiago Pastorino-3/+3
2020-03-31Use Place directly on Operand::place and friends, it's CopySantiago Pastorino-31/+31
2020-03-31Use Place directly, it's Copy even more use casesSantiago Pastorino-119/+120
2020-03-31Use Place directly, it's Copy more use casesSantiago Pastorino-28/+25
2020-03-31Use Place directly on check_mut_borrowing_layout_constrained_field, it's CopySantiago Pastorino-2/+2
2020-03-31Use Place directly on remove_never_initialized_mut_locals, it's CopySantiago Pastorino-4/+4
2020-03-31Use Place directly on borrow_of_local_data, it's CopySantiago Pastorino-4/+4
2020-03-31Use Place directly on propagate_closure_used_mut_place, it's CopySantiago Pastorino-4/+3
2020-03-31Use Place directly, it's CopySantiago Pastorino-94/+88
2020-03-31Rollup merge of #70614 - RalfJung:cons-prop-reloc, r=wesleywiserDylan DPC-7/+4
remove unnecessary relocation check in const_prop Unnecessary as per https://github.com/rust-lang/rust/issues/70356#issuecomment-606615292 Fixes https://github.com/rust-lang/rust/issues/70356 r? @oli-obk Cc @wesleywiser
2020-03-31avoid an unreachable fallbackRalf Jung-11/+11
2020-03-31Make the rustc respect the `-C codegen-units` flag in incremental mode.Michael Woerister-24/+60
Before this commit `-C codegen-units` would just get silently be ignored if `-C incremental` was specified too. After this commit one can control the number of codegen units generated during incremental compilation. The default is rather high at 256, so most crates won't see a difference unless explicitly opting into a lower count.
2020-03-31rustc_target::abi: rename FieldPlacement to FieldsShape.Ana-Maria Mihalache-7/+7
2020-03-31remove unnecessary relocation check in const_propRalf Jung-7/+4
2020-03-31more clippy fixesMatthias Krüger-1/+1
use is_empty() instead of len comparison (clippy::len_zero) use if let instead of while let loop that never loops (clippy::never_loop) remove redundant returns (clippy::needless_return) remove redundant closures (clippy::redundant_closure) use if let instead of match and wildcard pattern (clippy::single_match) don't repeat field names redundantly (clippy::redundant_field_names)
2020-03-30remove a dead parameter that everyone sets to NoneRalf Jung-4/+4
2020-03-30stop unnecessarily passing around span argument for Miri function callsRalf Jung-42/+25
2020-03-30remove caller span from Miri stack frameRalf Jung-12/+2
2020-03-30Miri stacktrace: record span inside frame, not call-site spanRalf Jung-16/+4
2020-03-30Rollup merge of #70546 - lqd:polonius_update, r=nikomatsakisDylan DPC-1/+1
Polonius: update to 0.12.1, fix more move errors false positives, update test expectations This PR: - updates `polonius-engine` to version 0.12.1 to fix some move errors false positives - fixes a fact generation mistake creating the other move errors false positives - updates the test expectations for the polonius compare-mode so that all (minus the 2 OOMs) ui tests pass again (matching the [analysis doc](https://hackmd.io/CjYB0fs4Q9CweyeTdKWyEg?view) starting at case 34) In my opinion, this is safe to rollup. r? @nikomatsakis
2020-03-30Use if let instead of match when only matching a single variant ↵Matthias Krüger-203/+169
(clippy::single_match) Makes code more compact and reduces nestig.
2020-03-30rustc -> rustc_middle part 3 (rustfmt)Mazdak Farrokhzad-175/+176
2020-03-30rustc -> rustc_middle part 2Mazdak Farrokhzad-427/+426
2020-03-30rustc -> rustc_middle part 1Mazdak Farrokhzad-3/+3
2020-03-30Auto merge of #70449 - ecstatic-morse:visit-body, r=oli-obkbors-26/+25
Make `Visitor::visit_body` take a plain `&Body` `ReadOnlyBodyAndCache` has replaced `&Body` in many parts of the code base that don't care about basic block predecessors. This includes the MIR `Visitor` trait, which I suspect resulted in many unnecessary changes in #64736. This reverts part of that PR to reduce the number of places where we need to pass a `ReadOnlyBodyAndCache`. In the long term, we should either give `ReadOnlyBodyAndCache` more ergonomic name and replace all uses of `&mir::Body` with it at the cost of carrying an extra pointer everywhere, or use it only in places that actually need access to the predecessor cache. Perhaps there is an even nicer alternative. r? @Nashenas88
2020-03-30Polonius fact generation: fix path access fact locationRemy Rakic-1/+1
This will fix the other move errors false positives: emitting the fact at the start point caused accesses to be at the same point as an initialization fact of the return place of a call on the following block, which emitted an error.
2020-03-29Auto merge of #70009 - estebank:sugg-bound, r=Centrilbors-2/+0
Tweak `suggest_constraining_type_param` Some of the bound restriction structured suggestions were incorrect while others had subpar output. The only issue left is a suggestion for an already present bound when dealing with `const`s that should be handled independently. Fix #69983.
2020-03-29Use `&` to do deref coercion for `ReadOnlyBodyAndCache`Dylan MacKenzie-21/+21
2020-03-29Tweak `suggest_constraining_type_param`Esteban Küber-2/+0
Some of the bound restriction structured suggestions were incorrect while others had subpar output.
2020-03-29Rollup merge of #69702 - anyska:tylayout-rename, r=oli-obkDylan DPC-56/+56
Rename TyLayout to TyAndLayout.
2020-03-29Make `Visitor::visit_body` take a simple `Body`Dylan MacKenzie-22/+21
2020-03-29Rollup merge of #70508 - RalfJung:scalar-from, r=eddybDylan DPC-19/+15
Miri: use more specialized Scalar::from_ constructors where appropriate
2020-03-28Ensure output dir for dataflow results existsDylan MacKenzie-0/+5
2020-03-28Dump graphviz dataflow results with flagDylan MacKenzie-1/+15
2020-03-28`dump_enabled` takes a `DefId` instead of `MirSource`Dylan MacKenzie-6/+6
2020-03-28refmtRalf Jung-4/+1
2020-03-28get rid of useless back-and-forth castRalf Jung-3/+2
2020-03-28use more specialized Scalar::from_ constructors where appropriateRalf Jung-13/+13
2020-03-28rename Scalar::{ptr_null -> null_ptr}Ralf Jung-1/+1
2020-03-27Rollup merge of #70480 - lcnr:appayupyup, r=eddybMazdak Farrokhzad-1/+1
clarify hir_id <-> node_id method names resolves 2 FIXME. r? @eddyb
2020-03-27Rename TyLayout to TyAndLayout.Ana-Maria Mihalache-56/+56
2020-03-27clarify hir_id <-> node_id method namesBastian Kauschke-1/+1
2020-03-27Auto merge of #69916 - oli-obk:mir_bless, r=eddybbors-91/+287
Enable blessing of mir opt tests cc @rust-lang/wg-mir-opt cc @RalfJung Long overdue, but now you can finally just add a ```rust // EMIT_MIR rustc.function_name.MirPassName.before.mir ``` (or `after.mir` since most of the time you want to know the MIR after a pass). A `--bless` invocation will automatically create the files for you. I suggest we do this for all mir opt tests that have all of the MIR in their source anyway If you use `rustc.function.MirPass.diff` you only get the diff that the MIR pass causes on the MIR. Fixes #67865
2020-03-27Auto merge of #68404 - Amanieu:llvm-asm, r=estebankbors-13/+13
Rename asm! to llvm_asm! As per https://github.com/rust-lang/rfcs/pull/2843, this PR renames `asm!` to `llvm_asm!`. It also renames the compiler's internal `InlineAsm` data structures to `LlvmInlineAsm` in preparation for the new `asm!` functionality specified in https://github.com/rust-lang/rfcs/pull/2850. This PR doesn't actually deprecate `asm!` yet, it just makes it redirect to `llvm_asm!`. This is necessary because we first need to update the submodules (in particular stdarch) to use `llvm_asm!`.
2020-03-27Rollup merge of #69644 - ecstatic-morse:unified-dataflow-cleanup, r=eddybDylan DPC-1108/+89
Remove framework in `dataflow/mod.rs` in favor of "generic" one This is the culmination of the work described in rust-lang/compiler-team#202. All dataflow analyses (including the one in `clippy`) have been ported to use the framework in `dataflow/generic`, which can efficiently handle both gen/kill and generic problems. This PR moves the framework in `dataflow/generic` to `dataflow/framework`, and removes the gen/kill framework in `dataflow/mod.rs`. More comprehensive documentation for the new framework is tracked in rust-lang/rustc-guide#564. `clippy` will need to change the path it uses to import the dataflow analysis traits.
2020-03-26Make `framework` a private moduleDylan MacKenzie-1/+1
2020-03-26Update `framework` module docsDylan MacKenzie-17/+15
2020-03-26Move `BottomValue` into `framework/mod.rs`Dylan MacKenzie-47/+43