about summary refs log tree commit diff
path: root/src/librustc_codegen_ssa/mir/place.rs
AgeCommit message (Collapse)AuthorLines
2020-08-30mv compiler to compiler/mark-502/+0
2020-08-08Emit == null instead of <= nullNikita Popov-8/+7
When the niche maximum is zero, emit a "== zero" check instead of a "<= zero" check. In particular, this avoid the awkward case of "<= null". While LLVM does canonicalize this to "!= null", this appently doesn't happen for constant expressions, leading to the issue in #74425. While that can be addressed on the LLVM side, it still seems prudent to emit sensible IR here, because this will allow null checks to be optimized earlier in the pipeline. Fixes #74425.
2020-05-30tag/niche terminology cleanupRalf Jung-22/+22
2020-05-23take mir::PlaceElem by valueBastian Kauschke-7/+7
2020-04-22Don't use `*` for deref-coercionDylan MacKenzie-1/+1
2020-04-02nix rustc_target::abi::* reexport in ty::layoutMazdak Farrokhzad-20/+14
2020-03-31rustc_target::abi: rename FieldPlacement to FieldsShape.Ana-Maria Mihalache-1/+1
2020-03-30rustc -> rustc_middle part 2Mazdak Farrokhzad-4/+4
2020-03-27Rename TyLayout to TyAndLayout.Ana-Maria Mihalache-6/+10
2020-03-04PlaceRef<'a, 'tcx> -> PlaceRef<'tcx>Santiago Pastorino-2/+2
2020-03-03Make PlaceRef lifetimes of monomorphized_place_ty be both 'tcxSantiago Pastorino-1/+1
2020-03-03Make PlaceRef lifetimes of codegen_place be both 'tcxSantiago Pastorino-1/+1
2020-01-28Place::ty_from takes local by valueSantiago Pastorino-1/+1
2020-01-28Local field on PlaceRef and RootPlace is not a reference anymoreSantiago Pastorino-2/+2
2020-01-28codegen_place and related functions can take PlaceRef by valueSantiago Pastorino-5/+5
2020-01-10Remove PlaceBase enum and make Place base field be local: LocalSantiago Pastorino-17/+15
2020-01-10Remove Static from PlaceBaseSantiago Pastorino-19/+0
2020-01-10Remove StaticKindSantiago Pastorino-6/+1
2020-01-10Remove StaticKind::PromotedSantiago Pastorino-34/+1
2019-12-24x.py fmt after previous deignoreMark Rousskov-124/+85
2019-12-22Rollup merge of #66877 - skinny121:const-eval-entry-points, r=oli-obkMazdak Farrokhzad-6/+1
Add simpler entry points to const eval for common usages. I found the `tcx.const_eval` API to be complex/awkward to work with, because of the inherent complexity from all of the different situations it is called from. Though it mainly used in one of the following ways: - Evaluates the value of a constant without any substitutions, e.g. evaluating a static, discriminant, etc. - Evaluates the value of a resolved instance of a constant. this happens when evaluating unevaluated constants or normalising trait constants. - Evaluates a promoted constant. This PR adds three new functions `const_eval_mono`, `const_eval_resolve`, and `const_eval_promoted` to `TyCtxt`, which each cater to one of the three ways `tcx.const_eval` is normally used.
2019-12-22Add simpler entry points to const eval for common usages.Ben Lewis-6/+1
2019-12-18Add Rvalue::AddressOf to MIRMatthew Jasper-1/+1
This operator creates a raw pointer to a Place directly, without first creating a reference. See RFC #2582 for motivation. The Rvalue is currently unused.
2019-12-09Make const index and subslice array projections more usefulMatthew Jasper-1/+2
* `min_length` is now exact for const index elements. * const index elements are always from the start. * make array `Subslice` `PlaceElems` count both `from` and `to` from the start.
2019-12-06use abort instead of unreachableRalf Jung-1/+3
2019-12-05commentsRalf Jung-0/+2
2019-12-05codegen: mark invalid SetDiscriminant unreachableRalf Jung-2/+3
2019-12-03rustc: expose the mir::Body reference lifetime from mir::ReadOnlyBodyCache ↵Eduard-Mihai Burtescu-1/+1
(#64736 fallout).
2019-12-02Remove HasLocalDecls impl from BodyCache's, properly reborrow to Body, ↵Paul Daniel Faria-1/+1
rename all body_cache back to body
2019-12-02Remove BodyCache.body and rely on Deref as much as possible for ↵Paul Daniel Faria-2/+3
ReadOnlyBodyCache
2019-12-02Fix tidy errorsPaul Daniel Faria-1/+5
2019-12-02Simplify BodyCache impl and fix all remaining type errors in librustc_mir ↵Paul Daniel Faria-1/+1
(lifetime errors still exist)
2019-12-02Account for new maybe_sideeffect helper that requires predecessorsPaul Daniel Faria-1/+1
2019-12-02Revert back to using FunctionCx's BodyPaul Daniel Faria-7/+6
2019-12-02Add Body back as field of FunctionCx, but under a different lifetimePaul Daniel Faria-1/+1
2019-12-02Remove Body from FunctionCx, pass it along during librustc_codegen_ssaPaul Daniel Faria-6/+7
2019-12-02Simplify Cache wrapper to single type, impl Deref on it, fix all compilation ↵Paul Daniel Faria-1/+1
errors in librustc_codegen_ssa
2019-11-21Aggregation of drive-by cosmetic changes.Alexander Regueiro-12/+11
2019-11-12Fix tidy.Camille GILLOT-1/+3
2019-11-12Rename in librustc_codegen_ssa.Camille GILLOT-1/+1
2019-10-31rustc_codegen_ssa: move local variable debuginfo to mir::debuginfo.Eduard-Mihai Burtescu-0/+4
2019-10-13Remove is_const_integral method from ConstMethodsbjorn3-2/+2
2019-09-25Rename `sty` to `kind`varkor-1/+1
2019-09-14Rollup merge of #64435 - eddyb:arguments-against-arg, r=rkruppeMazdak Farrokhzad-6/+2
codegen: use "_N" (like for other locals) instead of "argN", for argument names. Based on #64408 (second commit is new), fixing something I mentioned in #64408 (which turned to be an immediate blocker for unifying relevant codepaths). Closes #64408 (by containing it). r? @rkruppe
2019-09-12codegen: be more explicit about setting giving names to allocas.Eduard-Mihai Burtescu-6/+2
2019-09-09Use slice patterns to match projection baseSantiago Pastorino-6/+2
2019-09-09Convert Place's projection to a boxed sliceSantiago Pastorino-17/+18
2019-08-29`new_sized` is mostly used without alignDante-Broggi-2/+15
so rename it `new_sized_aligned`. 6/11 use `align` = `layout.align.abi`. `from_const_alloc` uses `alloc.align`, but that is `assert_eq!` to `layout.align.abi`. only 4/11 use something interesting for `align`.
2019-08-29`new_thin_place` is only used with `align` = `layout.align.abi`Dante-Broggi-3/+2
and is not `pub`.
2019-08-22Handle statics in `Subst::subst()` by implementing `TypeFoldable`Wesley Wiser-9/+2