summary refs log tree commit diff
path: root/compiler/rustc_codegen_cranelift/src/lib.rs
AgeCommit message (Collapse)AuthorLines
2022-10-23Merge commit '266e96785ab71834b917bf474f130a6d8fdecd4b' into ↵bjorn3-3/+11
sync_cg_clif-2022-10-23
2022-08-24Merge commit 'e9d1a0a7b0b28dd422f1a790ccde532acafbf193' into ↵bjorn3-24/+31
sync_cg_clif-2022-08-24
2022-07-28Introduce an ArchiveBuilderBuilderbjorn3-1/+1
This avoids monomorphizing all linker code for each codegen backend and will allow passing in extra information to the archive builder from the codegen backend.
2022-07-25Merge commit 'c19edfd71a1d0ddef86c2c67fdb40718d40a72b4' into ↵bjorn3-1/+6
sync_cg_clif-2022-07-25
2022-07-13Rollup merge of #99155 - Amanieu:unstable-target-features, r=davidtwcoDylan DPC-1/+1
Keep unstable target features for asm feature checking Inline assembly uses the target features to determine which registers are available on the current target. However it needs to be able to access unstable target features for this. Fixes #99071
2022-07-11Keep unstable target features for asm feature checkingAmanieu d'Antras-1/+1
Inline assembly uses the target features to determine which registers are available on the current target. However it needs to be able to access unstable target features for this. Fixes #99071
2022-07-06Update TypeVisitor pathsAlan Egerton-1/+1
2022-04-22Merge commit 'f2cdd4a78d89c009342197cf5844a21f8aa813df' into ↵bjorn3-2/+0
sync_cg_clif-2022-04-22
2022-03-20Merge commit '370c397ec9169809e5ad270079712e0043514240' into ↵bjorn3-5/+7
sync_cg_clif-2022-03-20
2022-03-02rename ErrorReported -> ErrorGuaranteedmark-3/+3
2021-12-30Merge commit '40b00f4200fbdeefd11815398cb46394b8cb0a5e' into ↵bjorn3-1/+1
sync_cg_clif-2021-12-30
2021-12-20Merge commit '97e504549371d7640cf011d266e3c17394fdddac' into ↵bjorn3-16/+15
sync_cg_clif-2021-12-20
2021-12-13Use `OutputFilenames` to generate output file for `-Zllvm-time-trace`Tomasz Miąsko-0/+1
The resulting profile will include the crate name and will be stored in the `--out-dir` directory. This implementation makes it convenient to use LLVM time trace together with cargo, in the contrast to the previous implementation which would overwrite profiles or store them in `.cargo/registry/..`.
2021-09-30Move EncodedMetadata to rustc_metadata.Camille GILLOT-1/+1
2021-09-19Merge commit '61667dedf55e3e5aa584f7ae2bd0471336b92ce9' into ↵bjorn3-2/+2
sync_cg_clif-2021-09-19
2021-09-07Move the dataflow framework to its own crate.Camille GILLOT-1/+0
2021-09-05Auto merge of #88499 - eddyb:layout-off, r=nagisabors-2/+2
Provide `layout_of` automatically (given tcx + param_env + error handling). After #88337, there's no longer any uses of `LayoutOf` within `rustc_target` itself, so I realized I could move the trait to `rustc_middle::ty::layout` and redesign it a bit. This is similar to #88338 (and supersedes it), but at no ergonomic loss, since there's no funky `C: LayoutOf<Ty = Ty>` -> `Ty: TyAbiInterface<C>` generic `impl` chain, and each `LayoutOf` still corresponds to one `impl` (of `LayoutOfHelpers`) for the specific context. After this PR, this is what's needed to get `trait LayoutOf` (with the `layout_of` method) implemented on some context type: * `TyCtxt`, via `HasTyCtxt` * `ParamEnv`, via `HasParamEnv` * a way to transform `LayoutError`s into the desired error type * an error type of `!` can be paired with having `cx.layout_of(...)` return `TyAndLayout` *without* `Result<...>` around it, such as used by codegen * this is done through a new `LayoutOfHelpers` trait (and so is specifying the type of `cx.layout_of(...)`) When going through this path (and not bypassing it with a manual `impl` of `LayoutOf`), the end result is that only the error case can be customized, the query itself and the success paths are guaranteed to be uniform. (**EDIT**: just noticed that because of the supertrait relationship, you cannot actually implement `LayoutOf` yourself, the blanket `impl` fully covers all possible context types that could ever implement it) Part of the motivation for this shape of API is that I've been working on querifying `FnAbi::of_*`, and what I want/need to introduce for that looks a lot like the setup in this PR - in particular, it's harder to express the `FnAbi` methods in `rustc_target`, since they're much more tied to `rustc` concepts. r? `@nagisa` cc `@oli-obk` `@bjorn3`
2021-09-02rustc_target: move `LayoutOf` to `ty::layout`.Eduard-Mihai Burtescu-2/+2
2021-08-27Path remapping: Make behavior of diagnostics output dependent on presence of ↵Michael Woerister-1/+1
--remap-path-prefix.
2021-08-06Merge commit '05677b6bd6c938ed760835d9b1f6514992654ae3' into ↵bjorn3-9/+17
sync_cg_clif-2021-08-06
2021-07-16Consider all fields when comparing DllImports, to remove nondetermininsm in ↵Richard Cobbe-3/+1
multiple-definitions test
2021-07-07Merge commit '3a31c6d8272c14388a34622193baf553636fe470' into ↵bjorn3-5/+9
sync_cg_clif-2021-07-07
2021-07-06Don't pass local_crate_name to link_binary separatelybjorn3-1/+0
It is already part of CodegenResults
2021-06-28Update other codegens to use tcx managed vtable allocations.Charles Lew-1/+1
2021-06-10Auto merge of #85910 - cjgillot:no-meta-version, r=Aaron1011bors-0/+1
Drop metadata_encoding_version. Part of #85153 r? `@Aaron1011`
2021-06-04Move crate_name field from OngoingCodegen to CrateInfobjorn3-1/+1
2021-06-04Allow printing the version of the default codegen backend if it isn't llvmbjorn3-0/+4
2021-06-04Provide default MetadataLoaderbjorn3-5/+1
2021-06-04Provide a default provide* implementation for CodegenBackendbjorn3-4/+0
Both cg_llvm and cg_clif don't override it. cg_spirv does override it, so it needs to be preserved.
2021-06-01Drop metadata_encoding_version.Camille GILLOT-0/+1
2021-06-01Revert "Reduce the amount of untracked state in TyCtxt"Camille Gillot-1/+0
2021-05-30Drop metadata_encoding_version.Camille GILLOT-0/+1
2021-05-27Merge commit '40dd3e2b7089b5e96714e064b731f6dbf17c61a9' into ↵bjorn3-3/+7
sync_cg_clif-2021-05-27
2021-05-14Auto merge of #83640 - bjorn3:shared_metadata_reader, r=nagisabors-1/+1
Use the object crate for metadata reading This allows sharing the metadata reader between cg_llvm, cg_clif and other codegen backends. This is not currently useful for rlib reading with cg_spirv ([rust-gpu](https://github.com/EmbarkStudios/rust-gpu/)) as it uses tar rather than ar as .rlib format, but it is useful for dylib reading required for loading proc macros. (cc `@eddyb)` The object crate is already trusted as dependency of libstd through backtrace. As far as I know it supports reading all object file formats used by targets for which we support rust dylibs with crate metadata, but I am not certain. If this happens to not be the case, I could keep using LLVM for reading dylib metadata. Marked as WIP for a perf run and as it is based on #83637.
2021-05-12Auto merge of #83610 - bjorn3:driver_cleanup, r=cjgillotbors-2/+0
rustc_driver cleanup Best reviewed one commit at a time.
2021-05-07Use the object crate for metadata readingbjorn3-1/+1
2021-05-02Pass target_cpu to LinkerInfo::new instead of link_binarybjorn3-2/+0
This is one step towards separating the linking code from codegen backends
2021-04-30Sync rustc_codegen_cranelift 'ddd4ce25535cf71203ba3700896131ce55fde795'Erin Power-84/+52
2021-03-29Merge commit '0969bc6dde001e01e7e1f58c8ccd7750f8a49ae1' into ↵bjorn3-24/+15
sync_cg_clif-2021-03-29
2021-03-08Auto merge of #82727 - oli-obk:shrinkmem, r=pnkfelixbors-0/+1
Test the effect of shrinking the size of Rvalue by 16 bytes r? `@ghost`
2021-03-05Merge commit '9a0c32934ebe376128230aa8da3275697b2053e7' into ↵bjorn3-34/+21
sync_cg_clif-2021-03-05
2021-03-05Shrink the size of Rvalue by 16 bytesOli Scherer-0/+1
2021-02-09Stabilize str_split_onceJacob Pratt-2/+1
2021-02-01Merge commit 'd556c56f792756dd7cfec742b9f2e07612dc10f4' into ↵bjorn3-17/+16
sync_cg_clif-2021-02-01
2021-01-18Use ty::{IntTy,UintTy,FloatTy} in rustcLeSeulArtichaut-2/+1
2020-12-27Merge commit 'dbee13661efa269cb4cd57bb4c6b99a19732b484' into ↵bjorn3-18/+61
sync_cg_clif-2020-12-27
2020-11-03Merge commit '03f01bbe901d60b71cf2c5ec766aef5e532ab79d' into ↵bjorn3-1/+2
update_cg_clif-2020-11-01
2020-10-26Add 'compiler/rustc_codegen_cranelift/' from commit ↵bjorn3-0/+316
'793d26047f994e23415f8f6bb5686ff25d3dda92' git-subtree-dir: compiler/rustc_codegen_cranelift git-subtree-mainline: cf798c1ec65a5ec3491846777f9003fabb881b4a git-subtree-split: 793d26047f994e23415f8f6bb5686ff25d3dda92