about summary refs log tree commit diff
path: root/src/librustc_codegen_ssa
AgeCommit message (Collapse)AuthorLines
2020-01-10Rollup merge of #67975 - EmbarkStudios:export-statics-wasm, r=alexcrichtonYuki Okushi-1/+1
Export public scalar statics in wasm Fixes #67453 I am not sure which export level statics should get when exporting them in wasm. This small change fixes the issue that I had, but this might not be the correct way to implement this.
2020-01-09Link sanitizer runtimes instead of injecting crate dependenciesTomasz Miąsko-47/+42
2020-01-09Remove sanitizer_runtime attributeTomasz Miąsko-5/+0
2020-01-09Change -Z time event naming scheme and make them generic activitiesJohn Kåre Alsaker-8/+8
2020-01-08Remove `-Z continue-parse-after-error`Vadim Petrochenkov-1/+0
2020-01-08- remove syntax::{span_warn!, span_err!, span_fatal!. struct_err!}Mazdak Farrokhzad-7/+9
- remove syntax::{help!, span_help!, span_note!} - remove unused syntax::{struct_span_fatal, struct_span_err_or_warn!, span_err_or_warn!} - lintify check_for_bindings_named_same_as_variants + conflicting_repr_hints - inline syntax::{struct_span_warn!, diagnostic_used!} - stringify_error_code! -> error_code! & use it more. - find_plugin_registrar: de-fatalize an error - de-fatalize metadata errors - move type_error_struct! to rustc_typeck - struct_span_err! -> rustc_errors
2020-01-07Always export static variables as SymbolExportLevel::C in wasmmaik-7/+2
2020-01-07Export scalar statics in wasmmaik-1/+6
2020-01-05Remove rustc_hir reexports in rustc::hir.Mazdak Farrokhzad-19/+21
2020-01-05Use self profile infrastructure for -Z time and -Z time-passesJohn Kåre Alsaker-45/+27
2020-01-04DefId{Map,Set} -> rustc::hir::def_idMazdak Farrokhzad-2/+1
2020-01-04canonicalize FxHash{Map,Set} importsMazdak Farrokhzad-4/+5
2020-01-04extract rustc::middle::codegen_fn_attrsMazdak Farrokhzad-2/+3
2020-01-02Normalize `syntax::symbol` imports.Mazdak Farrokhzad-6/+6
2020-01-02Normalize `syntax::source_map` imports.Mazdak Farrokhzad-11/+10
2020-01-01Rename `syntax_pos` to `rustc_span` in source codeVadim Petrochenkov-16/+16
2019-12-30When a codegen worker has a FatalError, propagate it instead of ICE'ing.Felix S. Klock II-8/+18
2019-12-30Make things build againVadim Petrochenkov-1/+1
2019-12-29Move reachable_set query in librustc_passes.Camille GILLOT-2/+1
2019-12-28Auto merge of #67605 - lzutao:msdn-links, r=Mark-Simulacrumbors-3/+3
tidy: change msdn links to newer locations see accouncement at https://docs.microsoft.com/welcome-to-docs The script that I used: https://gist.github.com/lzutao/1449c9210ad91899841d62e0058d2caa
2019-12-28Auto merge of #67598 - jumbatm:issue67557_simd_shuffle, r=oli-obkbors-3/+6
Fix ICE / miscompilation when inlining simd shuffle intrinsic in MIR. Closes #67557. r? @oli-obk
2019-12-25tidy: change msdn links to newer locationsLzu Tao-3/+3
see accouncement at https://docs.microsoft.com/welcome-to-docs
2019-12-25Run RustFmtjumbatm-1/+4
2019-12-25Pass new instance instead of self.instance to simd_shuffle_indices.jumbatm-3/+3
2019-12-24x.py fmt after previous deignoreMark Rousskov-257/+228
2019-12-22Format the worldMark Rousskov-1966/+1882
2019-12-22Rollup merge of #66877 - skinny121:const-eval-entry-points, r=oli-obkMazdak Farrokhzad-23/+10
Add simpler entry points to const eval for common usages. I found the `tcx.const_eval` API to be complex/awkward to work with, because of the inherent complexity from all of the different situations it is called from. Though it mainly used in one of the following ways: - Evaluates the value of a constant without any substitutions, e.g. evaluating a static, discriminant, etc. - Evaluates the value of a resolved instance of a constant. this happens when evaluating unevaluated constants or normalising trait constants. - Evaluates a promoted constant. This PR adds three new functions `const_eval_mono`, `const_eval_resolve`, and `const_eval_promoted` to `TyCtxt`, which each cater to one of the three ways `tcx.const_eval` is normally used.
2019-12-22Add simpler entry points to const eval for common usages.Ben Lewis-23/+10
2019-12-201. ast::Mutability::{Mutable -> Mut, Immutable -> Not}.Mazdak Farrokhzad-2/+2
2. mir::Mutability -> ast::Mutability.
2019-12-20Rollup merge of #64588 - matthewjasper:mir-address-of, r=oli-obkMazdak Farrokhzad-21/+41
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-21/+41
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-11Auto merge of #66650 - matthewjasper:nonuniform-array-move, r=pnkfelixbors-1/+2
Remove uniform array move MIR passes This PR fixes a number of bugs caused by limitations of this pass * Projections from constant indexes weren't being canonicalized * Constant indexes from the start weren't being canonicalized (they could have different min_lengths) * It didn't apply to non-moves This PR makes the following changes to support removing this pass: * ConstantIndex of arrays are now generated in a canonical form (from the start, min_length is the actual length). * Subslices are now split when generating move paths and when checking subslices have been moved. Additionally * The parent move path of a projection from an array element is now calculated correctly closes #66502
2019-12-11Rollup merge of #67134 - oli-obk:const_prop_zst, r=wesleywiserYuki Okushi-1/+8
Ensure that we get a hard error on generic ZST constants if their bod… …y causes an error during evaluation cc #67083 (does not fix because we still need the beta backport) r? @wesleywiser cc @RalfJung
2019-12-09Make const index and subslice array projections more usefulMatthew Jasper-1/+2
* `min_length` is now exact for const index elements. * const index elements are always from the start. * make array `Subslice` `PlaceElems` count both `from` and `to` from the start.
2019-12-08Auto merge of #66981 - michaelwoerister:measureme-0.5.0, r=Mark-Simulacrumbors-1/+1
Update measureme crate to 0.5.0 This PR updates the `measureme` self-profiling crate to the latest release. Heads up, this version changes the trace file format, so the `summarize` tool on perf.rlo needs to be updated to 0.5 too. r? @Mark-Simulacrum cc @wesleywiser
2019-12-08Rollup merge of #66991 - Nashenas88:body_cache_cleanup, r=eddybMazdak Farrokhzad-3/+3
Cleanup BodyCache After this PR: - `BodyCache` is renamed to `BodyAndCache` - `ReadOnlyBodyCache` is renamed to `ReadOnlyBodyAndCache` - `ReadOnlyBodyAndCache::body` fn is removed and all calls to it are replaced by a deref (possible due to fix of its `Deref` imp in #65947) cc @eddyb @oli-obk
2019-12-08Rollup merge of #66325 - BartMassey:master, r=joshtriplettMazdak Farrokhzad-1/+1
Change unused_labels from allow to warn Fixes #66324, making the unused_labels lint warn instead of allow by default. I'm told @rust-lang/lang will need to review this, and perhaps will want to do a crater run.
2019-12-08Ensure that we get a hard error on generic ZST constants if their body ↵Oliver Scherer-1/+8
causes an error during evaluation
2019-12-07Auto merge of #65881 - anp:implicit-caller-location, r=eddyb,oli-obkbors-12/+50
Implement #[track_caller] attribute. (RFC 2091 4/N) Implements the `#[track_caller]` attribute in both const and codegen contexts. The const implementation walks up the stack to find the nearest untracked callsite. The codegen implementation adds an implicit argument to tracked function calls, and populates it with either a call to the previously-landed intrinsic or if the caller has `#[track_caller]` with a copy of the location passed to the current function. Also includes a little cleanup and a few comments in the other caller location areas. [Depends on: 65664](https://github.com/rust-lang/rust/pull/65664) [RFC 2091 text](https://github.com/rust-lang/rfcs/blob/master/text/2091-inline-semantic.md) [Tracking issue](https://github.com/rust-lang/rust/issues/47809) [Tracking doc](https://paper.dropbox.com/doc/track_rfc_2091_impl-notes--Anf1NwnIb0xcRv31YLIadyj0Ag-rwCdRc2fi2yvRZ7syGZ9q#:uid=863513134494965680023183&h2=TODO-actually-pass-location-to)
2019-12-06Address review feedback.Adam Perry-4/+4
2019-12-06Caller location is propagated via immediates rather than memory.Adam Perry-8/+13
2019-12-06Auto merge of #65195 - varkor:to_option, r=Centrilbors-26/+11
Rename `bool::then_*` to `bool::to_option_*` and use where appropriate Name change following https://github.com/rust-lang/rfcs/pull/2757. Also try it out throughout the compiler in places I think makes the code more readable.
2019-12-06Rename to `then_some` and `then`varkor-5/+5
2019-12-06Use `to_option_with` in several placesvarkor-5/+8
2019-12-06Use `to_option` in various placesvarkor-26/+8
2019-12-05Pass a location to #[track_caller] functions in codegen_call_terminator.Adam Perry-4/+29
2019-12-05Add field to FunctionCx for passing caller location.Adam Perry-8/+16
2019-12-05rustc_codegen_ssa: Fix line accidentally reverted during rebasePaul Daniel Faria-1/+1
2019-12-05rustc: Apply clearer naming to BodyAndCache, fix Deref impl, remove unneeded ↵Paul Daniel Faria-2/+2
Index impl, remove body fn rustc_codegen_ssa: Fix BodyAndCache reborrow to Body and change instances of body() call to derefence rustc_mir: Fix BodyAndCache reborrow to Body and change intances of body() call to derefence