summary refs log tree commit diff
path: root/src/librustc_mir/transform
AgeCommit message (Collapse)AuthorLines
2017-06-01ergonomic improvements to the methods in infcxNiko Matsakis-5/+7
2017-06-01strip param-env from infcxNiko Matsakis-10/+18
2017-06-01rewrite layout to take a (param-env, ty) pair instead of infcxNiko Matsakis-4/+2
2017-06-01move projection mode into parameter environmentNiko Matsakis-6/+6
2017-05-28fix RUST_LOG ICE caused by printing a default impl's DefIdAriel Ben-Yehuda-2/+2
2017-05-28add NullOp::SizeOf and BinOp::OffsetAriel Ben-Yehuda-4/+7
2017-05-22rename `parameter_environment` to `param_env`Niko Matsakis-4/+4
2017-05-22rename `ParameterEnvironment` to `ParamEnv`Niko Matsakis-4/+4
2017-05-22centralize the caching for is-copy, is-sized, and is-freezeNiko Matsakis-4/+4
Use the trait-environment+type as the key. Note that these are only invoked on types that live for the entire compilation (no inference artifacts). We no longer need the various special-case bits and caches that were in place before.
2017-05-13rustc: uniformly compute ParameterEnvironment's "free outlive scope".Eduard-Mihai Burtescu-5/+5
2017-05-12box large variants in MIRAriel Ben-Yehuda-12/+11
Operand: 72 -> 24 B Statement: 192 -> 96 B Terminator: 256 -> 112 B librustc translation memory usage: 1795 -> 1669 MB next step would be interning lvalues, I suppose?
2017-05-08Remove need for &format!(...) or &&"" dances in `span_label` callsOliver Schneider-8/+8
2017-05-02update comment about heuristicsNiko Matsakis-1/+3
2017-05-02move queries code into transformNiko Matsakis-6/+99
2017-05-02rename from `item_mir` to `optimized_mir`Niko Matsakis-1/+1
2017-05-02delete dead codeNiko Matsakis-89/+0
2017-05-02support inlining by asking for optimizer mir for calleesNiko Matsakis-139/+62
I tested this with it enabled 100% of the time, and we were able to run mir-opt tests successfully.
2017-05-02simplify down to one query per pass suiteNiko Matsakis-71/+30
2017-05-02rip out everything but `MirPass`, move the logic into suitesNiko Matsakis-166/+80
2017-05-02remove `Pass` and (temporarily) drop `Inline`Niko Matsakis-7/+8
2017-05-02use `force` to ensure const-qualif has been done, not readNiko Matsakis-2/+3
2017-05-02convert the `inline` pass to use the new multi resultNiko Matsakis-60/+185
This involves changing various details about that system, though the basic shape remains the same.
2017-05-02introduce idea of "stealable" MIRNiko Matsakis-26/+25
This is a more principled version of the `RefCell` we were using before. We now allocate a `Steal<Mir<'tcx>>` for each intermediate MIR pass; when the next pass steals the entry, any later attempts to use it will panic (there is no way to *test* if MIR is stolen, you're just supposed to *know*).
2017-05-02rename `MirPassSet` to `MirSuite`Niko Matsakis-19/+19
This seems like a better noun.
2017-05-02retool MIR passes completelyNiko Matsakis-50/+169
The new setup is as follows. There is a pipeline of MIR passes that each run **per def-id** to optimize a particular function. You are intended to request MIR at whatever stage you need it. At the moment, there is only one stage you can request: - `optimized_mir(def_id)` This yields the final product. Internally, it pulls the MIR for the given def-id through a series of steps. Right now, these are still using an "interned ref-cell" but they are intended to "steal" from one another: - `mir_build` -- performs the initial construction for local MIR - `mir_pass_set` -- performs a suite of optimizations and transformations - `mir_pass` -- an individual optimization within a suite So, to construct the optimized MIR, we invoke: mir_pass_set((MIR_OPTIMIZED, def_id)) which will build up the final MIR.
2017-05-02move to only def-id passesNiko Matsakis-2/+2
this temporary disables `inline`
2017-05-02introduce `DefIdPass` and remove all impls of `Pass` but `Inline`Niko Matsakis-21/+20
2017-05-02simplify the MirPass traits and passes dramaticallyNiko Matsakis-159/+134
Overall goal: reduce the amount of context a mir pass needs so that it resembles a query. - The hooks are no longer "threaded down" to the pass, but rather run automatically from the top-level (we also thread down the current pass number, so that the files are sorted better). - The hook now receives a *single* callback, rather than a callback per-MIR. - The traits are no longer lifetime parameters, which moved to the methods -- given that we required `for<'tcx>` objecs, there wasn't much point to that. - Several passes now store a `String` instead of a `&'l str` (again, no point).
2017-05-02rework `MirPass` API to be stateless and extract helper fnsNiko Matsakis-54/+28
2017-05-02introduce `mir_keys()`Niko Matsakis-38/+13
Each MIR key is a DefId that has MIR associated with it
2017-04-24rustc: use tcx.at(span) to set the location of a query.Eduard-Mihai Burtescu-3/+1
2017-04-24rustc: expose the common DUMMY_SP query case as tcx methods.Eduard-Mihai Burtescu-1/+1
2017-04-24rustc: rename some of the queries to match tcx methods.Eduard-Mihai Burtescu-2/+2
2017-04-22avoid calling `mk_region` unnecessarilyAriel Ben-Yehuda-4/+4
this improves typeck & trans performance by 1%. This looked hotter on callgrind than it is on a CPU.
2017-04-22remove cleanup branches to the resume blockAriel Ben-Yehuda-0/+34
This improves LLVM performance by 10% lost during the shimmir transition.
2017-04-20rustc: combine type_needs_drop_given_env and may_drop into needs_drop.Eduard-Mihai Burtescu-2/+2
2017-04-20rustc: replace interior_unsafe with a Freeze trait.Eduard-Mihai Burtescu-1/+1
2017-04-12address review commentsAriel Ben-Yehuda-0/+4
2017-04-11Move rvalue checking to MIRAriel Ben-Yehuda-4/+44
Fixes #41139.
2017-04-11store Spans for all MIR localsAriel Ben-Yehuda-12/+11
2017-04-07Changes based on PR feedbackRyan Scott-7/+2
2017-04-04Fixed ICEs with pattern matching in const fn. Fixes #38199, fixes #31577, ↵Ryan Scott-4/+2
fixes #29093, and fixes #40012.
2017-03-29Merge `ExpnId` and `SyntaxContext`.Jeffrey Seyfried-2/+2
2017-03-24Represent function pointers in mir-constants as a Value instead of ItemOliver Schneider-6/+4
2017-03-22Rollup merge of #40678 - michaelwoerister:dmi-prep, r=nikomatsakisCorey Farwell-1/+27
Some preparations for directly computing the ICH of crate-metadata. This PR contains some small fixes in preparation for direct metadata hashing. It mostly just moves stuff into places where it will be needed (making the module structure slightly cleaner along the way) and it fixes some omissions in the MIR region eraser. r? @nikomatsakis
2017-03-22Address review comments.Michael Woerister-2/+11
2017-03-22Add some missing method impls to MIR region eraser.Michael Woerister-1/+18
2017-03-21Teach rustc --emit=mirJake Goulding-0/+14
2017-03-18apply pre-trans passes to Shim MIRAriel Ben-Yehuda-40/+52
2017-03-18move the drop expansion code to rustc_mirAriel Ben-Yehuda-3/+3