summary refs log tree commit diff
path: root/src/librustc_codegen_ssa/mir/rvalue.rs
AgeCommit message (Collapse)AuthorLines
2020-05-30Make TLS accesses explicit in MIROliver Scherer-0/+8
2020-05-06Define UB in float-to-int casts to saturateMark Rousskov-1/+1
- Round to zero, and representable values cast directly. - `NaN` goes to 0 - Values beyond the limits of the type are saturated to the "nearest value" (essentially rounding to zero, in some sense) in the integral type, so e.g. `f32::INFINITY` would go to `{u,i}N::MAX.`
2020-04-22Don't use `*` for deref-coercionDylan MacKenzie-3/+3
2020-04-19Dogfood more or_patterns in the compilerJosh Stone-4/+5
2020-04-05Stop importing int/float modules in librustc_*Linus Färnstrand-2/+0
2020-04-02direct imports for langitem stuffMazdak Farrokhzad-1/+1
2020-04-02nix rustc_target::abi::* reexport in ty::layoutMazdak Farrokhzad-5/+6
2020-03-31Use Place directly in codegen_place_to_pointer, it's CopySantiago Pastorino-3/+3
2020-03-31Use Place directly in evaluate_array_len, it's CopySantiago Pastorino-2/+2
2020-03-30rustc -> rustc_middle part 3 (rustfmt)Mazdak Farrokhzad-1/+1
2020-03-30rustc -> rustc_middle part 2Mazdak Farrokhzad-5/+5
2020-03-23Evaluate repeat expression lengths as late as possibleOliver Scherer-0/+3
2020-03-21Fix ICE caused by truncating a negative ZST enum discriminantWesley Wiser-1/+6
2020-02-27don't use .into() to convert types into identical types.Matthias Krüger-1/+1
example: let s: String = format!("hello").into();
2020-01-28codegen_place and related functions can take PlaceRef by valueSantiago Pastorino-3/+3
2020-01-02Normalize `syntax::symbol` imports.Mazdak Farrokhzad-1/+1
2020-01-02Normalize `syntax::source_map` imports.Mazdak Farrokhzad-1/+1
2019-12-22Format the worldMark Rousskov-217/+211
2019-12-20Rollup merge of #64588 - matthewjasper:mir-address-of, r=oli-obkMazdak Farrokhzad-20/+38
Add a raw "address of" operator * Parse and feature gate `&raw [const | mut] expr` (feature gate name is `raw_address_of`) * Add `mir::Rvalue::AddressOf` * Use the new `Rvalue` for: * the new syntax * reference to pointer casts * drop shims for slices and arrays * Stop using `mir::Rvalue::Cast` with a reference as the operand * Correctly evaluate `mir::Rvalue::{Ref, AddressOf}` in constant propagation cc @Centril @RalfJung @oli-obk @eddyb cc #64490
2019-12-18Add Rvalue::AddressOf to MIRMatthew Jasper-20/+38
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-15Remove now-redundant range check on u128 -> f32 castsRobin Kruppe-36/+7
This code was added to avoid UB in LLVM 6 and earlier, but we no longer support those LLVM versions. Since https://reviews.llvm.org/D47807 (released in LLVM 7), uitofp does exactly what we need. Closes #51872
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