summary refs log tree commit diff
path: root/src/librustc_codegen_ssa/mir/mod.rs
AgeCommit message (Collapse)AuthorLines
2019-10-31rustc_codegen_ssa: introduce MIR VarDebugInfo, but only for codegen.Eduard-Mihai Burtescu-0/+2
2019-10-31rustc_codegen_ssa: move debuginfo scopes into FunctionDebugContext.Eduard-Mihai Burtescu-8/+7
2019-10-31rustc_codegen_ssa: move all set_var_name calls to mir::debuginfo.Eduard-Mihai Burtescu-39/+5
2019-10-31rustc_codegen_ssa: move local variable debuginfo to mir::debuginfo.Eduard-Mihai Burtescu-233/+30
2019-10-31rustc_codegen_ssa: move debuginfo-related things to a new mir::debuginfo module.Eduard-Mihai Burtescu-61/+4
2019-10-13s/FuncId/Functionbjorn3-2/+2
2019-10-13Introduce FuncId backend typebjorn3-2/+2
2019-10-10Auto merge of #59546 - sfanxiang:interminable-ub, r=nagisabors-0/+2
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-04clean up GeneratorSubstscsmoe-1/+1
2019-10-04Rollup merge of #64817 - csmoe:closure, r=nikomatsakisMazdak Farrokhzad-1/+2
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-1/+1
2019-09-29remove indexed_vec re-export from rustc_data_structurescsmoe-1/+1
2019-09-29remove ClosureSubsts with SubstsRefcsmoe-1/+2
2019-09-29remove bit_set re-export from rustc_data_structurescsmoe-1/+1
2019-09-28rustc_codegen_ssa: remove redundant `va_list_ref` field from `FunctionCx`.Eduard-Mihai Burtescu-13/+1
2019-09-28rustc: rely on c_variadic == true instead of CVarArgs in HIR/Ty fn signatures.Eduard-Mihai Burtescu-28/+30
2019-09-28Generate llvm.sideeffect at function entry instead of callXiang Fan-0/+2
2019-09-25Rename `sty` to `kind`varkor-7/+7
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-11/+15
2019-09-06rustc_codegen_llvm: give names to non-alloca variable values.Eduard-Mihai Burtescu-8/+8
2019-08-29`new_sized` is mostly used without alignDante-Broggi-2/+2
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-15syntax_pos: Introduce a helper for checking whether a span comes from expansionVadim Petrochenkov-2/+2
2019-06-18Auto merge of #59625 - immunant:copy_variadics_typealias, r=eddybbors-22/+11
Refactor C FFI variadics to more closely match their C counterparts, and add Clone implementation We had to make some changes to expose `va_copy` and `va_end` directly to users (mainly for C2Rust, but not exclusively): - redefine the Rust variadic structures to more closely correspond to C: `VaList` now matches `va_list`, and `VaListImpl` matches `__va_list_tag` - add `Clone` for `VaListImpl` - add explicit `as_va_list()` conversion function from `VaListImpl` to `VaList` - add deref coercion from `VaList` to `VaListImpl` - add support for the `asmjs` target All these changes were needed for use cases like: ```Rust let mut ap2 = va_copy(ap); vprintf(fmt, ap2); va_end(&mut ap2); ```
2019-06-18Run `rustfmt --file-lines ...` for changes from previous commits.Eduard-Mihai Burtescu-5/+6
2019-06-18rustc: remove 'x: 'y bounds (except from comments/strings).Eduard-Mihai Burtescu-6/+6
2019-06-17Expose `VaListImpl` as the Rust equivalent of `__va_list_tag` and implement ↵Andrei Homescu-22/+11
Clone for it.
2019-06-05Add `walk_chain`.Nicholas Nethercote-8/+1
This combines multiple `HygieneData::with` calls on a hot path.
2019-06-02remove reexport of rustc::ty::InstanceMark Mansi-2/+1
2019-05-30Auto merge of #61253 - nnethercote:avoid-hygiene_data-lookups, r=petrochenkovbors-1/+1
Avoid `hygiene_data` lookups These commits mostly introduce compound operations that allow two close adjacent `hygiene_data` lookups to be combined. r? @petrochenkov
2019-05-29Introduce and use `SyntaxContext::outer_expn_info()`.Nicholas Nethercote-1/+1
It reduces two `hygiene_data` accesses to one on some hot paths.
2019-05-28Changes the type `mir::Mir` into `mir::Body`Claude-Alban RANÉLY-VERGÉ-DÉPRÉ-4/+4
The commit should have changed comments as well. At the time of writting, it passes the tidy and check tool. Revisions asked by eddyb : - Renamed of all the occurences of {visit/super}_mir - Renamed test structures `CachedMir` to `Cached` Fixing the missing import on `AggregateKind`
2019-05-22Simplify use of keyword symbolsVadim Petrochenkov-3/+3
2019-05-14removes `AbiMethods`Saleem Jaffer-2/+2
2019-05-03Split out debuginfo from type info in MIR GeneratorLayoutTyler Mandry-3/+5
2019-04-25Preserve visibility scopes in stored generator localsTyler Mandry-9/+17
Unfortunately, this didn't have quite the effect I was hoping for. Locals still appear visible at every point in the function, regardless of scopes. I suspect all the rewriting of the MIR we do for the generator transform makes these scopes less useful. I didn't observe any regressions in behavior, but it's possible that this change is wrong without additional changes to the MIR.
2019-04-25Support variantful generatorsTyler Mandry-10/+27
This allows generators to overlap fields using variants.
2019-04-25Give GeneratorLayout a list of fields for each variantTyler Mandry-2/+4
But don't really use it yet.
2019-04-23rustc: dissuade compiler developers from misusing upvar debuginfo.Eduard-Mihai Burtescu-5/+6
2019-04-23rustc_codegen_ssa: rename debuginfo_upvar_decls_ops_sequence to ↵Eduard-Mihai Burtescu-1/+1
debuginfo_upvar_ops_sequence.
2019-03-29Move get_param and set_value_namebjorn3-7/+7
2019-03-29[WIP] Make some debug info methods take &mut FunctionDebugContextbjorn3-9/+5
declare_local still takes &FunctionDebugContext, because of borrowck errors
2019-03-29Remove internal mutability from source_locations_enabledbjorn3-1/+1
2019-03-29Remove param_substs from FunctionCxbjorn3-9/+3
2019-03-29Use Builder instead of CodegenCx for OperandRef and LocalRefbjorn3-7/+7
2019-03-29Don't use c_uint in cg_ssabjorn3-7/+6
2019-03-09Auto merge of #59012 - pietroalbini:rollup, r=pietroalbinibors-0/+1
Rollup of 24 pull requests Successful merges: - #58080 (Add FreeBSD armv6 and armv7 targets) - #58204 (On return type `impl Trait` for block with no expr point at last semi) - #58269 (Add librustc and libsyntax to rust-src distribution.) - #58369 (Make the Entry API of HashMap<K, V> Sync and Send) - #58861 (Expand where negative supertrait specific error is shown) - #58877 (Suggest removal of `&` when borrowing macro and appropriate) - #58883 (Suggest appropriate code for unused field when destructuring pattern) - #58891 (Remove stray ` in the docs for the FromIterator implementation for Option) - #58893 (race condition in thread local storage example) - #58906 (Monomorphize generator field types for debuginfo) - #58911 (Regression test for #58435.) - #58912 (Regression test for #58813) - #58916 (Fix release note problems noticed after merging.) - #58918 (Regression test added for an async ICE.) - #58921 (Add an explicit test for issue #50582) - #58926 (Make the lifetime parameters of tcx consistent.) - #58931 (Elide invalid method receiver error when it contains TyErr) - #58940 (Remove JSBackend from config.toml) - #58950 (Add self to mailmap) - #58961 (On incorrect cfg literal/identifier, point at the right span) - #58963 (libstd: implement Error::source for io::Error) - #58970 (delay_span_bug in wfcheck's ty.lift_to_tcx unwrap) - #58984 (Teach `-Z treat-err-as-bug` to take a number of errors to emit) - #59007 (Add a test for invalid const arguments) Failed merges: - #58959 (Add release notes for PR #56243) r? @ghost
2019-03-08Rollup merge of #58906 - Nemo157:generator-state-debug-info, r=ZoxcPietro Albini-0/+1
Monomorphize generator field types for debuginfo Fixes #58888 r? @Zoxc
2019-03-07Fix segfaults in release build C-variadic fnsDan Robertson-7/+1
`va_start` and `va_end` must be called to initialize/cleanup the "spoofed" `VaList` in a Rust defined C-variadic function even if the `VaList` is not used.
2019-03-04Monomorphize generator field types for debuginfoWim Looman-0/+1