about summary refs log tree commit diff
path: root/src/librustc_codegen_ssa/mir
AgeCommit message (Collapse)AuthorLines
2019-10-13Remove MiscMethods::instancesbjorn3-7/+7
2019-10-13Inline functions from cg_ssa::callee and remove the modbjorn3-2/+9
Fixes #65271
2019-10-13s/FuncId/Functionbjorn3-2/+2
2019-10-13Remove is_const_integral method from ConstMethodsbjorn3-3/+3
2019-10-13Introduce FuncId backend typebjorn3-2/+2
2019-10-13Auto merge of #65182 - anp:reify-shim, r=eddybbors-1/+1
Add `Instance::resolve_for_fn_ptr` (RFC 2091 #2/N) Supercedes: https://github.com/rust-lang/rust/pull/65082 Depends on: https://github.com/rust-lang/rust/pull/65037 Tracking issue: https://github.com/rust-lang/rust/issues/47809 [RFC text](https://github.com/rust-lang/rfcs/blob/master/text/2091-inline-semantic.md) steps taken: * [x] add a `ReifyShim` that is similar to `VirtualShim` in behavior (see #54183) * [x] add `ty::Instance::resolve_for_fn_ptr` (leave `ty::Instance::resolve_vtable` alone), migrate appropriate callers * [x] `resolve_for_fn_ptr` returns the shim if calling a `#[track_caller]` function
2019-10-10Auto merge of #59546 - sfanxiang:interminable-ub, r=nagisabors-1/+42
Add llvm.sideeffect to potential infinite loops and recursions LLVM assumes that a thread will eventually cause side effect. This is not true in Rust if a loop or recursion does nothing in its body, causing undefined behavior even in common cases like `loop {}`. Inserting llvm.sideeffect fixes the undefined behavior. As a micro-optimization, only insert llvm.sideeffect when jumping back in blocks or calling a function. A patch for LLVM is expected to allow empty non-terminate code by default and fix this issue from LLVM side. https://github.com/rust-lang/rust/issues/28728 **UPDATE:** [Mentoring instructions here](https://github.com/rust-lang/rust/pull/59546#issuecomment-515072429) to unstall this PR
2019-10-09Reifying callers of Instance::resolve use resolve_for_fn_ptr.Adam Perry-1/+1
2019-10-04clean up GeneratorSubstscsmoe-1/+1
2019-10-04Rollup merge of #64817 - csmoe:closure, r=nikomatsakisMazdak Farrokhzad-2/+6
Replace ClosureSubsts with SubstsRef Addresses https://github.com/rust-lang/rust/issues/42340 part 3 https://github.com/rust-lang/rust/pull/59312 might benefit from this clean up. r? @nikomatsakis
2019-10-03generate ClosureSubsts from SubstsRefcsmoe-3/+4
2019-09-29remove indexed_vec re-export from rustc_data_structurescsmoe-4/+4
2019-09-29remove ClosureSubsts with SubstsRefcsmoe-2/+5
2019-09-29remove bit_set re-export from rustc_data_structurescsmoe-2/+2
2019-09-28rustc_codegen_ssa: remove redundant `va_list_ref` field from `FunctionCx`.Eduard-Mihai Burtescu-18/+8
2019-09-28rustc: rely on c_variadic == true instead of CVarArgs in HIR/Ty fn signatures.Eduard-Mihai Burtescu-57/+33
2019-09-28Generate llvm.sideeffect at function entry instead of callXiang Fan-5/+9
2019-09-28Gate llvm.sideeffect under -Z insert-sideeffectXiang Fan-7/+9
2019-09-28Add llvm.sideeffect to potential infinite loops and recursionsXiang Fan-1/+36
LLVM assumes that a thread will eventually cause side effect. This is not true in Rust if a loop or recursion does nothing in its body, causing undefined behavior even in common cases like `loop {}`. Inserting llvm.sideeffect fixes the undefined behavior. As a micro-optimization, only insert llvm.sideeffect when jumping back in blocks or calling a function. A patch for LLVM is expected to allow empty non-terminate code by default and fix this issue from LLVM side. https://github.com/rust-lang/rust/issues/28728
2019-09-25Rename `sty` to `kind`varkor-15/+15
2019-09-17Get rid of special const intrinsic query in favour of `const_eval`Oliver Scherer-2/+1
2019-09-14Rollup merge of #64435 - eddyb:arguments-against-arg, r=rkruppeMazdak Farrokhzad-29/+30
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-13codegen: use "_N" (like for other locals) instead of "argN", for argument names.Eduard-Mihai Burtescu-1/+2
2019-09-12codegen: be more explicit about setting giving names to allocas.Eduard-Mihai Burtescu-28/+28
2019-09-11Make Place Boxed on Statement to reduce size from 64 bytes to 32 bytesSantiago Pastorino-6/+6
2019-09-09Use slice patterns to match projection baseSantiago Pastorino-10/+3
2019-09-09Convert Place's projection to a boxed sliceSantiago Pastorino-72/+71
2019-09-06rustc_codegen_llvm: give names to non-alloca variable values.Eduard-Mihai Burtescu-9/+23
2019-09-05Rollup merge of #64003 - Dante-Broggi:place-align-in-layout, r=matthewjasperMazdak Farrokhzad-11/+22
place: Passing `align` = `layout.align.abi`, when also passing `layout` Of the calls changed: 7/12 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-09-04Remove `LocalInternedString` uses from `librustc_codegen_llvm`.Nicholas Nethercote-6/+5
2019-08-29`new_sized` is mostly used without alignDante-Broggi-8/+20
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-29`new_thin_place` is only used with `align` = `layout.align.abi`Dante-Broggi-3/+2
and is not `pub`.
2019-08-22Handle statics in `Subst::subst()` by implementing `TypeFoldable`Wesley Wiser-9/+2
2019-08-22Fix tidyWesley Wiser-1/+0
2019-08-22Move def_id out add substsrefWesley Wiser-7/+20
2019-08-17Remove SyntaxContext from {ast, hir}::{GlobalAsm, InlineAsm}Matthew Jasper-1/+6
We now store it in the `Span` of the expression or item.
2019-08-16Remove redundant `ty` fields from `mir::Constant` and ↵Eduard-Mihai Burtescu-3/+3
`hair::pattern::PatternRange`.
2019-08-15syntax_pos: Introduce a helper for checking whether a span comes from expansionVadim Petrochenkov-2/+2
2019-08-11Copy ty::Instance instead of passing by referenceMark Rousskov-3/+3
ty::Instance is small and Copy, we should not be adding additional indirection.
2019-08-07Auto merge of #63152 - estebank:big-array, r=oli-obkbors-13/+30
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-2/+2
2019-08-05Don't abort on unevaluated constants without at least tryting to eval themOliver Scherer-2/+2
2019-08-04tweak output and testsEsteban Küber-8/+19
2019-08-04review comments: clean upEsteban Küber-10/+5
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-5/+17
2019-08-02CTFE: simplify Value type by not checking for alignmentRalf Jung-4/+4
2019-07-29use PanicInfo and UnsupportedOpInfoSaleem Jaffer-3/+3
2019-07-24fix unused importRalf Jung-1/+1
2019-07-24use PanicMessage type for MIR assertion errorsRalf Jung-5/+5