about summary refs log tree commit diff
path: root/compiler/rustc_codegen_gcc
AgeCommit message (Collapse)AuthorLines
2023-11-26Use `rustc_fluent_macro::fluent_messages!` directly.Nicholas Nethercote-2/+1
Currently we always do this: ``` use rustc_fluent_macro::fluent_messages; ... fluent_messages! { "./example.ftl" } ``` But there is no need, we can just do this everywhere: ``` rustc_fluent_macro::fluent_messages! { "./example.ftl" } ``` which is shorter.
2023-11-26Avoid need for `{D,Subd}iagnosticMessage` imports.Nicholas Nethercote-1/+1
The `fluent_messages!` macro produces uses of `crate::{D,Subd}iagnosticMessage`, which means that every crate using the macro must have this import: ``` use rustc_errors::{DiagnosticMessage, SubdiagnosticMessage}; ``` This commit changes the macro to instead use `rustc_errors::{D,Subd}iagnosticMessage`, which avoids the need for the imports.
2023-11-19Pass TyCtxt by valueAntoni Boucher-3/+3
2023-11-19Merge commit '2e8386e9fb3506cef991d04f8b3bc78f9a0c2630' into ↵Antoni Boucher-41/+104
subtree-update_cg_gcc_2023-11-17
2023-11-15Bump cfg(bootstrap)sMark Rousskov-3/+3
2023-11-12target_feature: make it more clear what that 'Option' meansRalf Jung-1/+1
2023-11-02Remove `libc` dependency in cg_gcc alloc_system exampleGuillaume Gomez-4/+14
2023-11-02Pass `--sysroot` optionGuillaume Gomez-0/+4
2023-11-02Fix config.sh scriptGuillaume Gomez-1/+1
2023-11-02Fix compilation errors in rustc_codegen_gcc examplesGuillaume Gomez-2/+2
2023-11-02Disable `master` feature by default when building rustc_codegen_gccGuillaume Gomez-1/+0
2023-10-27Merge commit '09ce29d0591a21e1abae22eac4d41ffd32993af8' into ↵Antoni Boucher-53/+98
subtree-update_cg_gcc_2023-10-25
2023-10-26Merge commit 'e4fe941b11a55c5005630696e9b6d81c65f7bd04' into ↵Antoni Boucher-507/+2664
subtree-update_cg_gcc_2023-10-25
2023-10-20s/generator/coroutine/Oli Scherer-1/+1
2023-10-20s/Generator/Coroutine/Oli Scherer-4/+4
2023-10-16docs: add Rust logo to more compiler cratesMichael Howell-0/+2
c6e6ecb1afea9695a42d0f148ce153536b279eb5 added it to some of the compiler's crates, but avoided adding it to all of them to reduce bit-rot. This commit adds to more.
2023-10-09Use IntoDynSyncSendAntoni Boucher-6/+14
2023-10-09Fix checksAntoni Boucher-1/+1
2023-10-09Merge commit '11a0cceab966e5ff1058ddbcab5977e8a1d6d290' into ↵Antoni Boucher-657/+2836
subtree-update_cg_gcc_2023-10-09
2023-10-02Auto merge of #102099 - InnovativeInventor:re-cold-land, r=nikicbors-1/+1
Rebased: Mark drop calls in landing pads cold instead of noinline I noticed that certain inlining optimizations were missing while staring at some compiled code output. I'd like to see this relanded, so I rebased the PR from `@erikdesjardins` (PR #94823). This PR reapplies https://github.com/rust-lang/rust/pull/92419, which was reverted in https://github.com/rust-lang/rust/pull/94402 due to https://github.com/rust-lang/rust/issues/94390. Fixes https://github.com/rust-lang/rust/issues/46515, fixes https://github.com/rust-lang/rust/issues/87055. Update: fixes #97217.
2023-10-02Reapply: Mark drop calls in landing pads cold instead of noinlineErik Desjardins-1/+1
Co-authored-by: Max Fan <git@max.fan> Co-authored-by: Nikita Popov <npopov@redhat.com>
2023-10-02Auto merge of #115898 - onur-ozkan:config-change-tracking, r=Mark-Simulacrumbors-1/+1
bootstrap major change detection implementation The use of `changelog-seen` and `bootstrap/CHANGELOG.md` has not been functional in any way for many years. We often do major/breaking changes but never update the changelog file or the `changelog-seen`. This is an alternative method for tracking major or breaking changes and informing developers when such changes occur. Example output when bootstrap detects a major change: ![image](https://github.com/rust-lang/rust/assets/39852038/ee802dfa-a02b-488b-a433-f853ce079b8a)
2023-10-01implement major change tracking for the bootstrap configurationonur-ozkan-1/+1
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2023-09-22Have a single struct for queries and hookOli Scherer-3/+2
2023-09-22Add a way to decouple the implementation and the declaration of a TyCtxt method.Oli Scherer-1/+2
2023-09-15fix gcc, cranelift buildRalf Jung-6/+6
2023-09-15clarify PassMode::Indirect as wellRalf Jung-5/+5
2023-09-14treat host effect params as erased generics in codegenDeadbeef-1/+1
This fixes the changes brought to codegen tests when effect params are added to libcore, by not attempting to monomorphize functions that get the host param by being `const fn`.
2023-09-01Deduplicate inlined function debug info, but create a new lexical scope to ↵Daniel Paoliello-1/+1
child subsequent scopes and variables from colliding
2023-08-29Rollup merge of #111580 - atsuzaki:layout-ice, r=oli-obkMatthias Krüger-1/+2
Don't ICE on layout computation failure Fixes #111176 regression. r? `@oli-obk`
2023-08-28Don't ICE on layout computation failureKatherine Philip-1/+2
2023-08-28Rollup merge of #115240 - RalfJung:llvm-no-type, r=bjorn3Matthias Krüger-37/+17
codegen_llvm/llvm_type: avoid matching on the Rust type This `match` is highly suspicious. Looking at `scalar_llvm_type_at` I think it makes no difference. But if it were to make a difference that would be a huge problem, since it doesn't look through `repr(transparent)`! Cc `@eddyb` `@bjorn3`
2023-08-28remove an unused argumentRalf Jung-10/+10
it was already unused before, but due to the recursion the compiler did not realize
2023-08-28carry out the same changes in the gcc backendRalf Jung-27/+7
2023-08-25Revert "Use the same DISubprogram for each instance of the same inlined ↵Wesley Wiser-1/+1
function within the caller" This reverts commit 687bffa49375aa00bacc51f5d9adfb84a9453e17. Reverting to resolve ICEs reported on nightly.
2023-08-22Auto merge of #114643 - dpaoliello:inlinedebuginfo, r=wesleywiserbors-1/+1
Use the same DISubprogram for each instance of the same inlined function within a caller # Issue Details: The call to `panic` within a function like `Option::unwrap` is translated to LLVM as a `tail call` (as it will never return), when multiple calls to the same function like this is inlined LLVM will notice the common `tail call` block (i.e., loading the same panic string + location info and then calling `panic`) and merge them together. When merging these instructions together, LLVM will also attempt to merge the debug locations as well, but this fails (i.e., debug info is dropped) as Rust emits a new `DISubprogram` at each inline site thus LLVM doesn't recognize that these are actually the same function and so thinks that there isn't a common debug location. As an example of this when building for x86_64 Windows (note the lack of `.cv_loc` before the call to `panic`, thus it will be attributed to the same line at the `addq` instruction): ``` .cv_loc 0 1 23 0 # src\lib.rs:23:0 addq $40, %rsp retq leaq .Lalloc_f570dea0a53168780ce9a91e67646421(%rip), %rcx leaq .Lalloc_629ace53b7e5b76aaa810d549cc84ea3(%rip), %r8 movl $43, %edx callq _ZN4core9panicking5panic17h12e60b9063f6dee8E int3 ``` # Fix Details: Cache the `DISubprogram` emitted for each inlined function instance within a caller so that this can be reused if that instance is encountered again, this also requires caching the `DILexicalBlock` and `DIVariable` objects to avoid creating duplicates. After this change the above assembly now looks like: ``` .cv_loc 0 1 23 0 # src\lib.rs:23:0 addq $40, %rsp retq .cv_inline_site_id 5 within 0 inlined_at 1 0 0 .cv_inline_site_id 6 within 5 inlined_at 1 12 0 .cv_loc 6 2 935 0 # library\core\src\option.rs:935:0 leaq .Lalloc_5f55955de67e57c79064b537689facea(%rip), %rcx leaq .Lalloc_e741d4de8cb5801e1fd7a6c6795c1559(%rip), %r8 movl $43, %edx callq _ZN4core9panicking5panic17hde1558f32d5b1c04E int3 ```
2023-08-15Auto merge of #114467 - Amanieu:asm-unstable-features, r=davidtwcobors-2/+2
Use `unstable_target_features` when checking inline assembly This is necessary to properly validate register classes even when the relevant target feature name is still unstable.
2023-08-14add a csky-unknown-linux-gnuabiv2 targetDirreke-0/+6
2023-08-11Use the same DISubprogram for each instance of the same inlined function ↵Daniel Paoliello-1/+1
within the caller
2023-08-07Rollup merge of #114382 - scottmcm:compare-bytes-intrinsic, r=cjgillotMatthias Krüger-0/+15
Add a new `compare_bytes` intrinsic instead of calling `memcmp` directly As discussed in #113435, this lets the backends be the place that can have the "don't call the function if n == 0" logic, if it's needed for the target. (I didn't actually *add* those checks, though, since as I understood it we didn't actually need them on known targets?) Doing this also let me make it `const` (unstable), which I don't think `extern "C" fn memcmp` can be. cc `@RalfJung` `@Amanieu`
2023-08-06Apply suggestions from code reviewscottmcm-0/+1
Co-authored-by: Ralf Jung <post@ralfj.de>
2023-08-06Add a new `compare_bytes` intrinsic instead of calling `memcmp` directlyScott McMurray-0/+14
2023-08-06Generate better function argument names in global_allocator expansionDavid Tolnay-2/+2
2023-08-04Rollup merge of #114450 - chenyukang:yukang-fix-114435, r=compiler-errorsMatthias Krüger-1/+1
Fix ICE failed to get layout for ReferencesError Fixes #114435 r? `@compiler-errors`
2023-08-05Fix ICE failed to get layout for ReferencesErroryukang-1/+1
2023-08-04Use `unstable_target_features` when checking inline assemblyAmanieu d'Antras-2/+2
This is necessary to properly validate register classes even when the relevant target feature name is still unstable.
2023-08-03Forbid old-style `simd_shuffleN` intrinsicsOli Scherer-195/+250
2023-08-01Auto merge of #105545 - erikdesjardins:ptrclean, r=bjorn3bors-11/+26
cleanup: remove pointee types This can't be merged until the oldest LLVM version we support uses opaque pointers, which will be the case after #114148. (Also note `-Cllvm-args="-opaque-pointers=0"` can technically be used in LLVM 15, though I don't think we should support that configuration.) I initially hoped this would provide some minor perf win, but in https://github.com/rust-lang/rust/pull/105412#issuecomment-1341224450 it had very little impact, so this is only valuable as a cleanup. As a followup, this will enable #96242 to be resolved. r? `@ghost` `@rustbot` label S-blocked
2023-07-31Use standard Rust capitalization rules for names containing "LTO".Nicholas Nethercote-4/+4
2023-07-29cg_ssa: remove pointee types and pointercast/bitcast-of-ptrErik Desjardins-11/+26