summary refs log tree commit diff
path: root/src/librustc_codegen_llvm/common.rs
AgeCommit message (Collapse)AuthorLines
2020-01-02Normalize `syntax::symbol` imports.Mazdak Farrokhzad-1/+1
2019-12-22Format the worldMark Rousskov-77/+50
2019-12-201. ast::Mutability::{Mutable -> Mut, Immutable -> Not}.Mazdak Farrokhzad-1/+1
2. mir::Mutability -> ast::Mutability.
2019-12-11rustc: Link LLVM directly into rustc againAlex Crichton-0/+2
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-06Rename to `then_some` and `then`varkor-1/+1
2019-12-06Use `to_option` in various placesvarkor-5/+1
2019-10-27Panicking infra uses &core::panic::Location.Adam Perry-18/+0
This allows us to remove `static_panic_msg` from the SSA<->LLVM boundary, along with its fat pointer representation for &str. Also changes the signature of PanicInfo::internal_contructor to avoid copying. Closes #65856.
2019-10-27Implement core::intrinsics::caller_location.Adam Perry-0/+7
Returns a `&core::panic::Location` corresponding to where it was called, also making `Location` a lang item.
2019-10-13Improve type safetybjorn3-21/+13
2019-10-13Remove MiscMethods::instancesbjorn3-1/+1
2019-10-13s/FuncId/Functionbjorn3-1/+1
2019-10-13Remove is_const_integral method from ConstMethodsbjorn3-10/+14
2019-10-13Introduce FuncId backend typebjorn3-0/+2
2019-09-05Rollup merge of #64003 - Dante-Broggi:place-align-in-layout, r=matthewjasperMazdak Farrokhzad-1/+1
place: Passing `align` = `layout.align.abi`, when also passing `layout` Of the calls changed: 7/12 use `align` = `layout.align.abi`. `from_const_alloc` uses `alloc.align`, but that is `assert_eq!` to `layout.align.abi`. only 4/11 use something interesting for `align`.
2019-09-04Remove `LocalInternedString` uses from `librustc_codegen_llvm`.Nicholas Nethercote-6/+7
2019-08-29`new_sized` is mostly used without alignDante-Broggi-1/+1
so rename it `new_sized_aligned`. 6/11 use `align` = `layout.align.abi`. `from_const_alloc` uses `alloc.align`, but that is `assert_eq!` to `layout.align.abi`. only 4/11 use something interesting for `align`.
2019-08-17Cast only where necessaryOliver Scherer-4/+5
2019-08-16Do not generate allocations for zero sized allocationsOliver Scherer-8/+13
2019-08-02assert consistencyRalf Jung-3/+3
2019-08-02CTFE: simplify Value type by not checking for alignmentRalf Jung-2/+2
2019-07-20Remove vector fadd/fmul reduction workaroundsNikita Popov-19/+0
The bugs that this was working around have been fixed in LLVM 9.
2019-07-09Fix float add/mul reduction codegenNikita Popov-0/+4
The accumulator is now respected for unordered reductions.
2019-07-06Remove use of mem::uninitialized in code_gen crateLzu Tao-2/+1
2019-07-04Permit use of mem::uninitialized via allow(deprecated)Mark Rousskov-0/+1
2019-06-19Weave the alignment through `ByRef`Oliver Scherer-3/+4
2019-05-30light refactoring of global AllocMapRalf Jung-4/+4
* rename AllocKind -> GlobalAlloc. This stores the allocation itself, not just its kind. * rename the methods that allocate stuff to have consistent names.
2019-05-26rename Scalar::Bits to Scalar::Raw and bits field to dataRalf Jung-3/+3
2019-04-21Change return type of `TyCtxt::is_static` to boolVadim Petrochenkov-1/+1
Add `TyCtxt::is_mutable_static`
2019-03-29Remove const_{cstr,str_slice,get_elt,get_real} and is_const_real methods ↵bjorn3-66/+66
from cg_ssa This introduces the static_panic_msg trait method to StaticBuilderMethods.
2019-03-29Remove const_{fat_ptr,array,vector,bytes} from cg_ssabjorn3-26/+28
2019-02-18librustc_codegen_llvm => 2018Taiki Endo-8/+8
2018-12-25Remove licensesMark Rousskov-10/+0
2018-12-13Auto merge of #56461 - oli-obk:alloc_ids, r=RalfJungbors-6/+6
Some cleanups around `AllocId` management r? @eddyb cc @RalfJung
2018-12-07Various minor/cosmetic improvements to codeAlexander Regueiro-1/+1
2018-12-04s/alloc_type/alloc_kind/Oliver Scherer-2/+2
2018-12-03s/AllocType/AllocKind/Oliver Scherer-4/+4
2018-11-29Rename static_bitcast to const_bitcastbjorn3-5/+5
2018-11-29Rename StaticMethods::static_ptrcast to ConstMethods::const_ptrcastbjorn3-0/+4
2018-11-29Some refactoringsbjorn3-1/+0
2018-11-22rustc_target: avoid using AbiAndPrefAlign where possible.Eduard-Mihai Burtescu-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-10/+3
2018-11-16Great separation of librustc_codegen_llvm: librustc_codegen_ssa compilesDenis Merigoux-85/+0
2018-11-16Beginning of moving all backend-agnostic code to rustc_codegen_ssaDenis Merigoux-1/+1
2018-11-16[eddyb/rebase cleanup] abstracted FuncletEduard-Mihai Burtescu-37/+12
2018-11-16Moved common.rs enumsDenis Merigoux-75/+1
2018-11-16Starting to move backend-agnostic code into codegen_utilsDenis Merigoux-13/+0
IntPredicate moved
2018-11-16Move doc to trait declarationsDenis Merigoux-6/+0
2018-11-16Generalized mir::codegen_mir (and all subsequent functions)Denis Merigoux-32/+115
2018-11-16Generalized base::unsized_infoDenis Merigoux-6/+4