summary refs log tree commit diff
path: root/src/librustc_codegen_ssa/mir/rvalue.rs
AgeCommit message (Collapse)AuthorLines
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
2019-03-29rustc_target: factor out common fields of non-Single Variants.Eduard-Mihai Burtescu-2/+1
2019-03-03Auto merge of #58673 - matthewjasper:typeck-ptr-coercions, r=pnkfelixbors-2/+4
[NLL] Type check operations with pointer types It seems these were forgotten about. Moving to `Rvalue::AddressOf` simplifies the coercions from references, but I want this to be fixed as soon as possible. r? @pnkfelix
2019-03-01Put Local, Static and Promoted as one Base variant of PlaceSantiago Pastorino-1/+1
2019-02-23Type check coercions to pointer typesMatthew Jasper-2/+4
2019-02-09librustc_codegen_ssa => 2018Taiki Endo-5/+5
2018-12-25Remove licensesMark Rousskov-10/+0
2018-12-21Fix alignment for array indexingNikita Popov-1/+2
We need to reduce the alignment with the used offset. If the offset isn't known, we need to reduce with the element size to support arbitrary offsets.
2018-12-07Various minor/cosmetic improvements to codeAlexander Regueiro-2/+2
2018-11-29Move IntrinsicCallMethods::call_overflow_intrinsics to ↵bjorn3-1/+1
BuilderMethods::checked_binop
2018-11-29Don't use llvm intrinsic names in cg_ssabjorn3-80/+2
2018-11-22rustc_target: separate out an individual Align from AbiAndPrefAlign.Eduard-Mihai Burtescu-1/+1
2018-11-22rustc_target: rename abi::Align to AbiAndPrefAlign.Eduard-Mihai Burtescu-4/+4
2018-11-16[eddyb] rustc_codegen_ssa: rename `interfaces` to `traits`.Eduard-Mihai Burtescu-1/+1
2018-11-16All Builder methods now take &mut self instead of &selfDenis Merigoux-92/+97
2018-11-16Added some docs + start to &mut self builder methodsDenis Merigoux-3/+3
2018-11-16Great separation of librustc_codegen_llvm: librustc_codegen_ssa compilesDenis Merigoux-0/+996