summary refs log tree commit diff
path: root/src/librustc_mir/transform/inline.rs
AgeCommit message (Collapse)AuthorLines
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
2018-07-29Replace push loops with collect() and extend() where possibleljedrz-4/+3
2018-07-23Promoteds are statics and statics have a place, not just a valueOliver Schneider-15/+12
2018-06-14rustc: rename ty::maps to ty::query.Eduard-Mihai Burtescu-3/+2
2018-05-30rustc: rename mir::LocalDecl's syntactic_source_info to source_info.Eduard-Mihai Burtescu-3/+3
2018-05-30rustc: turn mir::LocalDecl's visibility_source_info into a SourceScope.Eduard-Mihai Burtescu-3/+1
2018-05-30rustc: rename mir::LocalDecl's source_info to visibility_source_info.Eduard-Mihai Burtescu-2/+3
2018-05-30rustc: turn mir::LocalDecl's syntactic_scope into a SourceInfo.Eduard-Mihai Burtescu-0/+3
2018-05-30rustc: rename mir::VisibilityScope to mir::SourceScope.Eduard-Mihai Burtescu-5/+5
2018-05-17Rename trans to codegen everywhere.Irina Popa-8/+8
2018-05-01rustc: return impl Iterator from Terminator(Kind)::successors(_mut).Eduard-Mihai Burtescu-1/+1
2018-04-27Auto merge of #50102 - Zoxc:query-nomacro, r=michaelwoeristerbors-1/+1
Move query code outside macros and store query jobs separately from query results Based on https://github.com/rust-lang/rust/pull/50067 r? @michaelwoerister
2018-04-27Auto merge of #50097 - glandium:box_free, r=nikomatsakisbors-63/+2
Partial future-proofing for Box<T, A> In some ways, this is similar to @eddyb's PR #47043 that went stale, but doesn't cover everything. Notably, this still leaves Box internalized as a pointer in places, so practically speaking, only ZSTs can be practically added to the Box type with the changes here (the compiler ICEs otherwise). The Box type is not changed here, that's left for the future because I want to test that further first, but this puts things in place in a way that hopefully will make things easier.
2018-04-27Move query functions out from the define_maps! macroJohn Kåre Alsaker-1/+1
2018-04-26rustc_target: move in syntax::abi and flip dependency.Irina Popa-1/+1