about summary refs log tree commit diff
path: root/src/librustc_codegen_llvm/mono_item.rs
AgeCommit message (Collapse)AuthorLines
2020-08-30mv compiler to compiler/mark-84/+0
2020-08-06Incorporate tracing cratebishtpawan-1/+1
2020-07-20mir: `unused_generic_params` queryDavid Wood-3/+3
This commit implements the `unused_generic_params` query, an initial version of polymorphization which detects when an item does not use generic parameters and is being needlessly monomorphized as a result. Signed-off-by: David Wood <david@davidtw.co>
2020-04-07fix abuses of tykind::errmark-1/+1
2020-04-02nix rustc_target::abi::* reexport in ty::layoutMazdak Farrokhzad-3/+3
2020-03-31Address review feedbackWesley Wiser-1/+1
2020-03-30rustc -> rustc_middle part 3 (rustfmt)Mazdak Farrokhzad-2/+2
2020-03-30rustc -> rustc_middle part 2Mazdak Farrokhzad-4/+4
2020-01-06Auto merge of #67886 - Centril:rustc_hir_canon_imports, r=nagisabors-1/+1
Nix `rustc_hir` reexports in rustc::hir r? @Zoxc cc @Mark-Simulacrum
2020-01-05Rename Instance.ty to Instance.monomorphic_tyAaron Hill-1/+1
2020-01-05Remove rustc_hir reexports in rustc::hir.Mazdak Farrokhzad-1/+1
2019-12-22Format the worldMark Rousskov-20/+26
2019-12-11rustc: Link LLVM directly into rustc againAlex Crichton-0/+1
This commit builds on #65501 continue to simplify the build system and compiler now that we no longer have multiple LLVM backends to ship by default. Here this switches the compiler back to what it once was long long ago, which is linking LLVM directly to the compiler rather than dynamically loading it at runtime. The `codegen-backends` directory of the sysroot no longer exists and all relevant support in the build system is removed. Note that `rustc` still supports a dynamically loaded codegen backend as it did previously, it just no longer supports dynamically loaded codegen backends in its own sysroot. Additionally as part of this the `librustc_codegen_llvm` crate now once again explicitly depends on all of its crates instead of implicitly loading them through the sysroot. This involved filling out its `Cargo.toml` and deleting all the now-unnecessary `extern crate` annotations in the header of the crate. (this in turn required adding a number of imports for names of macros too). The end results of this change are: * Rustbuild's build process for the compiler as all the "oh don't forget the codegen backend" checks can be easily removed. * Building `rustc_codegen_llvm` is much simpler since it's simply another compiler crate. * Managing the dependencies of `rustc_codegen_llvm` is much simpler since it's "just another `Cargo.toml` to edit" * The build process should be a smidge faster because there's more parallelism in the main rustc build step rather than splitting `librustc_codegen_llvm` out to its own step. * The compiler is expected to be slightly faster by default because the codegen backend does not need to be dynamically loaded. * Disabling LLVM as part of rustbuild is still supported, supporting multiple codegen backends is still supported, and dynamic loading of a codegen backend is still supported.
2019-12-03rustc_target: add abi::call::Conv::Rust distinct from Conv::C.Eduard-Mihai Burtescu-1/+1
2019-12-03rustc_codegen_llvm: take an Instance in attributes::from_fn_attrs.Eduard-Mihai Burtescu-13/+3
2019-12-03rustc: compute FnAbi's for virtual calls through FnAbi::of_instance.Eduard-Mihai Burtescu-1/+1
2019-12-03rustc_codegen_ssa: use FnAbi::of_instance wherever possible.Eduard-Mihai Burtescu-9/+7
2019-12-03rustc_codegen_ssa: take a FnAbi instead of a FnSig in declare_fn.Eduard-Mihai Burtescu-5/+11
2019-06-02remove reexport of rustc::ty::InstanceMark Mansi-2/+1
2019-02-27Support defining C compatible variadic functionsDan Robertson-4/+4
Add support for defining C compatible variadic functions in unsafe rust with extern "C".
2019-02-18librustc_codegen_llvm => 2018Taiki Endo-6/+6
2018-12-25Remove licensesMark Rousskov-10/+0
2018-12-12rustc: Switch `extern` functions to abort by default on panicAlex Crichton-1/+6
This was intended to land way back in 1.24, but it was backed out due to breakage which has long since been fixed. An unstable `#[unwind]` attribute can be used to tweak the behavior here, but this is currently simply switching rustc's internal default to abort-by-default if an `extern` function panics, making our codegen sound primarily (as currently you can produce UB with safe code) Closes #52652
2018-12-07Various minor/cosmetic improvements to codeAlexander Regueiro-1/+1
2018-11-16[eddyb] rustc_codegen_ssa: rename `interfaces` to `traits`.Eduard-Mihai Burtescu-1/+1
2018-11-16Finished moving backend-agnostic code to rustc_codegen_ssaDenis Merigoux-4/+1
2018-11-16Great separation of librustc_codegen_llvm: librustc_codegen_ssa compilesDenis Merigoux-98/+0
2018-11-16Preparing the generalization of base:compile_coodegen_unitDenis Merigoux-10/+9
2018-11-16Generalized mono_item.rs and base.rs:codegen_instanceDenis Merigoux-73/+78
2018-11-16Generalized mir::codegen_mir (and all subsequent functions)Denis Merigoux-6/+4
2018-11-16Added StaticMethods traitDenis Merigoux-2/+2
2018-10-24Move codegen_llvm::common::ty_fn_sig into rustc::ty::Instance.Masaki Hara-4/+2
2018-10-24Make declare_fn accept PolyFnSig instead of Ty.Masaki Hara-1/+3
2018-10-24Make declare_fn aware of vtable shims.Masaki Hara-1/+1
2018-10-08codegen_llvm: whitespace & formatting improvementsljedrz-2/+2
2018-08-23AMDGPU ignores `noinline` when it slaps `alwaysinline` everywhere.Richard Diamond-1/+1
Allow target specs to disable that attribute.
2018-08-16Set more llvm function attributes for __rust_tryAlex Crichton-1/+1
This shim is generated elsewhere in the compiler so this commit adds support to ensure it goes through similar paths as the rest of the compiler to set llvm function attributes like target features. cc #53372
2018-08-11Remove statics field from CodegenCxbjorn3-1/+0
2018-07-16rustc: Use link_section, not wasm_custom_sectionAlex Crichton-12/+3
This commit transitions definitions of custom sections on the wasm target from the unstable `#[wasm_custom_section]` attribute to the already-stable-for-other-targets `#[link_section]` attribute. Mostly the same restrictions apply as before, except that this now applies only to statics. Closes #51088
2018-07-16ItemKindcsmoe-1/+1
2018-07-10Upgrade to LLVM's master branch (LLVM 7)Alex Crichton-0/+7
This commit upgrades the main LLVM submodule to LLVM's current master branch. The LLD submodule is updated in tandem as well as compiler-builtins. Along the way support was also added for LLVM 7's new features. This primarily includes the support for custom section concatenation natively in LLD so we now add wasm custom sections in LLVM IR rather than having custom support in rustc itself for doing so. Some other miscellaneous changes are: * We now pass `--gc-sections` to `wasm-ld` * The optimization level is now passed to `wasm-ld` * A `--stack-first` option is passed to LLD to have stack overflow always cause a trap instead of corrupting static data * The wasm target for LLVM switched to `wasm32-unknown-unknown`. * The syntax for aligned pointers has changed in LLVM IR and tests are updated to reflect this. * The `thumbv6m-none-eabi` target is disabled due to an [LLVM bug][llbug] Nowadays we've been mostly only upgrading whenever there's a major release of LLVM but enough changes have been happening on the wasm target that there's been growing motivation for quite some time now to upgrade out version of LLD. To upgrade LLD, however, we need to upgrade LLVM to avoid needing to build yet another version of LLVM on the builders. The revision of LLVM in use here is arbitrarily chosen. We will likely need to continue to update it over time if and when we discover bugs. Once LLVM 7 is fully released we can switch to that channel as well. [llbug]: https://bugs.llvm.org/show_bug.cgi?id=37382
2018-07-07Fix some errorsbjorn3-1/+0
2018-07-07Move some functions out of rustc_codegen_llvm and fix metadata_only backendbjorn3-1/+1
2018-07-02incr.comp.: Take names of children into account when computing the ICH of a ↵Michael Woerister-3/+2
module's HIR.
2018-05-17Rename trans to codegen everywhere.Irina Popa-0/+193