Eduard-Mihai Burtescu
9da14a82c6
rustc: move Instance::fn_sig to ty::layout and privatize it.
2019-12-03 15:55:21 +02:00
Eduard-Mihai Burtescu
79d908b301
rustc_target: add abi::call::Conv::Rust distinct from Conv::C.
2019-12-03 15:55:21 +02:00
Eduard-Mihai Burtescu
e93aa104ab
rustc_codegen_llvm: privatize as much of attributes::* as possible.
2019-12-03 15:55:21 +02:00
Eduard-Mihai Burtescu
cd3c324b07
rustc_codegen_llvm: take an Instance in attributes::from_fn_attrs.
2019-12-03 15:55:21 +02:00
Eduard-Mihai Burtescu
8a8749b297
rustc_codegen_llvm: rewrite debuginfo::get_function_signature to use FnAbi.
2019-12-03 15:55:20 +02:00
Eduard-Mihai Burtescu
902433b5bf
rustc: take a PolyFnSig instead of an FnSig in FnAbi::of_fn_ptr.
2019-12-03 15:55:14 +02:00
Eduard-Mihai Burtescu
2b921d51d7
rustc: rename FnAbi::new to FnAbi::of_fn_ptr.
2019-12-03 15:41:56 +02:00
Eduard-Mihai Burtescu
052d0edbc1
rustc: compute FnAbi's for virtual calls through FnAbi::of_instance.
2019-12-03 15:41:56 +02:00
Eduard-Mihai Burtescu
39e50e2f28
rustc: use ReifyShim for reifying Virtual call instances.
2019-12-03 15:41:56 +02:00
Eduard-Mihai Burtescu
4b68afe257
rustc_codegen_ssa: use FnAbi::of_instance wherever possible.
2019-12-03 15:41:43 +02:00
Eduard-Mihai Burtescu
5b7d0f389f
rustc_codegen_llvm: move NoReturn attribute to apply_attrs_llfn.
2019-12-03 15:28:18 +02:00
Eduard-Mihai Burtescu
95b944210f
rustc_codegen_ssa: take a FnAbi instead of a FnSig in declare_fn.
2019-12-03 15:28:18 +02:00
Eduard-Mihai Burtescu
db477af9ad
rustc_codegen_ssa: remove define_fn and define_internal_fn.
2019-12-03 15:28:18 +02:00
Eduard-Mihai Burtescu
6a75768b33
rustc_codegen_ssa: clean up lifetimes on TerminatorCodegenHelper's methods.
2019-12-03 13:31:10 +02:00
Eduard-Mihai Burtescu
fce40a2256
rustc_codegen_ssa: make codegen_instance a simple wrapper for codegen_mir.
2019-12-03 13:31:03 +02:00
Eduard-Mihai Burtescu
a7094f7ce3
rustc_codegen_ssa: use &'tcx mir::Body<'tcx> instead of &'a ... for the MIR body.
2019-12-03 13:29:05 +02:00
Eduard-Mihai Burtescu
a57aea88d4
rustc: expose the mir::Body reference lifetime from mir::ReadOnlyBodyCache ( #64736 fallout).
2019-12-03 13:04:28 +02:00
Eduard-Mihai Burtescu
4810cf1d1b
rustc_mir: don't hardcode InstanceDef::VtableShim behavior to Adjustment::DerefMove.
2019-12-03 12:54:47 +02:00
Eduard-Mihai Burtescu
552ea447e4
rustc: combine Instance::fn_sig_noadjust and Instance::fn_sig.
2019-12-03 12:54:36 +02:00
bors
4787e97475
Auto merge of #66256 - CAD97:patch-2, r=RalfJung
...
Layout::pad_to_align is infallible
As per [this comment](https://github.com/rust-lang/rust/issues/55724#issuecomment-441421651 ) (cc @glandium).
> Per https://github.com/rust-lang/rust/blob/eb981a1/src/libcore/alloc.rs#L63-L65 , `layout.size()` is always <= `usize::MAX - (layout.align() - 1)`.
>
> Which means:
>
> * The maximum value `layout.size()` can have is already aligned for `layout.align()` (`layout.align()` being a power of two, `usize::MAX - (layout.align() - 1)` is a multiple of `layout.align()`)
> * Incidentally, any value smaller than that maximum value will align at most to that maximum value.
>
> IOW, `pad_to_align` can not return `Err(LayoutErr)`, except for the layout not respecting its invariants, but we shouldn't care about that.
This PR makes `pad_to_align` return `Layout` directly, representing the fact that it cannot fail.
2019-12-03 01:50:33 +00:00
bors
fdc0011561
Auto merge of #64736 - Nashenas88:mir_predecessors_cache_cleanup, r=oli-obk
...
Remove interior mutability in mir predecessors cache
2019-12-02 14:51:02 +00:00
Paul Daniel Faria
3eaad564d2
Fix issues caused during rebasing
2019-12-02 09:40:03 -05:00
Paul Daniel Faria
6123478f2a
Fix issues caused during rebasing
2019-12-02 08:43:01 -05:00
Paul Daniel Faria
38bd3a2342
Use new HashStable proc macro
2019-12-02 08:43:01 -05:00
Paul Daniel Faria
acb90eb014
Fix tidy issues
2019-12-02 08:43:01 -05:00
Paul Daniel Faria
9978574c9e
Fix rebasing errors, convert some BodyCache::body() calls to reborrows
2019-12-02 08:43:01 -05:00
Paul Daniel Faria
64654ce1f1
Fix type errors created during rebasing
2019-12-02 08:42:24 -05:00
Paul Daniel Faria
598797c6e7
Remove unchecked inline attribute, remove unused functions, make chache mod private again
2019-12-02 08:41:30 -05:00
Paul Daniel Faria
c6354e9839
Remove inline attributes that hadn't been profiled, unexport Cache since it no longer needs to be public
2019-12-02 08:41:30 -05:00
Paul Daniel Faria
245abc49be
Fix type errors cause during rebasing
2019-12-02 08:41:30 -05:00
Paul Daniel Faria
05dc5e9f47
Compute predecessors in mir_build query and use existing cache for generating ReadOnlyBodyCache, remove unneeded fns
2019-12-02 08:41:30 -05:00
Paul Daniel Faria
ed90818ac8
Remove files created during conflict resolution
2019-12-02 08:40:56 -05:00
Paul Daniel Faria
51b06656da
Fix typos caused during rebase
2019-12-02 08:40:56 -05:00
Paul Daniel Faria
b2fe254c98
Remove HasLocalDecls impl from BodyCache's, properly reborrow to Body, rename all body_cache back to body
2019-12-02 08:40:56 -05:00
Paul Daniel Faria
595d161d36
Remove BodyCache.body and rely on Deref as much as possible for ReadOnlyBodyCache
2019-12-02 08:38:16 -05:00
Paul Daniel Faria
c42bdb8c74
Undo minor changes that weren't needed, fix one lifetime typo
2019-12-02 08:38:16 -05:00
Paul Daniel Faria
e54c610f85
Fix compilation errors created during rebase
2019-12-02 08:38:16 -05:00
Paul Daniel Faria
ab657e3b6b
Fix typo
2019-12-02 08:38:16 -05:00
Paul Daniel Faria
67b7a78231
Fix tidy errors
2019-12-02 08:38:16 -05:00
Paul Daniel Faria
35590b5cc8
Fix typos caused during rebase
2019-12-02 08:37:23 -05:00
Paul Daniel Faria
4de31b26d1
Fix remaining compilation issues
2019-12-02 08:37:04 -05:00
Paul Daniel Faria
fc6b58d0a8
Simplify BodyCache impl and fix all remaining type errors in librustc_mir (lifetime errors still exist)
2019-12-02 08:35:08 -05:00
Paul Daniel Faria
38c0887c76
Fix remaining Body -> (ReadOnly)BodyCache type errors in librustc_mir outside of librustc_mir/transform
2019-12-02 08:31:35 -05:00
Paul Daniel Faria
3642a71da2
Fix typo caused by rebasing
2019-12-02 08:31:35 -05:00
Paul Daniel Faria
0a19371243
Add predecessors fn to ReadOnlyBodyCache, fix more Body -> (ReadOnly)BodyCache type errors
2019-12-02 08:31:35 -05:00
Paul Daniel Faria
26f1c01ff7
Add read_only fn to BodyCache<&mut...> impl, fix more Body -> (ReadOnly)BodyCache type errors
2019-12-02 08:31:35 -05:00
Paul Daniel Faria
ab98c595ea
Fix a large number of Body -> (ReadOnly)BodyCache type errors, add predecessor_locations fn to ReadOnlyBodyCache
2019-12-02 08:31:35 -05:00
Paul Daniel Faria
2eed90a621
Account for new maybe_sideeffect helper that requires predecessors
2019-12-02 08:30:30 -05:00
Paul Daniel Faria
c8c266a0fb
Convert &mut to & since the reference didn't need to be mutable
2019-12-02 08:30:30 -05:00
Paul Daniel Faria
66279d12f9
Revert back to using FunctionCx's Body
2019-12-02 08:30:30 -05:00