about summary refs log tree commit diff
path: root/src/librustc_codegen_ssa/mir/operand.rs
AgeCommit message (Collapse)AuthorLines
2020-08-30mv compiler to compiler/mark-471/+0
2020-05-08Simplify the `tcx.alloc_map` APIOliver Scherer-1/+1
2020-04-19Dogfood more or_patterns in the compilerJosh Stone-1/+1
2020-04-16mir/interpret: only use `ErrorHandled::Reported` for `ErrorReported`.Eduard-Mihai Burtescu-2/+5
2020-04-02nix rustc_target::abi::* reexport in ty::layoutMazdak Farrokhzad-7/+8
2020-03-30rustc -> rustc_middle part 2Mazdak Farrokhzad-4/+4
2020-03-27Rename TyLayout to TyAndLayout.Ana-Maria Mihalache-4/+4
2020-03-25make Size::from* methods generic in the integer type they acceptRalf Jung-1/+1
2020-03-04PlaceRef<'a, 'tcx> -> PlaceRef<'tcx>Santiago Pastorino-2/+2
2020-03-03Make PlaceRef lifetimes of codegen_place be both 'tcxSantiago Pastorino-2/+2
2020-02-27don't use .into() to convert types into identical types.Matthias Krüger-2/+1
example: let s: String = format!("hello").into();
2020-02-15Change `const_field` and `const_caller_location` to return `ConstValue` ↵Ben Lewis-9/+5
instead of `Const` as the type in the returned const isn't needed.
2020-02-15Change const eval to return `ConstValue`, instead of `Const` as the type ↵Ben Lewis-1/+1
inside it shouldn't be used.
2020-01-28Local field on PlaceRef and RootPlace is not a reference anymoreSantiago Pastorino-1/+1
2020-01-28codegen_place and related functions can take PlaceRef by valueSantiago Pastorino-3/+3
2020-01-10Remove PlaceBase enum and make Place base field be local: LocalSantiago Pastorino-33/+29
2020-01-10Remove Static from PlaceBaseSantiago Pastorino-32/+32
2019-12-22Format the worldMark Rousskov-109/+93
2019-12-05commentsRalf Jung-2/+3
2019-11-22Rollup merge of #66587 - matthewjasper:handle-static-as-const, r=oli-obkMazdak Farrokhzad-2/+1
Handle statics in MIR as const pointers This is the first PR towards the goal of removing `PlaceBase::Static`. In this PR: * Statics are lowered to dereferencing a const pointer. * The temporaries holding such pointers are tracked in MIR, for the most part this is only used for diagnostics. There are two exceptions: * The borrow checker has some checks for thread-locals that directly use this data. * Const checking will suppress "cannot dereference raw pointer" diagnostics for pointers to `static mut`/`extern static`. This is to maintain the current behaviour (12 tests fail otherwise). The following are left to future PRs (I think that @spastorino will be working on the first 3): * Applying the same treatments to promoted statics. * Removing `PlaceBase::Static`. * Replacing `PlaceBase` with `Local`. * Moving the ever growing collection of metadata that we have for diagnostics in MIR passes somewhere more appropriate. r? @oli-obk
2019-11-21Readjust constant evaluation for operandsSantiago Pastorino-2/+1
2019-11-21Aggregation of drive-by cosmetic changes.Alexander Regueiro-9/+9
2019-11-12Rename in librustc_codegen_ssa.Camille GILLOT-6/+6
2019-10-21Rename `ConstValue::Infer(InferConst::Canonical(..))` to `ConstValue::Bound(..)`varkor-0/+1
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-35/+33
2019-08-29`new_sized` is mostly used without alignDante-Broggi-1/+0
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-16Remove redundant `ty` fields from `mir::Constant` and ↵Eduard-Mihai Burtescu-1/+1
`hair::pattern::PatternRange`.
2019-08-02CTFE: simplify Value type by not checking for alignmentRalf Jung-2/+2
2019-07-22Place::as_place_ref is now Place::as_refSantiago Pastorino-1/+1
2019-07-20Avoid cloning Place in codegen_placeSantiago Pastorino-10/+10
2019-06-19Change `ByRef` to a struct variant to clarify its fields via namesOliver Scherer-1/+1
2019-06-19Remove the `AllocId` from `ByRef` valuesOliver Scherer-2/+2
`ByRef` const values have no identity beyond their value, we should not treat them as having identity. The `AllocId` often differed between equal constants, because of the way that the miri-engine evaluates constants.
2019-06-19Weave the alignment through `ByRef`Oliver Scherer-2/+2
2019-06-18rustc: remove 'x: 'y bounds (except from comments/strings).Eduard-Mihai Burtescu-3/+3
2019-06-01Auto merge of #61350 - RalfJung:alloc, r=oli-obkbors-1/+1
light refactoring of global AllocMap * rename AllocKind -> GlobalAlloc. This stores the allocation itself, not just its kind. * rename the methods that allocate stuff to have consistent names. Cc @oli-obk
2019-05-30light refactoring of global AllocMapRalf Jung-1/+1
* rename AllocKind -> GlobalAlloc. This stores the allocation itself, not just its kind. * rename the methods that allocate stuff to have consistent names.
2019-05-30Make the `type_name` intrinsic's output deterministicOliver Scherer-6/+6
2019-05-25Make `ConstValue::Slice` solely take `[u8]` and `str`Oliver Scherer-4/+8
2019-05-25Don't use `ty::Const` without immediately interningOliver Scherer-1/+1
2019-05-22Make maybe_codegen_consume_direct iterate instead of doing recursionSantiago Pastorino-34/+36
2019-05-01Add `ConstValue::Placeholder`varkor-0/+1
2019-03-29Use Builder instead of CodegenCx for OperandRef and LocalRefbjorn3-15/+15
2019-03-29`eval_mir_constant` doesn't need a builder parambjorn3-1/+1
2019-03-16Revert the `LazyConst` PROliver Scherer-0/+1
2019-03-05Use non_erasable_generics for codegenvarkor-0/+2
Co-Authored-By: Gabriel Smith <yodaldevoid@users.noreply.github.com>
2019-03-01Put Local, Static and Promoted as one Base variant of PlaceSantiago Pastorino-1/+1
2019-02-25librustc_codegen_ssa: deny(elided_lifetimes_in_paths)Mazdak Farrokhzad-1/+1
2019-02-16Reuse the `Pointer` type instead of passing reassembling it at many use sitesOliver Scherer-2/+2