about summary refs log tree commit diff
path: root/src/librustc_mir
AgeCommit message (Collapse)AuthorLines
2020-04-16simplify unused unsafe block handlingljedrz-7/+11
2020-04-16switch back to 'bytes'Ralf Jung-1/+1
2020-04-16compute SCCs in dependency orderNiko Matsakis-33/+60
2020-04-16reserve variable for empty root regionNiko Matsakis-16/+29
2020-04-16enforce that R1: R2 requires univ(R1) <= univ(R2)Niko Matsakis-5/+79
2020-04-16don't clone types that are copy (clippy::clone_on_copy)Matthias Krüger-23/+22
2020-04-15Fix clippy warningsMatthias Krüger-2/+2
clippy::{filter_next,single_char_pattern,unit_arg,identity_conversion,nonminimal_bool}
2020-04-15Remove now unnecessary resolve_maybe_global_alloc.Vytautas Astrauskas-43/+17
2020-04-15Directly modify the `used_locals` vecWesley Wiser-14/+12
Fixes perf regression in `optimized_mir` query
2020-04-15Run `SimplifyLocals` iteratively until we get to a fixedpointWesley Wiser-27/+131
2020-04-15Remove other RvaluesWesley Wiser-12/+30
2020-04-15Add function eval_maybe_thread_local_static_const that allows handling ↵Vytautas Astrauskas-52/+70
thread locals without touching debug info; address other PR comments.
2020-04-15Clarify the comments explaining the purpose of resolve_maybe_global_alloc.Vytautas Astrauskas-4/+23
2020-04-15Address reviewers' comments: replace resolve_thread_local_allocation_id with ↵Vytautas Astrauskas-22/+28
resolve_maybe_global_alloc, clarify comments.
2020-04-15Make the necessary changes to support concurrency in Miri.Vytautas Astrauskas-57/+135
2020-04-15reword Miri validity errors: undefined -> uninitializedRalf Jung-6/+11
2020-04-15Rollup merge of #71100 - RalfJung:miri-frame-hook, r=oli-obkMazdak Farrokhzad-46/+88
Miri: expand frame hooks This is needed to make https://github.com/rust-lang/miri/pull/1330 work. r? @oli-obk @eddyb
2020-04-15Rollup merge of #70891 - lcnr:replace-rvalue_aggregate, r=eddybMazdak Farrokhzad-1/+5
unit rvalue, use constant `()` instead of tuple fixes #70886 r? @eddyb
2020-04-15remove rustfmt-induced spurious trailing commaRalf Jung-1/+1
2020-04-15remove an impossible branch from check_constsRalf Jung-16/+5
2020-04-15Auto merge of #71106 - jonas-schievink:remove-call-guard-pass, ↵bors-5/+7
r=ecstatic-morse,RalfJung Don't always run `add_call_guards` pass It is only needed when `add_retag` runs. (the pass is run again to split critical edges before codegen, that one is required)
2020-04-15Auto merge of #71151 - Dylan-DPC:rollup-6rt4h7b, r=Dylan-DPCbors-8/+23
Rollup of 8 pull requests Successful merges: - #70657 (Allow `try`-blocks in places where an open delim is expected) - #70947 (tighten CTFE safety net for accesses to globals) - #70949 (simplify `vec!` macro) - #71002 (fix target & runtool args order) - #71082 (ptr: introduce len() method on raw slices) - #71128 (Remove unused single_step flag) - #71133 (Tighten time complexity on the doc of sort_by_key) - #71135 (Update books) Failed merges: r? @ghost
2020-04-15Move early needs_subst bailout to _after_ linting.jumbatm-5/+5
This ensures we get still get lints for generic contexts.
2020-04-14Rollup merge of #70947 - RalfJung:ctfe-no-read-mut-global, r=oli-obkDylan DPC-8/+23
tighten CTFE safety net for accesses to globals Previously, we only rejected reading from all statics. Now we also reject reading from any mutable global. Mutable globals are the true culprit here as their run-time value might be different from their compile-time values. Statics are just the approximation we use for that so far. Also refactor the code a bit to make it clearer what is being checked and allowed. r? @oli-obk
2020-04-14borrow_check/type_check: normalize `Aggregate` and `Call` operands.Eduard-Mihai Burtescu-0/+2
2020-04-14Don't load the same allocation twice when reading a scalar pair from itOliver Scherer-7/+5
2020-04-14Rename AssocKind::Method to AssocKind::FnRustin-Liu-1/+1
Rename fn_has_self_argument to fn_has_self_parameter Rename AssocItemKind::Method to AssocItemKind::Fn Refine has_no_input_arg Refine has_no_input_arg Revert has_no_input_arg Refine suggestion_descr Move as_def_kind into AssocKind Signed-off-by: Rustin-Liu <rustin.liu@gmail.com> Fix tidy check issue Signed-off-by: Rustin-Liu <rustin.liu@gmail.com>
2020-04-13unit rvalue: use constant `()` instead of tupleBastian Kauschke-1/+5
2020-04-13Don't always run `add_call_guards` passJonas Schievink-5/+7
2020-04-13fmtRalf Jung-2/+3
2020-04-13Miri: let machine hook dynamically decide about alignment checksRalf Jung-7/+13
2020-04-13add after_stack_push hook; add public ImmTy::from_immediate method, and make ↵Ralf Jung-28/+43
ImmTy::imm field private
2020-04-13Miri: let push_frame hook also access and mutate the rest of the frame dataRalf Jung-18/+44
2020-04-12Rollup merge of #71013 - jonas-schievink:visit-projection, r=eddybDylan DPC-48/+6
Pass the `PlaceElem::Index` local to `visit_local` Fixes https://github.com/rust-lang/rust/issues/71008 cc @rust-lang/wg-mir-opt r? @spastorino
2020-04-11Auto merge of #70161 - cjgillot:query-arena, r=nikomatsakisbors-9/+9
Allocate some query results on an arena This avoids a cloning few `Lrc` and `Vec`s in the queries.
2020-04-11Auto merge of #71014 - Centril:rollup-3lc8cnt, r=Centrilbors-1/+14
Rollup of 5 pull requests Successful merges: - #69573 (tests encoding current behavior for various cases of "binding" to _.) - #70881 (bootstrap: work around "unused attribute" errors in incremental stdlib rebuilds.) - #70957 (Normalize MIR locals' types for generator layout computation.) - #70962 (added machine hooks to track deallocations) - #70982 (Normalize function signature in function casting check procedure) Failed merges: r? @ghost
2020-04-11Rollup merge of #70962 - KrishnaSannasi:track-dealloc, r=RalfJungMazdak Farrokhzad-0/+10
added machine hooks to track deallocations This is part of rust-lang/miri#1314 in order to allow miri to show stack traces for on deallocation in order to debug use-after-free bugs
2020-04-11Rollup merge of #70957 - oli-obk:lazy_repeat_length_eval_ice, r=matthewjasperMazdak Farrokhzad-1/+4
Normalize MIR locals' types for generator layout computation. fixes #70905
2020-04-11Pass the `PlaceElem::Index` local to `visit_local`Jonas Schievink-48/+6
2020-04-10Auto merge of #70986 - marmeladema:issue70853/librustc_middle-local-def-id, ↵bors-7/+3
r=eddyb rustc_middle: return `LocalDefId` where possible in hir::map module This changes the return type of the following functions to return a `LocalDefId` instead of a `DefId`: * opt_local_def_id_from_node_id * opt_local_def_id * body_owner_def_id * local_def_id_from_node_id * get_parent_id This is another step in the right direction for #70853 This pull request will be followed by another (substantial one) which changes the return type of `local_def_id` function but this change being more invasive, we might want to wait for #70956 or #70961 (or some other form it) to land first.
2020-04-10added machine hooks to track deallocationsOzaren-0/+10
2020-04-10Rollup merge of #69745 - estebank:predicate-obligations-3, r=nikomatsakis,eddybMazdak Farrokhzad-1/+1
Use `PredicateObligation`s instead of `Predicate`s Keep more information about trait binding failures. Use more specific spans by pointing at bindings that introduce obligations. Subset of #69709. r? @eddyb
2020-04-10librustc_middle: return LocalDefId instead of DefId in get_parent_didmarmeladema-5/+1
2020-04-10librustc_middle: return LocalDefId instead of DefId in body_owner_def_idmarmeladema-2/+2
2020-04-10Rollup merge of #70913 - eddyb:rc-arc-diagnostic-items, r=matthewjasperMazdak Farrokhzad-17/+20
Replace "rc"/"arc" lang items with Rc/Arc diagnostic items. `Rc`/`Arc` should have no special semantics, so it seems appropriate for them to not be lang items. r? @matthewjasper
2020-04-10assert that only statics can possibly be mutableRalf Jung-8/+8
2020-04-09Avoid calling `fn_sig` query during `is_const_fn_raw`Dylan MacKenzie-17/+10
2020-04-09Use `Visitor` for `AlwaysLiveLocals`Dylan MacKenzie-14/+19
2020-04-09Explain why we remove `self` from storage live localsDylan MacKenzie-0/+1
2020-04-09Use new utility in `transform/generator.rs`Dylan MacKenzie-34/+40