about summary refs log tree commit diff
path: root/compiler/rustc_codegen_gcc/src/common.rs
AgeCommit message (Collapse)AuthorLines
2025-07-09Add opaque TypeId handles for CTFEOli Scherer-2/+8
2025-07-07compiler: Parse `p-` specs in datalayout string, allow definition of custom ↵Edoardo Marangoni-1/+1
default data address space
2025-06-30Auto merge of #143254 - matthiaskrgr:rollup-7x8bxek, r=matthiaskrgrbors-1/+1
Rollup of 9 pull requests Successful merges: - rust-lang/rust#143019 (Ensure -V --verbose processes both codegen_backend and codegen-backend) - rust-lang/rust#143140 (give Pointer::into_parts a more scary name and offer a safer alternative) - rust-lang/rust#143175 (Make combining LLD with external LLVM config a hard error) - rust-lang/rust#143180 (Use `tracing-forest` instead of `tracing-tree` for bootstrap tracing) - rust-lang/rust#143223 (Improve macro stats printing) - rust-lang/rust#143228 (Handle build scripts better in `-Zmacro-stats` output.) - rust-lang/rust#143229 ([COMPILETEST-UNTANGLE 1/N] Move some some early config checks to the lib and move the compiletest binary) - rust-lang/rust#143246 (Subtree update of `rust-analyzer`) - rust-lang/rust#143248 (Update books) r? `@ghost` `@rustbot` modify labels: rollup
2025-06-30Rollup merge of #143140 - RalfJung:ptr-into-parts, r=oli-obkMatthias Krüger-1/+1
give Pointer::into_parts a more scary name and offer a safer alternative `into_parts` is a bit too innocent of a name for a somewhat subtle operation. r? `@oli-obk`
2025-06-30Merge commit '4b5c44b14166083eef8d71f15f5ea1f53fc976a0' into ↵Guillaume Gomez-9/+1
subtree-update_cg_gcc_2025-06-30
2025-06-29give Pointer::into_parts a more scary name and offer a safer alternativeRalf Jung-1/+1
2025-06-28Merge commit 'b7091eca6d8eb0fe88b58cc9a7aec405d8de5b85' into ↵Guillaume Gomez-13/+0
subtree-update_cg_gcc_2025-06-28
2025-06-18Merge commit 'fda0bb9588912a3e0606e880ca9f6e913cf8a5a4' into ↵Guillaume Gomez-12/+90
subtree-update_cg_gcc_2025-06-18
2025-04-25Merge commit '4f83a4258deb99f3288a7122c0d5a78200931c61' into ↵Antoni Boucher-6/+5
subtree-update_cg_gcc_2025-04-25
2025-03-07Rollup merge of #137549 - oli-obk:llvm-ffi, r=davidtwcoMatthias Krüger-2/+2
Clean up various LLVM FFI things in codegen_llvm cc ```@ZuseZ4``` I touched some autodiff parts The major change of this PR is [bfd88ce](https://github.com/rust-lang/rust/pull/137549/commits/bfd88cead0dd79717f123ad7e9a26ecad88653cb) which makes `CodegenCx` generic just like `GenericBuilder` The other commits mostly took advantage of the new feature of making extern functions safe, but also just used some wrappers that were already there and shrunk unsafe blocks. best reviewed commit-by-commit
2025-03-04Auto merge of #137959 - matthiaskrgr:rollup-62vjvwr, r=matthiaskrgrbors-5/+0
Rollup of 12 pull requests Successful merges: - #135767 (Future incompatibility warning `unsupported_fn_ptr_calling_conventions`: Also warn in dependencies) - #137852 (Remove layouting dead code for non-array SIMD types.) - #137863 (Fix pretty printing of unsafe binders) - #137882 (do not build additional stage on compiler paths) - #137894 (Revert "store ScalarPair via memset when one side is undef and the other side can be memset") - #137902 (Make `ast::TokenKind` more like `lexer::TokenKind`) - #137921 (Subtree update of `rust-analyzer`) - #137922 (A few cleanups after the removal of `cfg(not(parallel))`) - #137939 (fix order on shl impl) - #137946 (Fix docker run-local docs) - #137955 (Always allow rustdoc-json tests to contain long lines) - #137958 (triagebot.toml: Don't label `test/rustdoc-json` as A-rustdoc-search) r? `@ghost` `@rustbot` modify labels: rollup
2025-03-02Revert "Auto merge of #135335 - oli-obk:push-zxwssomxxtnq, r=saethlin"Michael Goulet-5/+0
This reverts commit a7a6c64a657f68113301c2ffe0745b49a16442d1, reversing changes made to ebbe63891f1fae21734cb97f2f863b08b1d44bf8.
2025-02-27Stop using `hash_raw_entry` in `CodegenCx::const_str`Josh Stone-7/+6
That unstable feature completed fcp-close, so the compiler needs to be migrated away to allow its removal. In this case, `cg_llvm` and `cg_gcc` were using raw entries to optimize their `const_str_cache` lookup and insertion. We can change that to separate `get` and (on miss) `insert` calls, so we still have the fast path avoiding string allocation when the cache hits.
2025-02-24Remove an unnecessary lifetimeOli Scherer-2/+2
2025-01-30Do not treat vtable supertraits as distinct when bound with different bound varsMichael Goulet-1/+6
2025-01-21Treat undef bytes as equal to any other byteOli Scherer-0/+5
2025-01-13Merge commit '59a81c2ca1edc88ad3ac4b27a8e03977ffb8e73a' into ↵Antoni Boucher-3/+3
subtree-update_cg_gcc_2025_01_12
2024-10-08cg_gcc: Factor out rustc_target::abiJubilee Young-1/+3
2024-09-23Check vtable projections for validity in miriMichael Goulet-2/+2
2024-09-22Reformat using the new identifier sorting from rustfmtMichael Goulet-1/+1
2024-09-19Reorder `ConstMethods`.Nicholas Nethercote-16/+16
It's crazy to have the integer methods in something close to random order. The reordering makes the gaps clear: `const_i64`, `const_i128`, `const_isize`, and `const_u16`. I guess they just aren't needed.
2024-09-17Rename supertraits of `CodegenMethods`.Nicholas Nethercote-2/+4
Supertraits of `BuilderMethods` are all called `XyzBuilderMethods`. Supertraits of `CodegenMethods` are all called `XyzMethods`. This commit changes the latter to `XyzCodegenMethods`, for consistency.
2024-08-08const vector passed to codegenJames Barford-Evans-0/+5
2024-07-29Reformat `use` declarations.Nicholas Nethercote-2/+1
The previous commit updated `rustfmt.toml` appropriately. This commit is the outcome of running `x fmt --all` with the new formatting options.
2024-07-17Format cg_gcc with same formatting parametersGuillaume Gomez-5/+1
2024-07-10Merge commit '98ed962c7d3eebe12c97588e61245273d265e72f' into masterGuillaume Gomez-5/+6
2024-07-02Miri function identity hack: account for possible inliningRalf Jung-1/+1
2024-06-21Remove const_bitcast from ConstMethodsbjorn3-13/+13
2024-06-10ScalarInt: size mismatches are a bug, do not delay the panicRalf Jung-1/+1
2024-03-23Add+Use `mir::BinOp::Cmp`Scott McMurray-0/+4
2024-03-05Merge commit 'b385428e3ddf330805241e7758e773f933357c4b' into ↵Guillaume Gomez-99/+69
subtree-update_cg_gcc_2024-03-05
2023-12-11Remove dead codesr0cky-11/+0
2023-12-07ctfe interpreter: extend provenance so that it can track whether a pointer ↵Ralf Jung-1/+2
is immutable
2023-10-26Merge commit 'e4fe941b11a55c5005630696e9b6d81c65f7bd04' into ↵Antoni Boucher-8/+8
subtree-update_cg_gcc_2023-10-25
2023-07-29cg_ssa: remove pointee types and pointercast/bitcast-of-ptrErik Desjardins-4/+4
2023-06-10Support 128-bit enum variant in debuginfo codegenDonoughLiu-1/+5
2023-05-26Stop creating intermediate places just to immediate convert them to operandsOli Scherer-23/+19
2023-03-16Use poison instead of undefNikita Popov-0/+5
In cases where it is legal, we should prefer poison values over undef values. This replaces undef with poison for aggregate construction and for uninhabited types. There are more places where we can likely use poison, but I wanted to stay conservative to start with. In particular the aggregate case is important for newer LLVM versions, which are not able to handle an undef base value during early optimization due to poison-propagation concerns.
2023-03-05Merge commit '08a6d6e16b5efe217123e780398969946266268f' into ↵Antoni Boucher-8/+18
sync-cg_gcc-2023-03-04
2023-01-22abi: add `AddressSpace` field to `Primitive::Pointer`Erik Desjardins-1/+1
...and remove it from `PointeeInfo`, which isn't meant for this. There are still various places (marked with FIXMEs) that assume all pointers have the same size and alignment. Fixing this requires parsing non-default address spaces in the data layout string, which will be done in a followup.
2022-12-20Add missing anonymous lifetimeJeremy Stucki-1/+1
2022-12-20rustc: Remove needless lifetimesJeremy Stucki-1/+1
2022-09-06Remove dead broken code from const zst handling in backendsOli Scherer-4/+0
2022-07-20slightly cleaner, if more verbose, vtable handling in codegen backendsRalf Jung-8/+5
2022-07-20consistently use VTable over Vtable (matching stable stdlib API RawWakerVTable)Ralf Jung-2/+2
2022-07-20add a Vtable kind of symbolic allocationsRalf Jung-0/+8
2022-07-09fix cranelift and gcc backendsRalf Jung-5/+4
2022-06-28Avoid unnecessary string interning for const_strbjorn3-7/+9
2022-06-06Merge commit 'e8dca3e87d164d2806098c462c6ce41301341f68' into sync_from_cg_gccAntoni Boucher-4/+78
2022-04-05Mark scalar layout unions so that backends that do not support partially ↵Oli Scherer-4/+4
initialized scalars can special case them.