about summary refs log tree commit diff
path: root/src/librustc_codegen_ssa
AgeCommit message (Collapse)AuthorLines
2019-01-05Auto merge of #57145 - RalfJung:panic-if-uninhabited, r=alexcrichtonbors-46/+50
panic when calling MaybeUninhabited::into_inner on uninhabited type I do this by adding an internal-only intrinsic `panic_if_uninhabited`. I have no idea what I am doing here, just mindlessly copying code around, so please review carefully!
2019-01-05Auto merge of #56837 - arielb1:nonprincipal-trait-objects, r=nikomatsakisbors-4/+11
Add support for trait-objects without a principal The hard-error version of #56481 - should be merged after we do something about the `traitobject` crate. Fixes #33140. Fixes #57057. r? @nikomatsakis
2019-01-04add support for principal-less trait object typesAriel Ben-Yehuda-4/+11
should be a pure refactoring.
2019-01-01`<&'tcx ty::Const as Deref>::deref`Oliver Scherer-4/+4
2019-01-01Add `unwrap_usize` to `LazyConst`, tooOliver Scherer-3/+3
2019-01-01Move the `Unevaluated` constant arm upwards in the type structureOliver Scherer-9/+8
2018-12-27use a better way to get at the type parameterRalf Jung-6/+1
2018-12-27panic when calling MaybeUninhabited::into_inner on uninhabited typeRalf Jung-46/+55
2018-12-25Remove licensesMark Rousskov-379/+0
2018-12-24Rollup merge of #57074 - Zoxc:pq-rec-limits, r=oli-obkMazdak Farrokhzad-0/+2
Fix recursion limits r? @michaelwoerister
2018-12-23Fix recursion limitsJohn Kåre Alsaker-0/+2
2018-12-21Fix alignment for array indexingNikita Popov-3/+13
We need to reduce the alignment with the used offset. If the offset isn't known, we need to reduce with the element size to support arbitrary offsets.
2018-12-18treat ref-to-raw cast like a reborrow: do a special kind of retagRalf Jung-1/+0
2018-12-17Auto merge of #56642 - nikic:llvm-6, r=alexcrichtonbors-25/+2
Bump minimum required LLVM version to 6.0 Based on the discussion in #55842, while the overall position of Rust wrt LLVM continues to be contentious, there does seem to be a consensus that there is no need for continued support of LLVM 5. This PR bumps our version requirement to LLVM 6.0 and makes Travis run against that. I hope that this is going to unblock #52694. If I understand correctly, while this issue still exists in LLVM 6, Ubuntu has backported the relevant patch. r? @alexcrichton
2018-12-14Rollup merge of #56562 - pnkfelix:issue-55465-update-libc-version, ↵kennytm-1/+1
r=alexcrichton Update libc version required by rustc This is meant to be an easy-to-backport fix for #55465
2018-12-14Auto merge of #56351 - davidtwco:issue-55396-stabilize-linker-flavor, r=nagisabors-5/+1
Stabilize `linker-flavor` flag. Part of #55396. This commit moves the linker-flavor flag from a debugging option to a codegen option, thus stabilizing it. There are no feature flags associated with this flag. r? @nagisa
2018-12-13Stabilize `linker-flavor` flag.David Wood-5/+1
This commit moves the linker-flavor flag from a debugging option to a codegen option, thus stabilizing it. There are no feature flags associated with this flag.
2018-12-12Increase required version for crates.io `libc` to get fix from PR ↵Felix S. Klock II-1/+1
rust-lang/libc#1057. Part of issue #55465
2018-12-12Remove `Session::sysroot()`.Nicholas Nethercote-2/+1
Instead of maybe storing its own sysroot and maybe deferring to the one in `Session::opts`, just clone the latter when necessary so one is always directly available. This removes the need for the getter.
2018-12-11Remove env_alloca hackNikita Popov-25/+2
This is no longer necessary for LLVM >= 6.
2018-12-07Various minor/cosmetic improvements to codeAlexander Regueiro-16/+16
2018-12-07Auto merge of #56502 - Zoxc:hir-func, r=eddybbors-11/+11
Use a function to access the Hir map to be able to turn it into a query later r? @eddyb
2018-12-07Auto merge of #56487 - nikic:discard-modules-earlier, r=alexcrichtonbors-94/+139
Discard LLVM modules earlier when performing ThinLTO Currently ThinLTO is performed by first compiling all modules (and keeping them in memory), and then serializing them into ThinLTO buffers in a separate, synchronized step. Modules are later read back from ThinLTO buffers when running the ThinLTO optimization pipeline. We can also find the following comment in `lto.rs`: // FIXME: right now, like with fat LTO, we serialize all in-memory // modules before working with them and ThinLTO. We really // shouldn't do this, however, and instead figure out how to // extract a summary from an in-memory module and then merge that // into the global index. It turns out that this loop is by far // the most expensive portion of this small bit of global // analysis! I don't think that what is suggested here is the right approach: One of the primary benefits of using ThinLTO over ordinary LTO is that it's not necessary to keep all the modules (merged or not) in memory for the duration of the linking step. However, we currently don't really make use of this (at least for crate-local ThinLTO), because we keep all modules in memory until the start of the LTO step. This PR changes the implementation to instead perform the serialization into ThinLTO buffers directly after the initial optimization step. Most of the changes here are plumbing to separate out fat and thin lto handling in `write.rs`, as these now use different intermediate artifacts. For fat lto this will be in-memory modules, for thin lto it will be ThinLTO buffers. r? @alexcrichton
2018-12-06Use a function to access the Hir map to be able to turn it into a query laterJohn Kåre Alsaker-11/+11
2018-12-06Rollup merge of #56500 - ljedrz:cleanup_rest_of_const_lifetimes, r=zackmdavisPietro Albini-1/+1
cleanup: remove static lifetimes from consts A follow-up to https://github.com/rust-lang/rust/pull/56497.
2018-12-04Serialize modules into ThinBuffer after initial optimizationNikita Popov-16/+24
Instead of keeping all modules in memory until thin LTO and only serializing them then, serialize the module immediately after it finishes optimizing.
2018-12-04Remove unnecessary parts of run_fat_lto signatureNikita Popov-4/+5
Fat LTO merges into one module, so only return one module.
2018-12-04Separate out methods for running thin and fat LTONikita Popov-8/+14
2018-12-04Separate codepaths for fat and thin LTO in write.rsNikita Popov-27/+56
These are going to have different intermediate artifacts, so create separate codepaths for them.
2018-12-04Refactor LTO type determinationNikita Popov-35/+41
Instead of only determining whether some form of LTO is necessary, determine whether thin, fat or no LTO is necessary. I've rewritten the conditions in a way that I think is more obvious, i.e. specified LTO type + additional preconditions.
2018-12-04Extract free_worker closureNikita Popov-23/+18
2018-12-04cleanup: remove static lifetimes from constsljedrz-1/+1
2018-12-03codegen_llvm_back: improve allocationsljedrz-3/+4
2018-12-02Auto merge of #56198 - bjorn3:cg_ssa_refactor, r=eddybbors-276/+187
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-01Rollup merge of #56349 - davidtwco:issue-55396-inference-extension, r=nagisakennytm-1/+5
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-11-30proc_macro: introduce a "bridge" between clients (proc macros) and servers ↵Eduard-Mihai Burtescu-1/+1
(compiler front-ends).
2018-11-29Only consider stem when extension is exe.David Wood-1/+5
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-29Move get_static from CodegenCx to Builderbjorn3-4/+8
2018-11-29Use implicit deref instead of BuilderMethods::cx()bjorn3-105/+104
2018-11-29Require Deref to CodegenCx for HasCodegenbjorn3-1/+3
2018-11-29Remove static_addr_of_mut from cg_ssabjorn3-1/+0
2018-11-29Rename StaticMethods::static_ptrcast to ConstMethods::const_ptrcastbjorn3-3/+3
2018-11-29Remove static_bitcast from cg_ssabjorn3-1/+0
2018-11-29Move IntrinsicCallMethods::call_overflow_intrinsics to ↵bjorn3-18/+19
BuilderMethods::checked_binop
2018-11-29Remove call_lifetime_intrinsic from cg_ssabjorn3-10/+4
2018-11-29Use BackendTypes instead of Backend or HasCodegen in a few placesbjorn3-18/+18
2018-11-29Rustfmt on cg_ssa/traitsbjorn3-3/+7
2018-11-29Don't use llvm intrinsic names in cg_ssabjorn3-106/+22
2018-11-29Remove static_replace_all_uses and statics_to_rauw from cg_ssabjorn3-2/+0
2018-11-29Make ConstMethods and StaticMethods require BackendTypes instead of Backendbjorn3-6/+6