Michael Woerister
b27a161939
Annotate functions in LLVM with target-cpu, same as Clang does.
2018-08-07 14:48:20 +02:00
Michael Woerister
f2969ed6c3
Set 'PrepareForThinLTO' whenever doing cross-language LTO.
2018-08-07 14:48:20 +02:00
Michael Woerister
aa9eeff263
Make sure upstream object files are added to staticlibs when compiling
...
with ThinLTO and cross-lang-lto.
Normally, when compiling with whole-crate-graph ThinLTO, we expect
rustc's LTO step to "uplift" upstream object files/LLVM modules to
the current set of compilation artifacts. Therefore the staticlib
creation code skips this uplifting. However, when compiling with
"cross-language LTO" (i.e. defer LTO to the actual linker), the LTO
step in rustc is not performed, so we have to take care of copying
upstream object files during archive creation (like we already do
when compiling without any LTO).
2018-08-07 14:44:48 +02:00
Michael Woerister
3a3b3317d9
Fix issue around dllimport and ThinLTO as LLD runs it.
2018-08-07 14:44:48 +02:00
bors
11a902431b
Auto merge of #51007 - AstralSorcerer:master, r=nagisa
...
Make globals with private linkage unnamed. Fixes #50862 .
cc @oli-obk @nagisa
2018-08-07 02:12:35 +00:00
varkor
c81b95f305
Remove unnecessary feature attributes that sneaked in
2018-08-05 15:54:49 +01:00
Mark Rousskov
a9093a4dd8
Move share_generics getter onto options directly
2018-08-04 06:54:36 -06:00
Mark Rousskov
3cc4450a8a
Simplify some handling of target_pointer_width
2018-08-04 06:54:36 -06:00
Mark Rousskov
2bc71971e5
Normalize DebugInfoLevel to standard style
2018-08-04 06:54:34 -06:00
Mark Rousskov
442a4744e3
Normalize EntryFnType variants to standard style
2018-08-04 06:54:12 -06:00
Mark Rousskov
b3267dcb31
Normalize variants of Passes to standard style
2018-08-04 06:53:15 -06:00
Mark Rousskov
2a9344206b
Normalize variants of CrateType to standard style
...
This is a clippy-breaking change.
2018-08-04 06:53:15 -06:00
bors
59fa6bd6c1
Auto merge of #52712 - oli-obk:const_eval_cleanups, r=RalfJung
...
Reintroduce `Undef` and properly check constant value sizes
r? @RalfJung
cc @eddyb
basically all kinds of silent failures that never occurred are assertions now
2018-08-03 14:28:12 +00:00
bors
88e0ff14a8
Auto merge of #52887 - yurydelendik:disable-lld-symbols, r=alexcrichton
...
Disable debug sections when optimization flags is set for LLD.
Currently LLD does not error when optimization is set and debugging information sections are present. (See discussion at https://reviews.llvm.org/D47901 )
Using `--strip-debug` along with the `-O` option.
2018-08-03 12:22:17 +00:00
Wesley Wiser
45482c6f99
Basic profiling
2018-08-02 18:57:24 -04:00
Oliver Schneider
37e18e7a30
Second field of ScalarPair can be undef in some cases
2018-08-02 13:16:53 +02:00
Pietro Albini
42243f82f4
Rollup merge of #52799 - Mark-Simulacrum:attr-id-bitvecs, r=michaelwoerister
...
Use BitVector for global sets of AttrId
2018-08-01 21:46:23 +02:00
Oliver Schneider
c6c06854c0
Reintroduce Undef
and properly check constant value sizes
2018-08-01 15:29:35 +02:00
Mark Rousskov
9bc4fbb10a
Split out growth functionality into BitVector type
2018-08-01 06:50:40 -06:00
Colin Pronovost
3da7c65e92
Make sure we prepare for thin LTO whenever we are emitting bitcode
...
Emitting LLVM bitcode uses ThinLTOBuffers, so we need to prepare for
thin LTO or we will likely cause errors in LLVM.
2018-08-01 00:27:25 -04:00
Colin Pronovost
02190f397e
Make globals with private linkage unnamed. Fixes #50862 .
2018-07-31 23:45:18 -04:00
Alex Crichton
f0bceba669
rustc: Handle linker diagnostic from LLVM
...
Previously linker diagnostic were being hidden when two modules were linked
together but failed to link. This commit fixes the situation by ensuring that we
have a diagnostic handler installed and also adds support for handling linker
diagnostics.
2018-07-31 10:47:27 -07:00
Yury Delendik
e9509d78bd
Disable debug sections when optimization flags is set for LLD.
2018-07-30 19:58:26 -05:00
Irina Popa
69ed6b928c
rustc_codegen_llvm: fix ownership of DIBuilder.
2018-07-30 20:35:14 +03:00
Irina Popa
54c98ab0dd
rustc_codegen_llvm: fix ownership of Builder.
2018-07-30 20:35:11 +03:00
Irina Popa
265f2fa4de
rustc_codegen_llvm: fix tidy errors.
2018-07-30 20:35:08 +03:00
Irina Popa
ba006440ee
rustc_codegen_llvm: use safe references for ThinLTOData.
2018-07-30 20:34:51 +03:00
Irina Popa
2e3a6af7fa
rustc_codegen_llvm: use safe references for ThinLTOBuffer.
2018-07-30 20:10:47 +03:00
Irina Popa
ab4f93c742
rustc_codegen_llvm: use safe references for ModuleBuffer.
2018-07-30 20:10:45 +03:00
Irina Popa
b643e5144e
rustc_codegen_llvm: use safe references for RustArchiveMember.
2018-07-30 20:10:44 +03:00
Irina Popa
c7669dff2a
rustc_codegen_llvm: use safe references for ArchiveChild.
2018-07-30 20:10:43 +03:00
Irina Popa
e551ed9033
rustc_codegen_llvm: use safe references for ArchiveIterator.
2018-07-30 20:10:42 +03:00
Irina Popa
894467e5b4
rustc_codegen_llvm: use safe references for Linker.
2018-07-30 20:10:41 +03:00
Irina Popa
2c1d7fbb83
rustc_codegen_llvm: use safe references for SectionIterator.
2018-07-30 20:10:39 +03:00
Irina Popa
e22eebaf2b
rustc_codegen_llvm: use safe references for PassManager.
2018-07-30 20:10:38 +03:00
Irina Popa
0ab3444540
rustc_codegen_llvm: use safe references for OperandBundleDef.
2018-07-30 20:10:37 +03:00
Irina Popa
92af9694b9
rustc_codegen_llvm: use safe mutable references for output parameters.
2018-07-30 20:10:36 +03:00
Irina Popa
c1eeb69ce8
rustc_codegen_llvm: use safe references for RustString.
2018-07-30 20:10:34 +03:00
Irina Popa
44ae6f1909
rustc_codegen_llvm: use safe references for Twine, DiagnosticInfo, SMDiagnostic.
2018-07-30 20:10:33 +03:00
Irina Popa
41d7d8e35e
rustc_codegen_llvm: use safe references for Archive.
2018-07-30 20:10:32 +03:00
Irina Popa
0e3a705269
rustc_codegen_llvm: use safe references for TargetMachine.
2018-07-30 20:10:31 +03:00
Irina Popa
55af020194
rustc_codegen_llvm: use safe references for Pass.
2018-07-30 20:10:30 +03:00
Irina Popa
e9546601a1
rustc_codegen_llvm: use safe references for PassManagerBuilder.
2018-07-30 20:10:29 +03:00
Irina Popa
2f73cef5a3
rustc_codegen_llvm: use safe references for MemoryBuffer and ObjectFile.
2018-07-30 20:10:28 +03:00
Irina Popa
ebec156abf
rustc_codegen_llvm: remove more unused functions.
2018-07-30 20:10:25 +03:00
Irina Popa
f224441ed5
rustc_codegen_llvm: remove unused UseRef type.
2018-07-30 19:49:22 +03:00
Irina Popa
3eb50358e4
rustc_codegen_llvm: use safe references for BasicBlock.
2018-07-30 19:49:20 +03:00
Irina Popa
f375185314
rustc_codegen_llvm: use safe references for Value.
2018-07-30 19:49:18 +03:00
Irina Popa
8d17684341
rustc_codegen_llvm: remove _opaque suffix.
2018-07-30 19:32:22 +03:00
Irina Popa
1da26707d6
rustc_codegen_llvm: remove #![allow(dead_code)] from llvm.
2018-07-30 19:32:20 +03:00