about summary refs log tree commit diff
path: root/src/librustc_mir/transform/mod.rs
AgeCommit message (Collapse)AuthorLines
2020-04-24Don't run various MIR optimizations at mir-opt-level=0Wesley Wiser-48/+79
Add missing checks for mir-opt-level to non-essential MIR passes.
2020-04-24Auto merge of #70820 - spastorino:replace-fragile-erroneous-const-sys, r=oli-obkbors-1/+12
Replace fragile erroneous const sys Closes #67191 r? @oli-obk
2020-04-23Modify `as_local_hir_id` to accept a `LocalDefId` instead of a `DefId`marmeladema-1/+1
2020-04-23librustc_middle: return LocalDefId instead of DefId in local_def_idmarmeladema-1/+1
2020-04-23Import RequiredConstsVisitorSantiago Pastorino-2/+2
2020-04-23Rename uneval_consts to required_constsSantiago Pastorino-6/+6
2020-04-23Add MirPass to collect Unevaluated consts in MIR bodySantiago Pastorino-1/+12
2020-04-23Rename `Item` to `ConstCx`.Oliver Scherer-3/+3
This renaming was already done in some modules via import renaming. It's strictly used as a context, and it contains a `TyCtxt`.
2020-04-22Use `Body` everywhereDylan MacKenzie-18/+10
2020-04-13Don't always run `add_call_guards` passJonas Schievink-4/+2
2020-04-10librustc_middle: return LocalDefId instead of DefId in body_owner_def_idmarmeladema-2/+2
2020-03-30rustc -> rustc_middle part 3 (rustfmt)Mazdak Farrokhzad-4/+4
2020-03-30rustc -> rustc_middle part 2Mazdak Farrokhzad-4/+4
2020-03-19Use erased regions in MIRMatthew Jasper-3/+5
2020-03-16remove unnecessary hir::map importsMazdak Farrokhzad-2/+1
2020-03-14Index HIR after creating TyCtxtJohn Kåre Alsaker-1/+1
2020-03-12remove lifetimes that can be elided (clippy::needless_lifetimes)Matthias Krüger-1/+1
2020-02-29Rename `syntax` to `rustc_ast` in source codeVadim Petrochenkov-1/+1
2020-02-28Rollup merge of #69481 - matthiaskrgr:single_char, r=ecstatic-morseMazdak Farrokhzad-1/+1
use char instead of &str for single char patterns
2020-02-27don't use .into() to convert types into identical types.Matthias Krüger-1/+1
example: let s: String = format!("hello").into();
2020-02-27use char instead of &str for single char patternsMatthias Krüger-1/+1
2020-01-14Add unreachable propagation mir optimization passKonstantinos Triantafyllou-0/+2
2020-01-12Split `rustc_mir::{build, hair, lints}` into their own crateMatthew Jasper-7/+4
2020-01-08normalize rustc::hir::intravisit importsMazdak Farrokhzad-1/+1
2020-01-08intravisit: abstract over HIR MapMazdak Farrokhzad-1/+3
2020-01-05Remove rustc_hir reexports in rustc::hir.Mazdak Farrokhzad-2/+2
2020-01-04DefId{Map,Set} -> rustc::hir::def_idMazdak Farrokhzad-2/+1
2020-01-01Rename `syntax_pos` to `rustc_span` in source codeVadim Petrochenkov-1/+1
2019-12-27Fallout in other crates.Camille GILLOT-1/+1
2019-12-22Format the worldMark Rousskov-110/+119
2019-12-21Use Arena inside hir::EnumDef.Camille GILLOT-1/+1
2019-12-09Remove `uniform_array_move_out` passesMatthew Jasper-3/+0
These passes were buggy, MIR building is now responsible for canonicalizing `ConstantIndex` projections and `MoveData` is responsible for splitting `Subslice` projections.
2019-12-05rustc: Apply clearer naming to BodyAndCache, fix Deref impl, remove unneeded ↵Paul Daniel Faria-9/+9
Index impl, remove body fn rustc_codegen_ssa: Fix BodyAndCache reborrow to Body and change instances of body() call to derefence rustc_mir: Fix BodyAndCache reborrow to Body and change intances of body() call to derefence
2019-12-02Fix rebasing errors, convert some BodyCache::body() calls to reborrowsPaul Daniel Faria-0/+1
2019-12-02Fix type errors created during rebasingPaul Daniel Faria-1/+1
2019-12-02Remove HasLocalDecls impl from BodyCache's, properly reborrow to Body, ↵Paul Daniel Faria-15/+15
rename all body_cache back to body
2019-12-02Fix typoPaul Daniel Faria-1/+1
2019-12-02Fix tidy errorsPaul Daniel Faria-1/+1
2019-12-02Fix remaining compilation issuesPaul Daniel Faria-0/+2
2019-12-02Simplify BodyCache impl and fix all remaining type errors in librustc_mir ↵Paul Daniel Faria-21/+21
(lifetime errors still exist)
2019-12-02Simplify Cache wrapper to single type, impl Deref on it, fix all compilation ↵Paul Daniel Faria-3/+0
errors in librustc_codegen_ssa
2019-12-02Move predecessors cache back to its own typePaul Daniel Faria-1/+2
This ensures that the cache can be properly ignored during encoding and decoding. Fix panics that arose due to lack of encoding
2019-12-02Address nits and remove unneeded passPaul Daniel Faria-2/+0
2019-12-02Ensure predecessors are recomputed at critical points, fixes panicsPaul Daniel Faria-1/+4
2019-12-02Add pass to ensure predecessors cache is generated after optimizationPaul Daniel Faria-0/+2
2019-11-21Introduce MIR optimizations for simplifying `x?` on `Result`s.Mazdak Farrokhzad-0/+4
This optimization depends on inlining for the identity conversions introduced by the lowering of the `?`. To take advantage of `SimplifyArmIdentity`, `-Z mir-opt-level=2` is required because that triggers the inlining MIR optimization.
2019-11-15Fix nits from reviewDylan MacKenzie-2/+2
2019-11-15Use a bespoke type for the result of `mir_const_qualif`Dylan MacKenzie-4/+4
2019-11-15Remove `qualify_consts` completelyDylan MacKenzie-8/+3
2019-11-15Use new const-checker for `mir_const_qualif`Dylan MacKenzie-2/+37
Now `mir_const_qualif` must be called for `static`s and `const fn`s as well as `const`s since it is responsible for const-checking. We return the qualifs in the return place for everything, even though they will only be used for `const`s.