about summary refs log tree commit diff
path: root/compiler/rustc_codegen_ssa/src/base.rs
AgeCommit message (Collapse)AuthorLines
2025-01-27Change `collect_and_partition_mono_items` tuple return type to a structOli Scherer-2/+2
2025-01-25Auto merge of #119286 - jyn514:linker-output, r=bjorn3bors-1/+3
show linker output even if the linker succeeds Show stderr and stderr by default, controlled by a new `linker_messages` lint. fixes https://github.com/rust-lang/rust/issues/83436. fixes https://github.com/rust-lang/rust/issues/38206. cc https://rust-lang.zulipchat.com/#narrow/stream/233931-t-compiler.2Fmajor-changes/topic/uplift.20some.20-Zverbose.20calls.20and.20rename.20to.E2.80.A6.20compiler-team.23706/near/408986134 <!-- try-job: dist-x86_64-msvc --> try-job: aarch64-apple r? `@bjorn3`
2025-01-23Implement `optimize(none)` attributeclubby789-4/+1
2025-01-21remove support for the #[start] attributeRalf Jung-7/+4
2025-01-20show linker warnings even if it returns 0jyn-1/+3
2025-01-06Add support for wasm exception handling to Emscripten targetHood Chatham-1/+2
Gated behind an unstable `-Z emscripten-wasm-eh` flag
2024-12-18Re-export more `rustc_span::symbol` things from `rustc_span`.Nicholas Nethercote-2/+1
`rustc_span::symbol` defines some things that are re-exported from `rustc_span`, such as `Symbol` and `sym`. But it doesn't re-export some closely related things such as `Ident` and `kw`. So you can do `use rustc_span::{Symbol, sym}` but you have to do `use rustc_span::symbol::{Ident, kw}`, which is inconsistent for no good reason. This commit re-exports `Ident`, `kw`, and `MacroRulesNormalizedIdent`, and changes many `rustc_span::symbol::` qualifiers in `compiler/` to `rustc_span::`. This is a 200+ net line of code reduction, mostly because many files with two `use rustc_span` items can be reduced to one.
2024-12-16rename rustc_attr to rustc_attr_parsing and create rustc_attr_data_structuresJonathan Dönszelmann-1/+1
2024-12-16split attributesJonathan Dönszelmann-2/+3
2024-11-19additional `TypingEnv` cleanupslcnr-3/+4
2024-11-18use `TypingEnv` when no `infcx` is availablelcnr-7/+6
the behavior of the type system not only depends on the current assumptions, but also the currentnphase of the compiler. This is mostly necessary as we need to decide whether and how to reveal opaque types. We track this via the `TypingMode`.
2024-11-03compiler: Directly use rustc_abi in codegenJubilee Young-1/+1
2024-10-29TypingMode :thinking:lcnr-2/+2
2024-10-28fix clippy::clone_on_ref_ptr for compilerklensy-3/+3
2024-10-23"innermost", "outermost", "leftmost", and "rightmost" don't need hyphensJosh Triplett-1/+1
These are all standard dictionary words and don't require hyphenation.
2024-10-17Allow dropping dyn principalMichael Goulet-2/+3
2024-09-30Relate binders explicitly, do a leak check tooMichael Goulet-14/+31
2024-09-30Relax a debug assertion in codegenMichael Goulet-6/+36
2024-09-25Add a debug assertion in codegen that unsize casts of the same principal ↵Michael Goulet-2/+22
trait def id are truly NOPs
2024-09-25Rollup merge of #130734 - Luv-Ray:fix_vfe, r=lcnrMatthias Krüger-7/+2
Fix: ices on virtual-function-elimination about principal trait Extract `load_vtable` function to ensure the `virtual_function_elimination` option is always checked. It's okay not to use `llvm.type.checked.load` to load the vtable if there is no principal trait. Fixes #123955 Fixes #124092
2024-09-23fix ices on vfe about principal traitLuv-Ray-7/+2
2024-09-22Reformat using the new identifier sorting from rustfmtMichael Goulet-7/+7
2024-09-20Do not unnecessarily eval consts in codegenMichael Goulet-3/+3
2024-09-17Remove unnecessary `cx` argument.Nicholas Nethercote-11/+8
Because `bx` contains a `cx`.
2024-09-17Streamline `bin_op_to_[if]cmp_predicate`.Nicholas Nethercote-43/+13
2024-09-17Clean up formatting.Nicholas Nethercote-2/+4
Reflow overly long comments, plus some minor whitespace improvements.
2024-09-17Minimize visibilities.Nicholas Nethercote-10/+10
This makes it much clearer which things are used outside the crate.
2024-08-08Rename struct_tail_erasing_lifetimes to struct_tail_for_codegenMichael Goulet-1/+1
2024-07-29Reformat `use` declarations.Nicholas Nethercote-23/+20
The previous commit updated `rustfmt.toml` appropriately. This commit is the outcome of running `x fmt --all` with the new formatting options.
2024-07-15Move compiler_builtin check to the use caseMohammad Omidvar-0/+28
2024-07-02Fix spansMichael Goulet-2/+2
2024-07-02Give Instance::expect_resolve a spanMichael Goulet-0/+1
2024-06-14Only compute vtable information during codegenMichael Goulet-2/+1
2024-06-06Revert "Rollup merge of #124976 - petrochenkov:usedcrates, r=oli-obk"Rémy Rakic-2/+2
This reverts commit eda4a35f365535af72118118a3597edf5a13c12d, reversing changes made to eb6b35b5bcb3c2a594cb29cd478aeb2893f49d30.
2024-05-27Rollup merge of #125148 - RalfJung:codegen-sh, r=scottmcmGuillaume Gomez-4/+5
codegen: tweak/extend shift comments r? `@scottmcm`
2024-05-24Run rustfmt on files that need it.Nicholas Nethercote-1/+1
Somehow these files aren't properly formatted. By default `x fmt` and `x tidy` only check files that have changed against master, so if an ill-formatted file somehow slips in it can stay that way as long as it doesn't get modified(?) I found these when I ran `x fmt` explicitly on every `.rs` file in the repo, while working on https://github.com/rust-lang/compiler-team/issues/750.
2024-05-23Auto merge of #125434 - nnethercote:rm-more-extern-tracing, r=jackh726bors-0/+1
Remove more `#[macro_use] extern crate tracing` Because explicit importing of macros via use items is nicer (more standard and readable) than implicit importing via `#[macro_use]`. Continuing the work from #124511 and #124914. r? `@jackh726`
2024-05-23Rollup merge of #124976 - petrochenkov:usedcrates, r=oli-obkMatthias Krüger-2/+2
rustc: Use `tcx.used_crates(())` more And explain when it should be used. Addresses comments from https://github.com/rust-lang/rust/pull/121167.
2024-05-23Remove `#[macro_use] extern crate tracing` from `rustc_codegen_ssa`.Nicholas Nethercote-0/+1
2024-05-22rustc: Use `tcx.used_crates(())` moreVadim Petrochenkov-2/+2
And explain when it should be used.
2024-05-22Stop using `to_hir_binop` in codegenScott McMurray-16/+16
2024-05-15codegen: tweak/extend shift commentsRalf Jung-4/+5
2024-05-10Refactoring after the `PlaceValue` additionScott McMurray-1/+1
I added `PlaceValue` in 123775, but kept that one line-by-line simple because it touched so many places. This goes through to add more helpers & docs, and change some `PlaceRef` to `PlaceValue` where the type didn't need to be included. No behaviour changes.
2024-04-29Remove `extern crate rustc_middle` from numerous crates.Nicholas Nethercote-0/+1
2024-04-11use [N x i8] for alloca typesErik Desjardins-1/+1
2024-04-09Remove my `scalar_copy_backend_type` optimization attemptScott McMurray-35/+3
I added this back in 111999, but I no longer think it's a good idea - It had to get scaled back to only power-of-two things to not break a bunch of targets - LLVM seems to be getting better at memcpy removal anyway - Introducing vector instructions has seemed to sometimes (115515) make autovectorization worse So this removes it from the codegen crates entirely, and instead just tries to use <https://doc.rust-lang.org/nightly/nightly-rustc/rustc_codegen_ssa/traits/builder/trait.BuilderMethods.html#method.typed_place_copy> instead of direct `memcpy` so things will still use load/store for immediates.
2024-04-06Save/restore more items in cache with incremental compilationMichael Baikov-0/+2
2024-04-02Improve the `build_shift_expr_rhs` commentScott McMurray-4/+7
2024-03-30De-LLVM the unchecked shifts [MCP#693]Scott McMurray-4/+28
This is just one part of the MCP, but it's the one that IMHO removes the most noise from the standard library code. Seems net simpler this way, since MIR already supported heterogeneous shifts anyway, and thus it's not more work for backends than before.
2024-03-23CFI: Use Instance at callsitesMatthew Maurer-6/+13
We already use `Instance` at declaration sites when available to glean additional information about possible abstractions of the type in use. This does the same when possible at callsites as well. The primary purpose of this change is to allow CFI to alter how it generates type information for indirect calls through `Virtual` instances.