summary refs log tree commit diff
path: root/src/librustc_codegen_ssa/mir/rvalue.rs
AgeCommit message (Collapse)AuthorLines
2019-12-03rustc: expose the mir::Body reference lifetime from mir::ReadOnlyBodyCache ↵Eduard-Mihai Burtescu-3/+3
(#64736 fallout).
2019-12-02Remove HasLocalDecls impl from BodyCache's, properly reborrow to Body, ↵Paul Daniel Faria-3/+3
rename all body_cache back to body
2019-12-02Remove BodyCache.body and rely on Deref as much as possible for ↵Paul Daniel Faria-3/+3
ReadOnlyBodyCache
2019-12-02Undo minor changes that weren't needed, fix one lifetime typoPaul Daniel Faria-5/+1
2019-12-02Simplify BodyCache impl and fix all remaining type errors in librustc_mir ↵Paul Daniel Faria-2/+2
(lifetime errors still exist)
2019-12-02Account for new maybe_sideeffect helper that requires predecessorsPaul Daniel Faria-3/+3
2019-12-02Revert back to using FunctionCx's BodyPaul Daniel Faria-29/+24
2019-12-02Add Body back as field of FunctionCx, but under a different lifetimePaul Daniel Faria-2/+2
2019-12-02Remove Body from FunctionCx, pass it along during librustc_codegen_ssaPaul Daniel Faria-25/+34
2019-12-02Simplify Cache wrapper to single type, impl Deref on it, fix all compilation ↵Paul Daniel Faria-3/+3
errors in librustc_codegen_ssa
2019-11-21Aggregation of drive-by cosmetic changes.Alexander Regueiro-28/+27
2019-10-25Don't cast directly from `&[T; N]` to `*const T`Matthew Jasper-0/+1
Instead coerce to `*const [T; N]` and then cast.
2019-10-22Pattern match over PlaceRef rather than PlaceSantiago Pastorino-4/+1
This prepares the code base for when projection is interned. Place's projection field is going to be `&List<PlaceElem<'tcx>>` so we won't be able to pattern match against it.
2019-10-19Remove unreachable unit tuple compare binop codegenCaleb Behunin-8/+1
2019-10-13Remove MiscMethods::instancesbjorn3-3/+3
2019-10-13Inline functions from cg_ssa::callee and remove the modbjorn3-2/+9
Fixes #65271
2019-10-13Remove is_const_integral method from ConstMethodsbjorn3-1/+1
2019-10-09Reifying callers of Instance::resolve use resolve_for_fn_ptr.Adam Perry-1/+1
2019-10-03generate ClosureSubsts from SubstsRefcsmoe-2/+3
2019-09-29remove ClosureSubsts with SubstsRefcsmoe-1/+3
2019-09-25Rename `sty` to `kind`varkor-3/+3
2019-09-14Rollup merge of #64435 - eddyb:arguments-against-arg, r=rkruppeMazdak Farrokhzad-1/+1
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-1/+1
2019-09-09Convert Place's projection to a boxed sliceSantiago Pastorino-1/+1
2019-08-29`new_sized` is mostly used without alignDante-Broggi-1/+1
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-07Auto merge of #63152 - estebank:big-array, r=oli-obkbors-4/+9
Always error on `SizeOverflow` during mir evaluation Fix #55878, fix #25116. r? @oli-obk
2019-08-05Fiddle param env through to `try_eval_bits` in most placesOliver Scherer-1/+1
2019-08-05Don't abort on unevaluated constants without at least tryting to eval themOliver Scherer-1/+1
2019-08-04review comments: clean upEsteban Küber-4/+4
2019-08-03Simplify change to layout_ofEsteban Küber-1/+0
2019-08-03Point to local place span on "type too big" errorEsteban Küber-4/+10
2019-07-22Place::as_place_ref is now Place::as_refSantiago Pastorino-3/+3
2019-07-20Remove explicit return from last line of fnSantiago Pastorino-1/+1
2019-07-20Avoid cloning Place in codegen_placeSantiago Pastorino-3/+3
2019-07-20Migrate from Place enum to Place structSantiago Pastorino-1/+4
2019-06-18rustc: remove 'x: 'y bounds (except from comments/strings).Eduard-Mihai Burtescu-4/+4
2019-06-11is_fp and is_floating_point do the same thing, remove the formerRalf Jung-2/+2
also consistently mark all these is_* methods for inlining
2019-06-02remove unneeded depsMark Mansi-1/+0
2019-06-02deduplicate ty::Instance constructorsMark Mansi-2/+2
2019-05-13Pass a `Symbol` to `check_name`, `emit_feature_err`, and related functions.Nicholas Nethercote-3/+3
2019-05-04Auto merge of #59897 - tmandry:variantful-generators, r=eddybbors-6/+5
Multi-variant layouts for generators This allows generators to overlap fields using variants, but doesn't do any such overlapping yet. It creates one variant for every state of the generator (unresumed, returned, panicked, plus one for every yield), and puts every stored local in each of the yield-point variants. Required for optimizing generator layouts (#52924). There was quite a lot of refactoring needed for this change. I've done my best in later commits to eliminate assumptions in the code that only certain kinds of types are multi-variant, and to centralize knowledge of the inner mechanics of generators in as few places as possible. This change also emits debuginfo about the fields contained in each variant, as well as preserving debuginfo about stored locals while running in the generator. Also, fixes #59972. Future work: - Use this change for an optimization pass that actually overlaps locals within the generator struct (#52924) - In the type layout fields, don't include locals that are uninitialized for a particular variant, so miri and UB sanitizers can check our memory (see https://github.com/rust-lang/rust/issues/59972#issuecomment-483058172) - Preserve debuginfo scopes across generator yield points
2019-04-25Update existing usagesvarkor-1/+1
2019-04-25Generalize discriminant info calls for generators and ADTsTyler Mandry-6/+5
2019-04-15basic refactor. Adding PointerCast enumSaleem Jaffer-8/+8
2019-03-31Rollup merge of #59580 - taiki-e:coerce-closure, r=oli-obkMazdak Farrokhzad-1/+1
Allow closure to unsafe fn coercion Closes #57883
2019-03-31Rollup merge of #59519 - eddyb:layout-variants-refactor, r=oli-obkMazdak Farrokhzad-2/+1
rustc_target: factor out common fields of non-Single Variants. @tmandry and I were discussing ways to generalize the current variants/discriminant layout to allow more fields in the "`enum`" (or another multi-variant types, such as potentially generator state, in the future), shared by all variants, than just the tag/niche discriminant. This refactor should make it easier to extend multi-variant layouts, as nothing is duplicating anymore between "tagged enums" and "niche-filling enums". r? @oli-obk
2019-04-01Allow closure to unsafe fn coercionTaiki Endo-1/+1
2019-03-30Remove redundant importsFabian Drinck-1/+0
2019-03-29Remove type_variadic_func and typ_array from cg_ssabjorn3-25/+4
2019-03-29Use Builder instead of CodegenCx for OperandRef and LocalRefbjorn3-2/+5