| Age | Commit message (Collapse) | Author | Lines | |
|---|---|---|---|---|
| 2020-07-22 | [AVR] Correctly set the pointer address space when constructing pointers to ↵ | Dylan McKay | -1/+4 | |
| functions This patch extends the existing `type_i8p` method so that it requires an explicit address space to be specified. Before this patch, the `type_i8p` method implcitily assumed the default address space, which is not a safe transformation on all targets, namely AVR. The Rust compiler already has support for tracking the "instruction address space" on a per-target basis. This patch extends the code generation routines so that an address space must always be specified. In my estimation, around 15% of the callers of `type_i8p` produced invalid code on AVR due to the loss of address space prior to LLVM final code generation. This would lead to unavoidable assertion errors relating to invalid bitcasts. With this patch, the address space is always either 1) explicitly set to the instruction address space because the logic is dealing with functions which must be placed there, or 2) explicitly set to the default address space 0 because the logic can only operate on data space pointers and thus we keep the existing semantics of assuming the default, "data" address space. | ||||
| 2020-04-26 | Rollup merge of #71392 - ecstatic-morse:body-predecessor-cache-arc, ↵ | Dylan DPC | -1/+1 | |
| r=nikomatsakis Don't hold the predecessor cache lock longer than necessary #71044 returns a `LockGuard` with the predecessor cache to callers of `Body::predecessors`. As a result, the lock around the predecessor cache could be held for an arbitrarily long time. This PR uses reference counting for ownership of the predecessor cache, meaning the lock is only ever held within `PredecessorCache::compute`. Checking this API for potential sources of deadlock is much easier now, since we no longer have to consider its consumers, only its internals. This required removing `predecessors_for`, since there is no equivalent to `LockGuard::map` for `Arc` and `Rc`. I believe this could be emulated with `owning_ref::{Arc,Rc}Ref`, but I don't think it's necessary. Also, we continue to return an opaque type from `Body::predecessors` with the lifetime of the `Body`, not `'static`. This depends on #71044. Only the last two commits are new. r? @nikomatsakis | ||||
| 2020-04-23 | Rename uneval_consts to required_consts | Santiago Pastorino | -1/+1 | |
| 2020-04-23 | Evaluate unevaluated MIR constants in codegen_mir | Santiago Pastorino | -0/+14 | |
| 2020-04-22 | Remove `predecessors_for` | Dylan MacKenzie | -1/+1 | |
| There is no `Arc::map` equivalent to `LockGuard::map` | ||||
| 2020-04-22 | Use `Body` everywhere | Dylan MacKenzie | -7/+6 | |
| 2020-03-30 | rustc -> rustc_middle part 2 | Mazdak Farrokhzad | -4/+4 | |
| 2020-03-27 | Rename TyLayout to TyAndLayout. | Ana-Maria Mihalache | -2/+2 | |
| 2020-03-12 | codegen/mir: support polymorphic `InstanceDef`s | David Wood | -6/+11 | |
| This commit modifies the use of `subst_and_normalize_erasing_regions` on parts of the MIR bodies returned from `instance_mir`, so that `InstanceDef::CloneShim` and `InstanceDef::DropGlue` (where there is a type) do not perform substitutions. This avoids double substitutions and enables polymorphic `InstanceDef`s. Signed-off-by: David Wood <david@davidtw.co> | ||||
| 2020-02-08 | rustc_codegen_ssa: remove unnecessary source_locations_enabled. | Eduard-Mihai Burtescu | -7/+0 | |
| 2020-02-03 | rustc_codegen_ssa: convert mir::VarDebugInfo into a custom PerLocalVarDebugInfo. | Eduard-Mihai Burtescu | -5/+8 | |
| 2019-12-22 | Format the world | Mark Rousskov | -151/+165 | |
| 2019-12-08 | Rollup merge of #66991 - Nashenas88:body_cache_cleanup, r=eddyb | Mazdak Farrokhzad | -2/+2 | |
| 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-06 | Address review feedback. | Adam Perry | -2/+2 | |
| 2019-12-06 | Caller location is propagated via immediates rather than memory. | Adam Perry | -4/+11 | |
| 2019-12-05 | Pass a location to #[track_caller] functions in codegen_call_terminator. | Adam Perry | -4/+17 | |
| 2019-12-05 | Add field to FunctionCx for passing caller location. | Adam Perry | -0/+4 | |
| 2019-12-05 | rustc_codegen_ssa: Fix line accidentally reverted during rebase | Paul Daniel Faria | -1/+1 | |
| 2019-12-05 | rustc: Apply clearer naming to BodyAndCache, fix Deref impl, remove unneeded ↵ | Paul Daniel Faria | -1/+1 | |
| 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 | ||||
| 2019-12-03 | rustc: compute FnAbi's for virtual calls through FnAbi::of_instance. | Eduard-Mihai Burtescu | -1/+1 | |
| 2019-12-03 | rustc_codegen_ssa: use FnAbi::of_instance wherever possible. | Eduard-Mihai Burtescu | -5/+2 | |
| 2019-12-03 | rustc_codegen_ssa: make codegen_instance a simple wrapper for codegen_mir. | Eduard-Mihai Burtescu | -3/+6 | |
| 2019-12-03 | rustc_codegen_ssa: use &'tcx mir::Body<'tcx> instead of &'a ... for the MIR ↵ | Eduard-Mihai Burtescu | -7/+7 | |
| body. | ||||
| 2019-12-02 | Fix issues caused during rebasing | Paul Daniel Faria | -1/+1 | |
| 2019-12-02 | Remove BodyCache.body and rely on Deref as much as possible for ↵ | Paul Daniel Faria | -1/+1 | |
| ReadOnlyBodyCache | ||||
| 2019-12-02 | Undo minor changes that weren't needed, fix one lifetime typo | Paul Daniel Faria | -3/+4 | |
| 2019-12-02 | Fix compilation errors created during rebase | Paul Daniel Faria | -1/+1 | |
| 2019-12-02 | Simplify BodyCache impl and fix all remaining type errors in librustc_mir ↵ | Paul Daniel Faria | -9/+8 | |
| (lifetime errors still exist) | ||||
| 2019-12-02 | Account for new maybe_sideeffect helper that requires predecessors | Paul Daniel Faria | -9/+10 | |
| 2019-12-02 | Convert &mut to & since the reference didn't need to be mutable | Paul Daniel Faria | -1/+1 | |
| 2019-12-02 | Revert back to using FunctionCx's Body | Paul Daniel Faria | -6/+5 | |
| 2019-12-02 | Add Body back as field of FunctionCx, but under a different lifetime | Paul Daniel Faria | -6/+6 | |
| 2019-12-02 | Remove Body from FunctionCx, pass it along during librustc_codegen_ssa | Paul Daniel Faria | -14/+14 | |
| 2019-12-02 | Simplify Cache wrapper to single type, impl Deref on it, fix all compilation ↵ | Paul Daniel Faria | -8/+8 | |
| errors in librustc_codegen_ssa | ||||
| 2019-12-02 | Move predecessors cache invalidation back to basic_blocks_mut, add a couple ↵ | Paul Daniel Faria | -1/+1 | |
| more ensure_predecessors to prevent panics | ||||
| 2019-12-02 | Stop invalidating predecessors cache when accessing unique basic block, ↵ | Paul Daniel Faria | -1/+1 | |
| invalidate cache when accessing unique terminator | ||||
| 2019-11-27 | rustc: move debug info from LocalDecl and UpvarDecl into a dedicated ↵ | Eduard-Mihai Burtescu | -1/+3 | |
| VarDebugInfo. | ||||
| 2019-11-03 | rustc: rename {Fn,Arg}TypeExt to {Fn,Arg}AbiExt. | Eduard-Mihai Burtescu | -1/+1 | |
| 2019-11-03 | rustc_target: rename {Fn,Arg}Type to {Fn,Arg}Abi. | Eduard-Mihai Burtescu | -10/+10 | |
| 2019-10-31 | rustc_codegen_ssa: introduce MIR VarDebugInfo, but only for codegen. | Eduard-Mihai Burtescu | -0/+2 | |
| 2019-10-31 | rustc_codegen_ssa: move debuginfo scopes into FunctionDebugContext. | Eduard-Mihai Burtescu | -8/+7 | |
| 2019-10-31 | rustc_codegen_ssa: move all set_var_name calls to mir::debuginfo. | Eduard-Mihai Burtescu | -39/+5 | |
| 2019-10-31 | rustc_codegen_ssa: move local variable debuginfo to mir::debuginfo. | Eduard-Mihai Burtescu | -233/+30 | |
| 2019-10-31 | rustc_codegen_ssa: move debuginfo-related things to a new mir::debuginfo module. | Eduard-Mihai Burtescu | -61/+4 | |
| 2019-10-13 | s/FuncId/Function | bjorn3 | -2/+2 | |
| 2019-10-13 | Introduce FuncId backend type | bjorn3 | -2/+2 | |
| 2019-10-10 | Auto merge of #59546 - sfanxiang:interminable-ub, r=nagisa | bors | -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-04 | clean up GeneratorSubsts | csmoe | -1/+1 | |
| 2019-10-04 | Rollup merge of #64817 - csmoe:closure, r=nikomatsakis | Mazdak 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-03 | generate ClosureSubsts from SubstsRef | csmoe | -1/+1 | |
