summary refs log tree commit diff
path: root/src/librustc_mir/transform/inline.rs
AgeCommit message (Collapse)AuthorLines
2019-06-25Implement From<Local> for Place and PlaceBaseSantiago Pastorino-3/+3
2019-06-18rustc: remove 'x: 'y bounds (except from comments/strings).Eduard-Mihai Burtescu-1/+1
2019-06-17remove _by_hir_id if there is no NodeId counterpartljedrz-1/+1
2019-06-16Auto merge of #60730 - matthewjasper:optimize-false-edges, r=pnkfelixbors-4/+2
Optimize matches Attempt to fix or improve #60571 This is breaking some diagnostics because the MIR for match arms isn't in source order any more. cc @centril
2019-06-14Run `rustfmt --file-lines ...` for changes from previous commits.Eduard-Mihai Burtescu-6/+1
2019-06-14Unify all uses of 'gcx and 'tcx.Eduard-Mihai Burtescu-3/+3
2019-06-12Make `FalseEdges` always have two targetsMatthew Jasper-4/+2
We never have more than one imaginary target, so we have no reason for a `Vec`
2019-06-12Run `rustfmt --file-lines ...` for changes from previous commits.Eduard-Mihai Burtescu-8/+12
2019-06-12rustc: replace `TyCtxt<'tcx, 'gcx, 'tcx>` with `TyCtxt<'gcx, 'tcx>`.Eduard-Mihai Burtescu-3/+3
2019-06-12Fix fallout from `deny(unused_lifetimes)`.Eduard-Mihai Burtescu-2/+2
2019-06-12rustc: replace `TyCtxt<'a, 'gcx, 'tcx>` with `TyCtxt<'tcx, 'gcx, 'tcx>`.Eduard-Mihai Burtescu-5/+5
2019-06-09Changed usages of `mir` in librustc::mir and librustc_mir to `body`Jad Ghalayini-62/+62
2019-05-28Changes the type `mir::Mir` into `mir::Body`Claude-Alban RANÉLY-VERGÉ-DÉPRÉ-9/+9
The commit should have changed comments as well. At the time of writting, it passes the tidy and check tool. Revisions asked by eddyb : - Renamed of all the occurences of {visit/super}_mir - Renamed test structures `CachedMir` to `Cached` Fixing the missing import on `AggregateKind`
2019-05-27Make dest_needs_borrow iterate instead of recurseSantiago Pastorino-10/+13
2019-05-01Auto merge of #60195 - varkor:commontypes-to-common, r=eddybbors-1/+1
Split `CommonTypes` into `CommonTypes` and `CommonLifetimes` The so-called "`CommonTypes`" contains more than just types. r? @eddyb
2019-04-30Rollup merge of #60276 - matthewjasper:cleanup-mir-visitor, r=estebankMazdak Farrokhzad-4/+4
Cleanup the MIR visitor * Remove useless `BasicBlock` parameters on methods with `Location`s. * Prefer `visit_terminator_kind` to `visit_terminator`. * Remove `Region` from PlaceContexts. `visit_rvalue` should be used when the region is important. * Remove unused visitor methods.
2019-04-26Remove region from borrow place contextsMatthew Jasper-2/+2
2019-04-26Remove BasicBlock parameter from mir visitor methodsMatthew Jasper-2/+2
2019-04-26Update handling of Tuplevarkor-1/+4
2019-04-25Update existing usagesvarkor-1/+1
2019-04-23rustc: dissuade compiler developers from misusing upvar debuginfo.Eduard-Mihai Burtescu-3/+3
2019-04-02Remove adt_def from PlaceTy and make it a structTyler Mandry-3/+2
2019-03-23adding mir::StaticKind enum for static and promotedSaleem Jaffer-1/+3
2019-03-21review fixesSaleem Jaffer-8/+3
2019-03-18fixed all compilation errorsSaleem Jaffer-0/+1
2019-03-18promoted is still left in 2 placesSaleem Jaffer-4/+8
2019-03-07HirIdification: replace NodeId method callsljedrz-2/+4
2019-03-05Handle new ConstValue variants in mirvarkor-1/+1
Co-Authored-By: Gabriel Smith <yodaldevoid@users.noreply.github.com>
2019-03-01Put Local, Static and Promoted as one Base variant of PlaceSantiago Pastorino-8/+8
2019-02-26replace &'tcx Substs with SubstsRefcsmoe-2/+2
2019-02-15Always emit an error for a query cycleJohn Kåre Alsaker-14/+26
2019-02-09pass full InstanceDef to run_passesRalf Jung-5/+5
2019-02-08librustc_mir => 2018Taiki Endo-3/+3
2019-01-21Differentiate between closure and function bodiesOliver Scherer-8/+4
2018-12-25Remove licensesMark Rousskov-10/+0
2018-12-18treat ref-to-raw cast like a reborrow: do a special kind of retagRalf Jung-4/+5
2018-12-07Various minor/cosmetic improvements to codeAlexander Regueiro-2/+2
2018-12-06Use a function to access the Hir map to be able to turn it into a query laterJohn Kåre Alsaker-2/+2
2018-12-03Retag needs to know whether this is a 2-phase-reborrowRalf Jung-2/+8
2018-11-09Don't inline virtual calls (take 2)Wesley Wiser-45/+49
When I fixed the previous mis-optimizations, I didn't realize there were actually two different places where we mutate `callsites` and both of them should have the same behavior. As a result, if a function was inlined and that function contained virtual function calls, they were incorrectly being inlined. I also added a test case which covers this.
2018-11-07Consume optimization fuel from the MIR inlinerWesley Wiser-1/+13
This makes it easier to debug mis-optimizations that occur during inlining. Thanks to @nikomatsakis for the suggestion!
2018-10-29make inliner remove the fn_entry flag on Retag statementsRalf Jung-0/+8
2018-10-14[mir-inlining] Don't inline virtual callsWesley Wiser-7/+16
Prior to this change, the test case would output `1` instead of `2` like it should.
2018-09-26Auto merge of #54526 - nnethercote:shrink-StatementKind, r=nagisabors-2/+2
Shrink `StatementKind` `StatementKind` occurs in significant amounts in Massif profiles.
2018-09-24Shrink StatementKind::Assign.Nicholas Nethercote-2/+2
This shrinks StatementKind from 80 bytes to 64 bytes on 64-bit.
2018-09-20Extend MIR inlining to all operand variantsChristian Poveda-2/+2
2018-09-18Merge indexed_set.rs into bitvec.rs, and rename it bit_set.rs.Nicholas Nethercote-2/+2
Currently we have two files implementing bitsets (and 2D bit matrices). This commit combines them into one, taking the best features from each. This involves renaming a lot of things. The high level changes are as follows. - bitvec.rs --> bit_set.rs - indexed_set.rs --> (removed) - BitArray + IdxSet --> BitSet (merged, see below) - BitVector --> GrowableBitSet - {,Sparse,Hybrid}IdxSet --> {,Sparse,Hybrid}BitSet - BitMatrix --> BitMatrix - SparseBitMatrix --> SparseBitMatrix The changes within the bitset types themselves are as follows. ``` OLD OLD NEW BitArray<C> IdxSet<T> BitSet<T> -------- ------ ------ grow - grow new - (remove) new_empty new_empty new_empty new_filled new_filled new_filled - to_hybrid to_hybrid clear clear clear set_up_to set_up_to set_up_to clear_above - clear_above count - count contains(T) contains(&T) contains(T) contains_all - superset is_empty - is_empty insert(T) add(&T) insert(T) insert_all - insert_all() remove(T) remove(&T) remove(T) words words words words_mut words_mut words_mut - overwrite overwrite merge union union - subtract subtract - intersect intersect iter iter iter ``` In general, when choosing names I went with: - names that are more obvious (e.g. `BitSet` over `IdxSet`). - names that are more like the Rust libraries (e.g. `T` over `C`, `insert` over `add`); - names that are more set-like (e.g. `union` over `merge`, `superset` over `contains_all`, `domain_size` over `num_bits`). Also, using `T` for index arguments seems more sensible than `&T` -- even though the latter is standard in Rust collection types -- because indices are always copyable. It also results in fewer `&` and `*` sigils in practice.
2018-08-22Remove Ty prefix from ↵varkor-4/+4
Ty{Adt|Array|Slice|RawPtr|Ref|FnDef|FnPtr|Dynamic|Closure|Generator|GeneratorWitness|Never|Tuple|Projection|Anon|Infer|Error}
2018-08-19Fix typos found by codespell.Matthias Krüger-3/+3
2018-08-01Split out growth functionality into BitVector typeMark Rousskov-2/+2