about summary refs log tree commit diff
path: root/src/librustc_codegen_llvm
AgeCommit message (Collapse)AuthorLines
2019-12-03rustc_codegen_llvm: take an Instance in attributes::from_fn_attrs.Eduard-Mihai Burtescu-36/+24
2019-12-03rustc_codegen_llvm: rewrite debuginfo::get_function_signature to use FnAbi.Eduard-Mihai Burtescu-33/+12
2019-12-03rustc: take a PolyFnSig instead of an FnSig in FnAbi::of_fn_ptr.Eduard-Mihai Burtescu-8/+4
2019-12-03rustc: rename FnAbi::new to FnAbi::of_fn_ptr.Eduard-Mihai Burtescu-3/+3
2019-12-03rustc: compute FnAbi's for virtual calls through FnAbi::of_instance.Eduard-Mihai Burtescu-2/+2
2019-12-03rustc_codegen_ssa: use FnAbi::of_instance wherever possible.Eduard-Mihai Burtescu-23/+29
2019-12-03rustc_codegen_llvm: move NoReturn attribute to apply_attrs_llfn.Eduard-Mihai Burtescu-7/+5
2019-12-03rustc_codegen_ssa: take a FnAbi instead of a FnSig in declare_fn.Eduard-Mihai Burtescu-37/+42
2019-12-03rustc_codegen_ssa: remove define_fn and define_internal_fn.Eduard-Mihai Burtescu-23/+3
2019-12-03Change linker for x86_64-fortanix-unknown-sgx to rust-lldParth Sane-2/+4
For SGX, the relocation using the relocation table is done by the code in rust/src/libstd/sys/sgx/abi/reloc.rs and this code should not require relocation. Setting RelaxELFRelocations flag if allows this to happen, hence adding a Target Option for it.
2019-12-02Update the minimum external LLVM to 7Josh Stone-26/+5
LLVM 7 is over a year old, which should be plenty for compatibility. The last LLVM 6 holdout was llvm-emscripten, which went away in #65501. I've also included a fix for LLVM 8 lacking `MemorySanitizerOptions`, which was broken by #66522.
2019-12-02Use Module::print() instead of a PrintModulePassVictor Ding-10/+6
llvm::Module has a print() method. It is unnecessary to create a pass just for the purpose of printing LLVM IR.
2019-12-02Rollup merge of #66918 - makotokato:aarch32-crc-crypto, r=petrochenkovMazdak Farrokhzad-0/+2
Add crc and crypto to target feature whitelist on arm aarch32 (ARMv8 32-bit) supports crc and crypto.
2019-12-01rustc_plugin: Remove support for plugins adding LLVM passesVadim Petrochenkov-14/+0
2019-11-30Rollup merge of #66895 - Centril:rustc_feature, r=oli-obkMazdak Farrokhzad-1/+2
Feature gating *declarations* => new crate `rustc_feature` This PR moves the data-oriented parts of feature gating into its own crate, `rustc_feature`. The parts consist of some data types as well as `accepted`, `active`, `removed`, and `builtin_attrs`. Feature gate checking itself remains in `syntax::feature_gate::check`. The parts which define how to emit feature gate errors could probably be moved to `rustc_errors` or to the new `rustc_session` crate introduced in #66878. The visitor itself could probably be moved as a pass in `rustc_passes` depending on how the dependency edges work out. The PR also contains some drive-by cleanup of feature gate checking. As such, the PR probably best read commit-by-commit. r? @oli-obk cc @petrochenkov cc @Mark-Simulacrum
2019-11-30Add crc and crypto to target feature whitelist on armMakoto Kato-0/+2
2019-11-30move UnstableFeatures -> rustc_featureMazdak Farrokhzad-1/+2
2019-11-29Use LLVMAddAnalysisPasses instead of Rust's wrapperVictor Ding-5/+6
LLVM exposes a C API `LLVMAddAnalysisPasses` and hence Rust's own wrapper `LLVMRustAddAnalysisPasses` is not needed anymore.
2019-11-27Rollup merge of #66534 - immunant:multiple_global_decls, r=eddybTyler Mandry-3/+5
Allow global references via ForeignItem and Item for the same symbol name during LLVM codegen Combining CGUs can result in code that references a static variable through both an Item and a ForeignItem with the same name. We don't care that the global was already created by a ForeignItem reference when we see the Item reference, as long as the LLVM types of the ForeignItem and Item match. Fixes #66464
2019-11-27rustc: move debug info from LocalDecl and UpvarDecl into a dedicated ↵Eduard-Mihai Burtescu-24/+82
VarDebugInfo.
2019-11-26Rollup merge of #66719 - Mark-Simulacrum:int-normalization, r=CentrilTyler Mandry-4/+4
Store pointer width as u32 on Config This removes the dependency on IntTy, UintTy from Session. It's not obviously a win, but it seems a bit odd to store the AST IntTy/UintTy in Session, rather we store the pointer width as an integer and add normalization methods to IntTy and UintTy.
2019-11-24Store ptr_width as u32 on ConfigMark Rousskov-4/+4
This removes the dependency on IntTy, UintTy from Session.
2019-11-22Create sanitizer passes in a separate functionTomasz Miąsko-20/+26
2019-11-22Add support for tracking origins of uninitialized memoryTomasz Miąsko-2/+2
2019-11-22Add support for sanitizer recoveryTomasz Miąsko-2/+1
2019-11-22Move sanitizer passes creation from ssa to llvmTomasz Miąsko-4/+30
2019-11-21Applied suggestions from code review.Alexander Regueiro-15/+15
2019-11-21Aggregation of drive-by cosmetic changes.Alexander Regueiro-136/+132
2019-11-21Rollup merge of #66515 - Centril:cheaper-inline-asm, r=oli-obkMazdak Farrokhzad-1/+1
Reduce size of `hir::Expr` by boxing more of `hir::InlineAsm` r? @oli-obk
2019-11-21Rollup merge of #66468 - RalfJung:simd-cleanup, r=oli-obkMazdak Farrokhzad-13/+14
Cleanup Miri SIMD intrinsics r? @oli-obk @eddyb Cc @gnzlbg
2019-11-21reduce size of hir::ExprKindMazdak Farrokhzad-1/+1
2019-11-18Allow different global references to the same nameStephen Crane-3/+5
Combining CGUs can result in code that references a static variable through both an Item and a ForeignItem with the same name. We don't care that the global was already created by a ForeignItem reference when we see the Item reference, as long as the LLVM types of the ForeignItem and Item match. Fixes #66464
2019-11-18Generate DWARF address ranges for faster lookupsJosh Stone-0/+3
This adds a new option `-Zgenerate-arange-section`, enabled by default, corresponding to LLVM's `-generate-arange-section`. This creates a `.debug_aranges` section with DWARF address ranges, which some tools depend on to optimize address lookups (elfutils [22288], [25173]). This only has effect when debuginfo is enabled, and the additional data is small compared to the other debug sections. For example, libstd.so with full debuginfo is about 11MB, with just 61kB in aranges. [22288]: https://sourceware.org/bugzilla/show_bug.cgi?id=22288 [25173]: https://sourceware.org/bugzilla/show_bug.cgi?id=25173 Closes #45246.
2019-11-16avoid some castsRalf Jung-9/+6
2019-11-16make simd_size return a u64Ralf Jung-9/+13
2019-11-14Auto merge of #66378 - rkruppe:revert-pr-65134, r=pnkfelixbors-2/+3
Revert #65134 To stop giving people on nightly reasons to `allow(improper_ctypes)` while tweaks to the lint are being prepared. cc #66220
2019-11-13Revert "Auto merge of #65134 - ↵Robin Kruppe-2/+3
davidtwco:issue-19834-improper-ctypes-in-extern-C-fn, r=rkruppe" This reverts commit 3f0e16473de5ec010f44290a8c3ea1d90e0ad7a2, reversing changes made to 61a551b4939ec1d5596e585351038b8fbd0124ba.
2019-11-12Rename in librustc_codegen_llvm.Camille GILLOT-2/+2
2019-11-10Merge hir::Mutability into ast::Mutability.Camille GILLOT-1/+1
2019-11-07rustc_target: inline abi::FloatTy into abi::Primitive.Eduard-Mihai Burtescu-8/+8
2019-11-07syntax: use distinct FloatTy from rustc_target.Mazdak Farrokhzad-6/+6
We also sever syntax's dependency on rustc_target as a result. This should slightly improve pipe-lining. Moreover, some cleanup is done in related code.
2019-11-06Auto merge of #65134 - davidtwco:issue-19834-improper-ctypes-in-extern-C-fn, ↵bors-3/+2
r=rkruppe improper_ctypes: `extern "C"` fns cc #19834. Fixes #65867. This pull request implements the change [described in this comment](https://github.com/rust-lang/rust/issues/19834#issuecomment-466671572). cc @rkruppe @varkor @shepmaster
2019-11-06Rollup merge of #66062 - smaeul:patch/pic-level, r=estebankMazdak Farrokhzad-0/+5
Configure LLVM module PIC level As of LLVM 9, this is required for 32-bit PowerPC to properly generate PLT references. Previously, only BigPIC was supported; now LLVM supports both BigPIC and SmallPIC, and there is no default value provided.
2019-11-06Rollup merge of #65776 - nnethercote:rename-LocalInternedString-and-more, ↵Mazdak Farrokhzad-4/+4
r=estebank Rename `LocalInternedString` and more This PR renames `LocalInternedString` as `SymbolStr`, removes an unnecessary `impl` from it, improves comments, and cleans up some `SymbolStr` uses. r? @estebank
2019-11-05Rollup merge of #65953 - keystone-enclave:llvm_abiname, r=alexcrichtonPietro Albini-1/+3
Allow specifying LLVM's MCTargetOptions::ABIName in target specification files This addresses #65024, as it allows RISC-V target specification files to set `"llvm-abiname": "lp64d"`. Other languages (read: C) usually expose this codegen parameter under a compiler argument like `-mabi=<XYZ>`.
2019-11-05codegen_llvm: remove unnecessary "extern C"David Wood-4/+1
Signed-off-by: David Wood <david@davidtw.co>
2019-11-05improper_ctypes: `extern "C"` fnsDavid Wood-0/+2
2019-11-05Auto merge of #66109 - pietroalbini:rollup-2npidna, r=pietroalbinibors-0/+1
Rollup of 10 pull requests Successful merges: - #65136 (Update codegen option documentation.) - #65574 (docs: improve disclaimer regarding LinkedList) - #65720 (Add FFI bindings for LLVM's Module::getInstructionCount()) - #65905 ([doc] fixes for unix/vxworks `OpenOptionsExt::mode`) - #65962 (Fix logic in example.) - #66019 (Improved std::iter::Chain documentation) - #66038 (doc(str): show example of chars().count() under len()) - #66042 (Suggest correct code when encountering an incorrect trait bound referencing the current trait) - #66073 (Do not needlessly write-lock) - #66096 (Add a failing UI test for multiple loops of all kinds in a `const`) Failed merges: r? @ghost
2019-11-05Rollup merge of #65720 - icefoxen:LLVMgetInstructionCount, r=rkruppePietro Albini-0/+1
Add FFI bindings for LLVM's Module::getInstructionCount() Just to make it usable for profiling and such inside rustc itself. It was vaguely useful in https://wiki.alopex.li/WhereRustcSpendsItsTime and I figured I might as well upstream it; I may or may not ever get around to doing more with it (hopefully I will), but it may be useful for others.
2019-11-05Auto merge of #65938 - eddyb:fn-abi-rename, r=oli-obkbors-37/+37
rustc_target: rename {Fn,Arg}Type to {Fn,Arg}Abi. I was trying to tweak the API of `FnType` (now `FnAbi`) and the name kept bothering me. `FnAbi` is to a function signature a bit like a layout is to a type, so the name still isn't perfect yet, but at least it doesn't have the misleading `Type` in it anymore. If this can't land I think I can continue my original refactor without it, so I'm not strongly attached to it. r? @nagisa cc @oli-obk