summary refs log tree commit diff
path: root/src/librustc_codegen_ssa
AgeCommit message (Collapse)AuthorLines
2019-12-14Ensure that we get a hard error on generic ZST constants if their body ↵Oliver Scherer-1/+4
causes an error during evaluation
2019-11-01Rollup merge of #66018 - pnkfelix:issue-64872-revert-64324, r=alexcrichtonTyler Mandry-15/+4
Revert PR 64324: dylibs export generics again (for now) As discussed on PR #65781, this is a targeted attempt to undo the main semantic change from PR #64324, by putting `dylib` back in the set of crate types that export generic symbols. The main reason to do this is that PR #64324 had unanticipated side-effects that caused bugs like #64872, and in the opinion of @alexcrichton and myself, the impact of #64872 is worse than #64319. In other words, it is better for us, in the short term, to reopen #64319 as currently unfixed for now than to introduce new bugs like #64872. Fix #64872 Reopen #64319
2019-11-01targeted revert of PR rust-lang/rust#64324 (just undo change to dylib ↵Felix S. Klock II-15/+4
generics export). Includes the anticipated fallout to run-make-fulldeps test suite from this change. (We need to reopen issue 64319 as part of landing this.)
2019-10-31rustc_codegen_ssa: introduce MIR VarDebugInfo, but only for codegen.Eduard-Mihai Burtescu-138/+186
2019-10-31rustc_codegen_ssa: hide address ops from the declare_local interface.Eduard-Mihai Burtescu-24/+23
2019-10-31rustc_codegen_ssa: move debuginfo scopes into FunctionDebugContext.Eduard-Mihai Burtescu-80/+38
2019-10-31rustc_codegen_ssa: change set_var_name back to taking a &str.Eduard-Mihai Burtescu-32/+8
2019-10-31rustc_codegen_ssa: move all set_var_name calls to mir::debuginfo.Eduard-Mihai Burtescu-87/+118
2019-10-31rustc_codegen_ssa: move local variable debuginfo to mir::debuginfo.Eduard-Mihai Burtescu-241/+227
2019-10-31rustc_codegen_ssa: move debuginfo-related things to a new mir::debuginfo module.Eduard-Mihai Burtescu-144/+152
2019-10-29Rollup merge of #65832 - tlively:emscripten-exception-handling, r=alexcrichtonTyler Mandry-2/+3
Re-enable Emscripten's exception handling support Passes LLVM codegen and Emscripten link-time flags for exception handling if and only if the panic strategy is `unwind`. Sets the default panic strategy for Emscripten targets to `unwind`. Re-enables tests that depend on unwinding support for Emscripten, including `should_panic` tests. r? @alexcrichton
2019-10-29Auto merge of #65435 - michaelwoerister:fix-issue-64153, r=alexcrichtonbors-19/+26
Fix #64153 This PR changes how the compiler detects if an object file from an upstream crate is a Rust object file or not. Instead of checking if the name starts with the crate name and ends with `.o` (which is not always the case, as described in #64153), it now just checks if the filename ends with `.rcgu.o`. This fixes #64153. However, ideally we'd clean up the code around filename generation some more. Then this check could be made more robust. r? @alexcrichton
2019-10-29Rollup merge of #65294 - varkor:lint-inline-prototype, r=matthewjasperMazdak Farrokhzad-1/+1
Lint ignored `#[inline]` on function prototypes Fixes https://github.com/rust-lang/rust/issues/51280. - Adds a `unused_attribute` lint for `#[inline]` on function prototypes. - As a consequence, foreign items, impl items and trait items now have their attributes checked, which could cause some code to no longer compile (it was previously erroneously ignored).
2019-10-28self-profiling: Record something more useful for crate metadata generation ↵Michael Woerister-2/+0
event. Before this commit, we had an event that would only track the compression step for proc-macros and Rust dylibs. After the commit we measure the time for acutally generating the crate metadata bytes.
2019-10-28Rollup merge of #65792 - Centril:split-syntax-2, r=petrochenkovMazdak Farrokhzad-4/+3
rustc, rustc_passes: reduce deps on rustc_expand Part of #65324. r? @petrochenkov
2019-10-27Always use consteval to codegen caller_location.Adam Perry-12/+20
2019-10-27Panicking infra uses &core::panic::Location.Adam Perry-48/+8
This allows us to remove `static_panic_msg` from the SSA<->LLVM boundary, along with its fat pointer representation for &str. Also changes the signature of PanicInfo::internal_contructor to avoid copying. Closes #65856.
2019-10-27Implement core::intrinsics::caller_location.Adam Perry-0/+20
Returns a `&core::panic::Location` corresponding to where it was called, also making `Location` a lang item.
2019-10-27rustc, rustc_passes: don't depend on syntax_expand.Mazdak Farrokhzad-4/+3
This is done by moving some data definitions to syntax::expand.
2019-10-26Rollup merge of #65772 - mark-i-m:final-readmes, r=nikomatsakisMazdak Farrokhzad-120/+2
Remove the last remaining READMEs cc https://github.com/rust-lang/rustc-guide/pull/481 closes #48478 r? @nikomatsakis
2019-10-25Update bitflagsvarkor-1/+1
2019-10-25Re-enable Emscripten's exception handling supportThomas Lively-2/+3
Passes LLVM codegen and Emscripten link-time flags for exception handling if and only if the panic strategy is `unwind`. Sets the default panic strategy for Emscripten targets to `unwind`. Re-enables tests that depend on unwinding support for Emscripten, including `should_panic` tests.
2019-10-25Rollup merge of #65315 - spastorino:intern-place-projection, r=oli-obkMazdak Farrokhzad-65/+40
Intern place projection This should sit on top of https://github.com/rust-lang/rust/pull/65197. After that one merged, I'm gonna rebase on top of it. The important commits are the last three and there's a bunch of code repetition that I'm going to remove but for that I need to refactor some things that probably need to be added before this PR. Anyway this work helps as is because we can run perf tests :). r? @oli-obk /cc @nikomatsakis
2019-10-24remove the last remaining READMEsMark Mansi-120/+2
2019-10-23Rollup merge of #65657 - nnethercote:rm-InternedString-properly, r=eddybMazdak Farrokhzad-5/+5
Remove `InternedString` This PR removes `InternedString` by converting all occurrences to `Symbol`. There are a handful of places that need to use the symbol chars instead of the symbol index, e.g. for stable sorting; local conversions `LocalInternedString` is used in those places. r? @eddyb
2019-10-23Rollup merge of #65695 - ↵Yuki Okushi-6/+6
michaelwoerister:fix-self-profiling-work-item-event-names, r=wesleywiser self-profiling: Remove module names from some event-ids in codegen backend. Event-IDs are not supposed to contain argument values. Event-IDs are the equivalent of function names. Proper support for parameters will be added to self-profiling down the line. This PR fixes an oversight from https://github.com/rust-lang/rust/pull/64840. r? @wesleywiser
2019-10-23Rollup merge of #65681 - sunfishcode:followup, r=CentrilYuki Okushi-13/+24
Code cleanups following up on #65576. This makes a few code cleanups to follow up on the review comments in https://github.com/rust-lang/rust/pull/65576. r? @Centril
2019-10-22Pattern match over PlaceRef rather than PlaceSantiago Pastorino-65/+40
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-22self-profiling: Remove module names from some event-ids in codegen backend.Michael Woerister-6/+6
2019-10-22Fix issue #64153 by checking for .rcgu.o suffix when trying to identify Rust ↵Michael Woerister-19/+26
generated object files.
2019-10-21Code cleanups following up on #65576.Dan Gohman-13/+24
This makes a few code cleanups to follow up on the review comments in https://github.com/rust-lang/rust/pull/65576.
2019-10-21Rename `ConstValue::Infer(InferConst::Canonical(..))` to `ConstValue::Bound(..)`varkor-0/+1
2019-10-21Use `Symbol` for codegen unit names.Nicholas Nethercote-4/+4
This is a straightforward replacement except for two places where we have to convert to `LocalInternedString` to get a stable sort.
2019-10-21Convert fields within `DefPathData` from `InternedString` to `Symbol`.Nicholas Nethercote-1/+1
It's a full conversion, except in `DefKey::compute_stable_hash()` where a `Symbol` now is converted to an `InternedString` before being hashed. This was necessary to avoid test failures.
2019-10-19Remove unreachable unit tuple compare binop codegenCaleb Behunin-8/+1
2019-10-19Rollup merge of #65448 - eddyb:codegen-box-less-special, r=oli-obkMazdak Farrokhzad-27/+19
rustc_codegen_ssa: remove some unnecessary Box special-casing. Could help simplify #60900. r? @nikomatsakis
2019-10-19Rollup merge of #65576 - sunfishcode:main-needs-argc-argv, r=alexcrichtonMazdak Farrokhzad-7/+18
Don't add `argc` and `argv` arguments to `main` on WASI. Add a target setting to allow targets to specify whether the generated `main` function should be passed `argc` and `argv` arguments. Set it to false on wasm32-wasi, since WASI's `args::args()` calls into the WASI APIs itself. This will allow the WASI toolchain to avoid linking and running command-line argument initialization code when the arguments aren't actually needed.
2019-10-17Don't add `argc` and `argv` arguments to `main` on WASI.Dan Gohman-7/+18
Add a target setting to allow targets to specify whether the generated `main` function should be passed `argc` and `argv` arguments. Set it to false on wasm32-wasi, since WASI's `args::args()` calls into the WASI APIs itself. This will allow the WASI toolchain to avoid linking and running command-line argument initialization code when the arguments aren't actually needed.
2019-10-17Rollup merge of #65465 - Centril:split-syntax-1, r=petrochenkovMazdak Farrokhzad-3/+4
Move syntax::ext to a syntax_expand and refactor some attribute logic Part of https://github.com/rust-lang/rust/pull/65324. r? @petrochenkov
2019-10-16Upgrade Emscripten targets to use upstream LLVM backendThomas Lively-5/+2
- Compatible with Emscripten 1.38.46-upstream or later upstream. - Refactors the Emscripten target spec to share code with other wasm targets. - Replaces the old incorrect wasm32 C call ABI with the correct one, preserving the old one as wasm32_bindgen_compat for wasm-bindgen compatibility. - Updates the varargs ABI used by Emscripten and deletes the old one. - Removes the obsolete wasm32-experimental-emscripten target. - Uses EMCC_CFLAGS on CI to avoid the timeout problems with #63649.
2019-10-16move syntax::ext to new crate syntax_expandMazdak Farrokhzad-3/+4
2019-10-15rustc_codegen_ssa: remove some unnecessary Box special-casing.Eduard-Mihai Burtescu-27/+19
2019-10-15Refactor: Rename `db` locals to `diag`Philipp Hansch-5/+5
https://github.com/rust-lang/rust/pull/64272 replaced `DiagnosticBuilder` with `Diagnostic` in some places. This commit just renames the DB variable from `db` to `diag` where it wasn't renamed.
2019-10-14Rollup merge of #65398 - estebank:capitalization-only, r=varkorTyler Mandry-1/+5
Bring attention to suggestions when the only difference is capitalization CC #65386.
2019-10-13Bring attention to suggestions when the only difference is capitalizationEsteban Küber-1/+5
2019-10-13Add top level provide/provide_extern to cg_ssa and cg_utilsbjorn3-0/+11
2019-10-13Remove MiscMethods::instancesbjorn3-15/+14
2019-10-13Inline functions from cg_ssa::callee and remove the modbjorn3-63/+24
Fixes #65271
2019-10-13s/FuncId/Functionbjorn3-12/+12
2019-10-13Move span_invalid_monomorphization_error from cg_llvm to cg_ssabjorn3-0/+40
The associated long diagnostic didn't get registered before