about summary refs log tree commit diff
path: root/src/librustc_codegen_ssa/mir
AgeCommit message (Collapse)AuthorLines
2019-02-27Refactor FunctionCx::codgen_terminatorDan Robertson-671/+771
- Move closures defined in codegen_terminator into a separate helper structure and implementation. - Create helper functions for each of the complex match arms on the terminators kind in codegen_terminator.
2019-02-27Support defining C compatible variadic functionsDan Robertson-10/+104
Add support for defining C compatible variadic functions in unsafe rust with extern "C".
2019-02-26replace &'tcx Substs with SubstsRefcsmoe-2/+2
2019-02-25librustc_codegen_ssa: deny(elided_lifetimes_in_paths)Mazdak Farrokhzad-1/+1
2019-02-23Type check coercions to pointer typesMatthew Jasper-2/+4
2019-02-23Add debug-info to access variables from generator stateWim Looman-4/+31
2019-02-16Reuse the `Pointer` type instead of passing reassembling it at many use sitesOliver Scherer-4/+4
2019-02-12Auto merge of #58341 - alexreg:cosmetic-2-doc-comments, r=steveklabnikbors-7/+7
Cosmetic improvements to doc comments This has been factored out from https://github.com/rust-lang/rust/pull/58036 to only include changes to documentation comments (throughout the rustc codebase). r? @steveklabnik Once you're happy with this, maybe we could get it through with r=1, so it doesn't constantly get invalidated? (I'm not sure this will be an issue, but just in case...) Anyway, thanks for your advice so far!
2019-02-10rustc: doc commentsAlexander Regueiro-7/+7
2019-02-09librustc_codegen_ssa => 2018Taiki Endo-25/+25
2019-02-05Do not ICE in codegen given a extern_type staticDan Robertson-1/+18
The layout of a extern_type static is unsized, but may pass the Well-Formed check in typeck. As a result, we cannot assume that a static is sized when generating the `Place` for an r-value.
2019-01-28Auto merge of #55704 - Nemo157:pinned-generators, r=Zoxcbors-0/+7
Use pinning for generators to make trait safe I'm unsure whether there needs to be any changes to the actual generator transform. Tests are passing so the fact that `Pin<&mut T>` is fundamentally the same as `&mut T` seems to allow it to still work, but maybe there's something subtle here that could go wrong. This is specified in [RFC 2349 § Immovable generators](https://github.com/rust-lang/rfcs/blob/master/text/2349-pin.md#immovable-generators) (although, since that RFC it has become safe to create an immovable generator, and instead it's unsafe to resume any generator; with these changes both are now safe and instead the unsafety is moved to creating a `Pin<&mut [static generator]>` which there are safe APIs for). CC #43122
2019-01-27Update generator upvar debug infoWim Looman-0/+7
2019-01-27`ConstValue::ScalarPair` only needs to represent slicesOliver Scherer-8/+4
2019-01-22Get rid of the fake stack frameOliver Scherer-1/+0
2019-01-05Auto merge of #57145 - RalfJung:panic-if-uninhabited, r=alexcrichtonbors-46/+50
panic when calling MaybeUninhabited::into_inner on uninhabited type I do this by adding an internal-only intrinsic `panic_if_uninhabited`. I have no idea what I am doing here, just mindlessly copying code around, so please review carefully!
2019-01-01`<&'tcx ty::Const as Deref>::deref`Oliver Scherer-4/+4
2019-01-01Add `unwrap_usize` to `LazyConst`, tooOliver Scherer-2/+2
2019-01-01Move the `Unevaluated` constant arm upwards in the type structureOliver Scherer-8/+7
2018-12-27use a better way to get at the type parameterRalf Jung-6/+1
2018-12-27panic when calling MaybeUninhabited::into_inner on uninhabited typeRalf Jung-46/+55
2018-12-25Remove licensesMark Rousskov-80/+0
2018-12-21Fix alignment for array indexingNikita Popov-3/+13
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-18treat ref-to-raw cast like a reborrow: do a special kind of retagRalf Jung-1/+0
2018-12-11Remove env_alloca hackNikita Popov-24/+2
This is no longer necessary for LLVM >= 6.
2018-12-07Various minor/cosmetic improvements to codeAlexander Regueiro-9/+9
2018-11-29Move get_static from CodegenCx to Builderbjorn3-1/+1
2018-11-29Use implicit deref instead of BuilderMethods::cx()bjorn3-79/+79
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-89/+6
2018-11-28Fix alignment of stores to scalar pairNikita Popov-5/+15
The alignment for the second element of a scalar pair is not the same as for the first element. Make sure it is computed correctly based on the element size.
2018-11-25Auto merge of #55959 - matthewjasper:remove-end-region, r=nikomatsakisbors-1/+0
Cleanup from lexical MIR borrowck removal Lexical MIR borrowck was removed months ago now, and `EndRegion`s are no longer used for MIRI verification. * Remove `rustc::mir::StatementKind::EndRegion` and the `-Zemit_end_regions` flag * Use `RegionVid` instead of `Region` in BorrowSet * Rewrite drop generation to create fewer goto terminators. r? @nikomatsakis
2018-11-24Rollup merge of #56097 - ogoffart:union-abi, r=eddybkennytm-3/+14
Fix invalid bitcast taking bool out of a union represented as a scalar As reported in https://github.com/rust-lang/rust/pull/54668#issuecomment-440186476
2018-11-22rustc_target: avoid using AbiAndPrefAlign where possible.Eduard-Mihai Burtescu-33/+33
2018-11-22rustc_target: separate out an individual Align from AbiAndPrefAlign.Eduard-Mihai Burtescu-11/+11
2018-11-22rustc_target: rename abi::Align to AbiAndPrefAlign.Eduard-Mihai Burtescu-14/+13
2018-11-20Add comments and rename a local variableOlivier Goffart-5/+8
2018-11-20Fix invalid bitcast taking bool out of a union represented as a scalarOlivier Goffart-3/+11
As reported in https://github.com/rust-lang/rust/pull/54668#issuecomment-440186476
2018-11-18Remove mir::StatementKind::EndRegionMatthew Jasper-1/+0
Since lexical MIR borrow check is gone, and validation no longer uses these, they can be removed.
2018-11-16[eddyb] rustc_codegen_ssa: rename `interfaces` to `traits`.Eduard-Mihai Burtescu-9/+9
2018-11-16[eddyb] rustc_codegen_ssa: handle LLVM unsafety correctly.Eduard-Mihai Burtescu-1/+3
2018-11-16All Builder methods now take &mut self instead of &selfDenis Merigoux-209/+231
2018-11-16Added some docs + start to &mut self builder methodsDenis Merigoux-25/+25
2018-11-16Great separation of librustc_codegen_llvm: librustc_codegen_ssa compilesDenis Merigoux-0/+4351