about summary refs log tree commit diff
path: root/compiler/rustc_mir
AgeCommit message (Collapse)AuthorLines
2020-09-19Document `op_to_const`'s purposeOliver Scherer-0/+2
2020-09-19Stop using the `const_eval` query for initializers of staticsOliver Scherer-39/+20
As a side effect, we now represent most promoteds as `ConstValue::Scalar` again. This is useful because all implict promoteds are just references anyway and most explicit promoteds are numeric arguments to `asm!` or SIMD instructions.
2020-09-19Validate constants during `const_eval_raw`Oliver Scherer-24/+45
2020-09-18Clarify FIXMEJonas Schievink-2/+3
2020-09-18Return `Place` by valueJonas Schievink-2/+2
2020-09-18Move inner items outsideJonas Schievink-144/+144
2020-09-18Fix rebase falloutJonas Schievink-5/+6
2020-09-18Limit block countJonas Schievink-0/+14
2020-09-18Fix rebase falloutJonas Schievink-7/+13
2020-09-18Properly inherit conflicts when merging localsJonas Schievink-53/+60
2020-09-18More loggingJonas Schievink-21/+59
2020-09-18Record intra-statement/terminator conflictsJonas Schievink-22/+206
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-18perf: bail out when there's >500 candidate localsJonas Schievink-6/+24
2020-09-18perf: only calculate conflicts for candidatesJonas Schievink-12/+39
2020-09-18perf: walk liveness backwards in Conflicts::buildJonas Schievink-24/+39
2020-09-18Fix dataflow assert errorsJonas Schievink-3/+17
2020-09-18Implement a destination propagation passJonas Schievink-1/+742
2020-09-18use matches!() macro for simple if let conditionsMatthias Krüger-6/+6
2020-09-18Auto merge of #76575 - lcnr:abstract-const, r=oli-obkbors-1/+5
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-18initial working stateBastian Kauschke-1/+5
2020-09-18Auto merge of #72412 - VFLashM:issue-72408-nested-closures-exponential, ↵bors-19/+28
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-18Auto merge of #76837 - wesleywiser:disable_consideredequal, r=oli-obkbors-2/+9
[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-17Better handling for exponential-sized types in misc placesValerii Lashmanov-19/+28
Mostly to fix ui/issues/issue-37311-type-length-limit/issue-37311.rs. Most parts of the compiler can handle deeply nested types with a lot of duplicates just fine, but some parts still attempt to naively traverse type tree. Before such problems were caught by type length limit check, but now these places will have to be changed to handle duplicated types gracefully.
2020-09-17Default to implicit (not explicit) rules for promotability in `const fn`Dylan MacKenzie-1/+8
2020-09-17[mir-opt] Disable the `ConsideredEqual` logic in SimplifyBranchSame optWesley Wiser-2/+9
The logic is currently broken and we need to disable it to fix a beta regression (see #76803)
2020-09-17Auto merge of #76634 - RalfJung:miri-guaranteed-eq-ne, r=oli-obkbors-44/+70
move guaranteed{ne,eq} implementation to compile-time machine Currently, Miri needs a special hack to avoid using the core engine implementation of these intrinsics. That seems silly, so let's move them to the CTFE machine, which is the only machine that wants to use them. I also added a reference to https://github.com/rust-lang/rust/issues/73722 as a warning to anyone who wants to adjust `guaranteed_eq`.
2020-09-17use strip_prefix over starts_with and manual slicing based on pattern length ↵Matthias Krüger-5/+4
(clippy::manual_strip)
2020-09-17Remove redundant #![feature(...)] 's from compiler/est31-3/+0
2020-09-17Don't compile regex at every function call.Hanif Bin Ariffin-1/+10
Use `SyncOnceCell` to only compile it once. I believe this still adds some kind of locking mechanism?
2020-09-17don't lazily evaulate some trivial values for Option::None replacements ↵Matthias Krüger-4/+1
(clippy::unnecessary_lazy_evaluations)
2020-09-16Error if an unstable const eval feature is used in a stable const fnDylan MacKenzie-6/+33
2020-09-16Give name to extra `Span` in `LiveDrop` errorDylan MacKenzie-4/+6
2020-09-16Use helper function for searching `allow_internal_unstable`Dylan MacKenzie-5/+10
2020-09-16Use enum for status of non-const opsDylan MacKenzie-51/+61
2020-09-16Rollup merge of #76794 - richkadel:graphviz-font, r=ecstatic-morseTyler Mandry-4/+5
Make graphviz font configurable Alternative to PR #76776. To change the graphviz output to use an alternative `fontname` value, add a command line option like: `rustc --graphviz-font=monospace`. r? @ecstatic-morse
2020-09-16Rollup merge of #76775 - ecstatic-morse:dataflow-extra-tab-diff, ↵Tyler Mandry-1/+1
r=Mark-Simulacrum Strip a single leading tab when rendering dataflow diffs The `fmt_diff_with` formatter uses a tab to separate additions from subtractions. Strip it when rendering those diffs on separate lines. r? @Mark-Simulacrum (since you're speedy)
2020-09-16Rollup merge of #76756 - matthiaskrgr:cl123ppy, r=Dylan-DPCTyler Mandry-2/+2
fix a couple of stylistic clippy warnings namely: clippy::redundant_pattern_matching clippy::redundant_pattern clippy::search_is_some clippy::filter_next clippy::into_iter_on_ref clippy::clone_on_copy clippy::needless_return
2020-09-16Make graphviz font configurableRich Kadel-4/+5
Alternative to PR ##76776. To change the graphviz output to use an alternative `fontname` value, add a command line option like: `rustc --graphviz-font=monospace`.
2020-09-16Rollup merge of #76694 - wesleywiser:partitioning_cx_trait, r=davidtwcoDylan DPC-34/+38
Introduce a PartitioningCx struct This contains all the data used by the partitioning algorithm and allows that data to be used at each stage of the partitioning. This is useful for other approaches to partitioning which may want different pieces of the data available at each step. cc @rust-lang/wg-incr-comp
2020-09-15Strip a single leading tab when rendering dataflow diffsDylan MacKenzie-1/+1
2020-09-16Fix underflow when calculating the number of no-op jumps foldedTomasz Miąsko-9/+10
When removing unwinds to no-op blocks and folding jumps to no-op blocks, remove the unwind target first. Otherwise we cannot determine if target has been already folded or not. Previous implementation incorrectly assumed that all resume targets had been folded already, occasionally resulting in an underflow: remove_noop_landing_pads: removed 18446744073709551613 jumps and 3 landing pads
2020-09-16Rollup merge of #75304 - Aaron1011:feature/diag-deref-move-out, r=estebankDylan DPC-32/+96
Note when a a move/borrow error is caused by a deref coercion Fixes #73268 When a deref coercion occurs, we may end up with a move error if the base value has been partially moved out of. However, we do not indicate anywhere that a deref coercion is occuring, resulting in an error message with a confusing span. This PR adds an explicit note to move errors when a deref coercion is involved. We mention the name of the type that the deref-coercion resolved to, as well as the `Deref::Target` associated type being used.
2020-09-15don't convert types to the same type with try_into (clippy::useless_conversion)Matthias Krüger-8/+3
2020-09-15fix a couple of stylistic clippy warningsMatthias Krüger-2/+2
namely: clippy::redundant_pattern_matching clippy::redundant_pattern clippy::search_is_some clippy::filter_next clippy::into_iter_on_ref clippy::clone_on_copy clippy::needless_return
2020-09-14Add pass names to some common dataflow analysesDylan MacKenzie-2/+13
2020-09-14Add `Engine::pass_name` to differentiate dataflow runsDylan MacKenzie-2/+20
2020-09-14Auto merge of #76541 - matthiaskrgr:unstable_sort, r=davidtwcobors-3/+5
use sort_unstable to sort primitive types It's not important to retain original order if we have &[1, 1, 2, 3] for example. clippy::stable_sort_primitive
2020-09-14Auto merge of #76123 - tmiasko:inline-args-storage, r=wesleywiserbors-8/+28
inliner: Emit storage markers for introduced arg temporaries When introducing argument temporaries during inlining, emit storage marker statements just before the assignment and in the beginning of the return block. This ensures that such temporaries will not be considered live across yield points after inlining inside a generator. Fixes #71793.
2020-09-13Introduce a PartitioningCx structWesley Wiser-34/+38
2020-09-13Auto merge of #76244 - vandenheuvel:remove__paramenv__def_id, r=nikomatsakisbors-1/+2
Removing the `def_id` field from hot `ParamEnv` to make it smaller This PR addresses https://github.com/rust-lang/rust/issues/74865.