bors
21f2684950
Auto merge of #56198 - bjorn3:cg_ssa_refactor, r=eddyb
...
Refactor rustc_codegen_ssa
cc #56108 (not all things are done yet)
This removes an unsafe method from cg_ssa.
r? @eddyb
cc @sunfishcode
2018-12-02 18:02:20 +00:00
kennytm
cb9add6303
Rollup merge of #56349 - davidtwco:issue-55396-inference-extension, r=nagisa
...
rustc 1.30.0's linker flavor inference is a non-backwards compat change to -Clinker
Part of #55396 .
This commit modifies linker flavor inference to only remove the extension
to the linker when performing inference if that extension is a 'exe'.
r? @nagisa
cc @alexcrichton @japaric
2018-12-01 02:03:49 +08:00
Eduard-Mihai Burtescu
e305994beb
proc_macro: introduce a "bridge" between clients (proc macros) and servers (compiler front-ends).
2018-11-30 06:15:19 +02:00
David Wood
0124341935
Only consider stem when extension is exe.
...
This commit modifies linker flavor inference to only remove the extension
to the linker when performing inference if that extension is a 'exe'.
2018-11-29 20:47:59 +01:00
bjorn3
d108a913c7
Move get_static from CodegenCx to Builder
2018-11-29 18:19:44 +01:00
bjorn3
ceb29e2ac4
Use implicit deref instead of BuilderMethods::cx()
2018-11-29 18:19:44 +01:00
bjorn3
e45733048e
Require Deref to CodegenCx for HasCodegen
2018-11-29 18:19:44 +01:00
bjorn3
e8da3c6c32
Remove static_addr_of_mut from cg_ssa
2018-11-29 18:19:43 +01:00
bjorn3
aaca5a38ee
Rename StaticMethods::static_ptrcast to ConstMethods::const_ptrcast
2018-11-29 18:19:43 +01:00
bjorn3
59682d3e2a
Remove static_bitcast from cg_ssa
2018-11-29 18:19:43 +01:00
bjorn3
2d4c96d1b1
Move IntrinsicCallMethods::call_overflow_intrinsics to BuilderMethods::checked_binop
2018-11-29 18:19:42 +01:00
bjorn3
9a9045573f
Remove call_lifetime_intrinsic from cg_ssa
2018-11-29 18:19:42 +01:00
bjorn3
187c4cf257
Use BackendTypes instead of Backend or HasCodegen in a few places
2018-11-29 18:19:42 +01:00
bjorn3
66c3195c4c
Rustfmt on cg_ssa/traits
2018-11-29 18:19:42 +01:00
bjorn3
15a5009af0
Don't use llvm intrinsic names in cg_ssa
2018-11-29 18:19:41 +01:00
bjorn3
2d46ee26fb
Remove static_replace_all_uses and statics_to_rauw from cg_ssa
2018-11-29 18:19:41 +01:00
bjorn3
436eff5e84
Make ConstMethods and StaticMethods require BackendTypes instead of Backend
2018-11-29 18:19:41 +01:00
bjorn3
b3b6e4dd9b
Some refactorings
2018-11-29 18:19:41 +01:00
Nikita Popov
d8190afbcb
Fix alignment of stores to scalar pair
...
The alignment for the second element of a scalar pair is not the
same as for the first element. Make sure it is computed correctly
based on the element size.
2018-11-28 00:31:03 +01:00
Alex Crichton
cc9c91d385
Pass --export-dynamic to LLD for wasm
...
This should handle recent symbol visibility changes happening, although
we'll likely want to tweak this in the future!
2018-11-25 20:27:18 -08:00
Alex Crichton
c86b1529a5
wasm: Pass --no-demangle to LLD
...
Our mangling scheme is not C++'s, so tell LLD to not demangle anything
so we can handle Rust-specific demangling ourselves.
2018-11-25 20:27:18 -08:00
Pietro Albini
6398df1520
Rollup merge of #56101 - frewsxcv:frewsxcv-dyn, r=steveklabnik
...
Incorporate `dyn` into more comments and docs.
r? @rust-lang/docs
2018-11-25 17:05:03 +01:00
bors
37961dbd2d
Auto merge of #55959 - matthewjasper:remove-end-region, r=nikomatsakis
...
Cleanup from lexical MIR borrowck removal
Lexical MIR borrowck was removed months ago now, and `EndRegion`s are no longer used for MIRI verification.
* Remove `rustc::mir::StatementKind::EndRegion` and the `-Zemit_end_regions` flag
* Use `RegionVid` instead of `Region` in BorrowSet
* Rewrite drop generation to create fewer goto terminators.
r? @nikomatsakis
2018-11-25 03:00:30 +00:00
Corey Farwell
ebb1a48b41
Merge branch 'master' into frewsxcv-dyn
2018-11-23 14:09:08 -05:00
kennytm
e0025df3fd
Rollup merge of #56097 - ogoffart:union-abi, r=eddyb
...
Fix invalid bitcast taking bool out of a union represented as a scalar
As reported in https://github.com/rust-lang/rust/pull/54668#issuecomment-440186476
2018-11-24 01:31:56 +08:00
kennytm
1b707f78f5
Rollup merge of #56048 - bjorn3:cg_ssa_sysroot, r=eddyb
...
Add rustc_codegen_ssa to sysroot
Outside of rustc you are currently unable to use it.
r? @nikomatsakis (because you r+'ed #55627 )
2018-11-24 01:31:53 +08:00
bors
6a2d1b4e15
Auto merge of #54071 - eddyb:alignsssss, r=oli-obk
...
rustc_target: separate out an individual alignment quantity type from Align.
Before this PR, `rustc_target::abi::Align` combined "power-of-two alignment quantity" semantics, with a distinction between ABI (required) and preferred alignment (by having two quantities).
After this PR, `Align` is only *one* such quantity, and a new `AbiAndPrefAlign` type is introduced to hold the pair of ABI and preferred `Align` quantities.
`Align` is used everywhere one quantity is necessary/sufficient, simplifying some of the code in codegen/miri, while `AbiAndPrefAlign` only in layout computation (to propagate preferred alignment).
r? @oli-obk cc @nagisa @RalfJung @nikomatsakis
2018-11-23 01:02:21 +00:00
bjorn3
d6d8a330f8
Add rustc_codegen_ssa to sysroot
2018-11-22 20:20:23 +01:00
Guillaume Gomez
6afecfd785
Rollup merge of #56106 - bjorn3:patch-1, r=alexcrichton
...
Remove some incorrect doc comments
2018-11-22 10:37:55 +01:00
Guillaume Gomez
b473157293
Rollup merge of #56067 - jethrogb:jb/sgx-target-spec, r=alexcrichton
...
Add SGX target to rustc
This adds the `x86_64-fortanix-unknown-sgx` target specification to the Rust compiler. See #56066 for more details about this target.
2018-11-22 10:37:53 +01:00
Eduard-Mihai Burtescu
5b4747ded7
rustc_target: avoid using AbiAndPrefAlign where possible.
2018-11-22 05:01:49 +02:00
Eduard-Mihai Burtescu
3ce8d444af
rustc_target: separate out an individual Align from AbiAndPrefAlign.
2018-11-22 04:38:00 +02:00
Eduard-Mihai Burtescu
d56e892085
rustc_target: rename abi::Align to AbiAndPrefAlign.
2018-11-22 04:12:59 +02:00
Eduard-Mihai Burtescu
7683180be5
rustc: implement and use Default on more types.
2018-11-21 08:11:50 +02:00
Eduard-Mihai Burtescu
da622a3796
rustc: remove {FxHash,Node,DefId,HirId,ItemLocal}{Map,Set} "constructor" fns.
2018-11-21 07:27:02 +02:00
bjorn3
8a0909df79
Remove incorrect doc comment
2018-11-20 17:30:29 +01:00
Corey Farwell
033cbfec4d
Incorporate dyn into more comments and docs.
2018-11-20 09:35:03 -05:00
Olivier Goffart
4c21f66c1d
Add comments and rename a local variable
2018-11-20 13:24:41 +01:00
Olivier Goffart
86d41350c7
Fix invalid bitcast taking bool out of a union represented as a scalar
...
As reported in https://github.com/rust-lang/rust/pull/54668#issuecomment-440186476
2018-11-20 12:20:05 +01:00
Jethro Beekman
a44e446551
Add override_export_symbols option to Rust target specification
2018-11-19 23:24:43 +05:30
Matthew Jasper
b16985a354
Remove mir::StatementKind::EndRegion
...
Since lexical MIR borrow check is gone, and validation no longer uses
these, they can be removed.
2018-11-18 11:05:19 +00:00
Eduard-Mihai Burtescu
756f84d7ce
[eddyb] rustc_codegen_llvm: remove unused parametrization of CodegenCx and Builder over Values.
2018-11-16 15:08:18 +02:00
Eduard-Mihai Burtescu
0b569249c8
[eddyb] rustc_codegen_ssa: rename interfaces to traits.
2018-11-16 15:08:18 +02:00
Eduard-Mihai Burtescu
d1410ada92
[eddyb] rustc_codegen_ssa: avoid a Clone bound on TargetMachine.
2018-11-16 15:08:18 +02:00
Eduard-Mihai Burtescu
9bb6663431
[eddyb] rustc_codegen_ssa: handle LLVM unsafety correctly.
2018-11-16 15:08:18 +02:00
Denis Merigoux
bf7f8cd3fc
Added README explaining the refactoring
2018-11-16 15:08:18 +02:00
Denis Merigoux
b9e5cf99a9
Separating the back folder between backend-agnostic and LLVM-specific code
2018-11-16 15:08:18 +02:00
Denis Merigoux
b25b804013
Added default impl for DerivedTypeMethods + empty impl for Cranelift BaseTypeMethods
2018-11-16 15:08:18 +02:00
Denis Merigoux
54dd3a47fd
All Builder methods now take &mut self instead of &self
2018-11-16 15:08:18 +02:00
Denis Merigoux
1ebdfbb026
Added some docs + start to &mut self builder methods
2018-11-16 15:08:18 +02:00