summary refs log tree commit diff
path: root/src/librustc_mir/transform/inline.rs
AgeCommit message (Collapse)AuthorLines
2017-09-29stop using monomorphize::resolve()Douglas Campos-1/+4
2017-09-29take ParamEnv into account when resolvingDouglas Campos-2/+5
2017-09-29make it not to be a methodDouglas Campos-1/+1
2017-09-29always use resolveDouglas Campos-19/+4
2017-09-29re-enable mir inlining across trait methodsDouglas Campos-8/+23
this fixes #44389
2017-09-11Auto merge of #44383 - qmx:gh/40473/no-inline-trait-method, r=nikomatsakisbors-6/+8
MIR: should not inline trait method Fixes #40473. The idea here is bailing out of inlining if we're talking about a trait method.
2017-09-08simplifyDouglas Campos-9/+1
2017-09-08Auto merge of #44142 - alexcrichton:dllimport-query, r=nikomatsakisbors-1/+1
Migrate a slew of metadata methods to queries This PR intends to make more progress on #41417, knocking off some low-hanging fruit. Closes #44190 cc #44137
2017-09-06ugly, but works!Douglas Campos-6/+16
2017-09-06Reintroduce the early returnsOliver Schneider-4/+9
2017-09-06Fix a bug in the inlinerOliver Schneider-1/+2
2017-09-05rustc: Migrate lang items to a queryAlex Crichton-1/+1
This commit moves the calculation of the `LanguageItems` structure into a query rather than being calculated before the `TyCtxt` exists, with the eventual end goal of removing some `CrateStore` methods.
2017-09-03rustc_mir: implement visit_local instead/along visit_lvalue where possible.Eduard-Mihai Burtescu-31/+24
2017-08-28Merge branch 'master' of https://github.com/rust-lang/rust into genJohn Kåre Alsaker-1/+6
2017-08-25rustc: Add a FIXME for `try_get` in MIR inliningAlex Crichton-1/+6
It sounds like this is being handled elsewhere, so for now just preserve the existing behavior of ignoring th error.
2017-08-16Merge remote-tracking branch 'origin/master' into genAlex Crichton-9/+9
2017-08-15use field init shorthand EVERYWHEREZack M. Davis-9/+9
Like #43008 (f668999), but _much more aggressive_.
2017-07-28Rename suspend to yieldJohn Kåre Alsaker-2/+2
2017-07-28Generator literal supportJohn Kåre Alsaker-0/+6
2017-07-12overload the mir ty methods to make them more ergonomic to useRalf Jung-5/+5
2017-07-11Refactor: {Lvalue,Rvalue,Operand}::ty only need the locals' types, not the ↵Ralf Jung-5/+5
full &Mir
2017-06-27rustc: move the PolyFnSig out of TyFnDef.Eduard-Mihai Burtescu-3/+4
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-3/+3
2017-05-22rename `parameter_environment` to `param_env`Niko Matsakis-1/+1
2017-05-22rename `ParameterEnvironment` to `ParamEnv`Niko Matsakis-1/+1
2017-05-22centralize the caching for is-copy, is-sized, and is-freezeNiko Matsakis-1/+1
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-1/+2
2017-05-02update comment about heuristicsNiko Matsakis-1/+3
2017-05-02rename from `item_mir` to `optimized_mir`Niko Matsakis-1/+1
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-02rip out everything but `MirPass`, move the logic into suitesNiko Matsakis-16/+11
2017-05-02remove `Pass` and (temporarily) drop `Inline`Niko Matsakis-1/+6
2017-05-02convert the `inline` pass to use the new multi resultNiko Matsakis-43/+47
This involves changing various details about that system, though the basic shape remains the same.
2017-05-02retool MIR passes completelyNiko Matsakis-3/+12
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-02simplify the MirPass traits and passes dramaticallyNiko Matsakis-14/+4
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-24/+4
2017-05-02introduce `mir_keys()`Niko Matsakis-29/+9
Each MIR key is a DefId that has MIR associated with it
2017-04-22avoid calling `mk_region` unnecessarilyAriel Ben-Yehuda-2/+2
this improves typeck & trans performance by 1%. This looked hotter on callgrind than it is on a CPU.
2017-04-20rustc: combine type_needs_drop_given_env and may_drop into needs_drop.Eduard-Mihai Burtescu-1/+1
2017-04-11store Spans for all MIR localsAriel Ben-Yehuda-9/+6
2017-03-10Only run inlining if mir opts are enabledJames Miller-1/+1
2017-03-10Add dep-graph tasks where neededJames Miller-16/+10
2017-03-10Initial implementation of inlining for MIRJames Miller-0/+842
Fairly basic implementation of inlining for MIR. Uses conservative heuristics for inlining.