about summary refs log tree commit diff
path: root/compiler/rustc_codegen_cranelift/example
AgeCommit message (Collapse)AuthorLines
2025-07-20Update cranelift testsScott McMurray-9/+16
2025-06-30Stop backends from needing to support nullary intrinsicsOli Scherer-6/+19
2025-06-16cranelift/gcc: `{Meta,Pointee,}Sized` in minicoreDavid Wood-30/+36
As in many previous commits, adding the new traits to minicore, but this time for cranelift and gcc.
2025-06-14Rollup merge of #141811 - mejrs:bye_locals, r=compiler-errorsMatthias Krüger-4/+0
Unimplement unsized_locals Implements https://github.com/rust-lang/compiler-team/issues/630 Tracking issue here: https://github.com/rust-lang/rust/issues/111942 Note that this just removes the feature, not the implementation, and does not touch `unsized_fn_params`. This is because it is required to support `Box<dyn FnOnce()>: FnOnce()`. There may be more that should be removed (possibly in follow up prs) - the `forget_unsized` function and `forget` intrinsic. - the `unsized_locals` test directory; I've just fixed up the tests for now - various codegen support for unsized values and allocas cc ``@JakobDegen`` ``@oli-obk`` ``@Noratrieb`` ``@programmerjake`` ``@bjorn3`` ``@rustbot`` label F-unsized_locals Fixes rust-lang/rust#79409
2025-06-13Unimplement unsized_localsmejrs-4/+0
2025-06-12intrinsics: rename min_align_of to align_ofRalf Jung-7/+4
2025-06-03Add impl for `llvm.roundeven` in cg_clifsayantn-1/+1
- remove unused `llvm.aarch64.neon.frintn` from cg_clif
2025-05-25Merge commit '979dcf8e2f213e4f4b645cb62e7fe9f4f2c0c785' into ↵bjorn3-1/+22
sync_cg_clif-2025-05-25
2025-04-24Suggest {to,from}_ne_bytes for transmutations between arrays and integers, etcbendn-1/+1
2025-04-24Auto merge of #139309 - RalfJung:abi_unsupported_vector_types, ↵bors-3/+0
r=fee1-dead,traviscross make abi_unsupported_vector_types a hard error Fixes https://github.com/rust-lang/rust/issues/116558 by completing the transition; see that issue for context. The lint was introduced with Rust 1.84 and this has been shown in cargo's future breakage reports since Rust 1.85, released 6 weeks ago, and so far we got 0 complaints by users. There's not even a backlink on the tracking issue. We did a [crater run](https://github.com/rust-lang/rust/pull/127731#issuecomment-2286736295) when the lint was originally added and found no breakage. So I don't think we need another crater run now, but I can do one if the team prefers that. https://github.com/rust-lang/rust/issues/131800 is done, so for most current targets (in particular, all tier 1 and tier 2 targets) we have the information to implement this check (modulo the targets where we don't properly support SIMD vectors yet, see the sub-issues of https://github.com/rust-lang/rust/issues/116558). If a new target gets added in the future, it will default to reject all SIMD vector types until proper information is added, which is the default we want. This will need approval by for `@rust-lang/lang.` Cc `@workingjubilee` `@veluca93` try-job: test-various try-job: armhf-gnu try-job: dist-i586-gnu-i586-i686-musl
2025-04-20make abi_unsupported_vector_types a hard errorRalf Jung-3/+0
2025-04-20stabilize `naked_functions`Folkert de Vries-10/+1
2025-04-19Make `#[naked]` an unsafe attributeFolkert de Vries-4/+2
2025-04-01Allow formatting example/gen_block_iterate.rsbjorn3-4/+12
2025-03-12intrinsics: remove unnecessary leading underscore from argument namesRalf Jung-8/+8
2025-03-11Implement `#[define_opaque]` attribute for functions.Oli Scherer-13/+11
2025-02-24remove support for rustc_intrinsic_must_be_overridden from the compilerRalf Jung-52/+13
2025-02-13Implement and use BikeshedGuaranteedNoDrop for union/unsafe field validityMichael Goulet-0/+3
2025-02-08Rustfmtbjorn3-3/+4
2025-02-07Merge commit '8332329f83d4ef34479fec67cc21b21246dca6b5' into ↵bjorn3-1/+1
sync_cg_clif-2025-02-07
2025-01-10Merge commit 'e39eacd2d415803ef82de3b6a314e4f2d0fbc4dc' into ↵bjorn3-205/+0
sync_cg_clif-2025-01-10
2024-12-07Make `Copy` unsafe to implement for ADTs with `unsafe` fieldsJack Wrenn-20/+20
As a rule, the application of `unsafe` to a declaration requires that use-sites of that declaration also require `unsafe`. For example, a field declared `unsafe` may only be read in the lexical context of an `unsafe` block. For nearly all safe traits, the safety obligations of fields are explicitly discharged when they are mentioned in method definitions. For example, idiomatically implementing `Clone` (a safe trait) for a type with unsafe fields will require `unsafe` to clone those fields. Prior to this commit, `Copy` violated this rule. The trait is marked safe, and although it has no explicit methods, its implementation permits reads of `Self`. This commit resolves this by making `Copy` conditionally safe to implement. It remains safe to implement for ADTs without unsafe fields, but unsafe to implement for ADTs with unsafe fields. Tracking: #132922
2024-12-06Remove polymorphizationBen Kimock-17/+0
2024-12-06Merge commit '57845a397ec15e4e6a561ed2c4bfa3dcf49144fb' into ↵bjorn3-0/+3
sync_cg_clif-2024-12-06
2024-11-08remove support for rustc_safe_intrinsic attribute; use rustc_intrinsic ↵Ralf Jung-19/+64
functions instead
2024-10-22Rename Receiver -> LegacyReceiverAdrian Taylor-5/+5
As part of the "arbitrary self types v2" project, we are going to replace the current `Receiver` trait with a new mechanism based on a new, different `Receiver` trait. This PR renames the old trait to get it out the way. Naming is hard. Options considered included: * HardCodedReceiver (because it should only be used for things in the standard library, and hence is sort-of hard coded) * LegacyReceiver * TargetLessReceiver * OldReceiver These are all bad names, but fortunately this will be temporary. Assuming the new mechanism proceeds to stabilization as intended, the legacy trait will be removed altogether. Although we expect this trait to be used only in the standard library, we suspect it may be in use elsehwere, so we're landing this change separately to identify any surprising breakages. It's known that this trait is used within the Rust for Linux project; a patch is in progress to remove their dependency. This is a part of the arbitrary self types v2 project, https://github.com/rust-lang/rfcs/pull/3519 https://github.com/rust-lang/rust/issues/44874 r? @wesleywiser
2024-10-06various fixes for `naked_asm!` implementationFolkert de Vries-1/+7
- fix for divergence - fix error message - fix another cranelift test - fix some cranelift things - don't set the NORETURN option for naked asm - fix use of naked_asm! in doc comment - fix use of naked_asm! in run-make test - use `span_bug` in unreachable branch
2024-10-04Use wide pointers consistenly across the compilerUrgau-2/+2
2024-09-23Merge commit '6d35b4c9a04580366fd800692a5b5db79d766530' into ↵bjorn3-0/+71
sync_cg_clif-2024-09-22
2024-09-22Reformat using the new identifier sorting from rustfmtMichael Goulet-4/+3
2024-09-09Fix the examples in cg_clifScott McMurray-8/+8
2024-08-18stabilize raw_ref_opRalf Jung-2/+1
2024-08-10Fixes in various placesNadrieril-0/+1
2024-08-09Merge commit '69b3f5a426a5c1c05236a45b36f6679d95fbe01b' into ↵bjorn3-0/+31
sync_cg_clif-2024-08-09
2024-07-29Reformat `use` declarations.Nicholas Nethercote-6/+5
The previous commit updated `rustfmt.toml` appropriately. This commit is the outcome of running `x fmt --all` with the new formatting options.
2024-07-28stabilize `is_sorted`Slanterns-1/+0
2024-06-30Merge commit '49cd5dd454d0115cfbe9e39102a8b3ba4616aa40' into ↵bjorn3-15/+43
sync_cg_clif-2024-06-30
2024-06-12Require any function with a tait in its signature to actually constrain a ↵Oli Scherer-10/+13
hidden type
2024-05-13Merge commit '3270432f4b0583104c8b9b6f695bf97d6bbf3ac2' into ↵bjorn3-0/+39
sync_cg_clif-2024-05-13
2024-04-24Error on using `yield` without also using `#[coroutine]` on the closureOli Scherer-5/+10
And suggest adding the `#[coroutine]` to the closure
2024-04-23Rollup merge of #124286 - bjorn3:sync_cg_clif-2024-04-23, r=bjorn3Matthias Krüger-3/+7
Subtree sync for rustc_codegen_cranelift This fixes a crash when compiling the standard library. In addition the Cranelift update fixes all the 128bit int abi incompatibility between cg_clif and cg_llvm. r? ``@ghost`` ``@rustbot`` label +A-codegen +A-cranelift +T-compiler
2024-04-23Rollup merge of #124003 - WaffleLapkin:dellvmization, r=scottmcm,RalfJung,antoyoMatthias Krüger-2/+2
Dellvmize some intrinsics (use `u32` instead of `Self` in some integer intrinsics) This implements https://github.com/rust-lang/compiler-team/issues/693 minus what was implemented in #123226. Note: I decided to _not_ change `shl`/... builder methods, as it just doesn't seem worth it. r? ``@scottmcm``
2024-04-23Merge commit 'de5d6523738fd44a0521b6abf3e73ae1df210741' into ↵bjorn3-3/+7
sync_cg_clif-2024-04-23
2024-04-19Do intrinsic changes in `rustc_codegen_cranelift`Maybe Waffle-2/+2
2024-04-15static_mut_refs: use raw pointers to remove the remaining FIXMERalf Jung-4/+11
2024-04-05Merge commit 'fbda869b4e230c788b6bce426038ba8419956f2d' into ↵bjorn3-2/+2
sync_cg_clif-2024-04-05
2024-03-22Codegen const panic messages as function callsMark Rousskov-0/+30
This skips emitting extra arguments at every callsite (of which there can be many). For a librustc_driver build with overflow checks enabled, this cuts 0.7MB from the resulting binary.
2024-03-16Merge commit '4cf4ffc6ba514f171b3f52d1c731063e4fc45be3' into ↵bjorn3-0/+8
sync_cg_clif-2024-03-16
2024-03-11Rollup merge of #121840 - oli-obk:freeze, r=dtolnayJacob Pratt-0/+1
Expose the Freeze trait again (unstably) and forbid implementing it manually non-emoji version of https://github.com/rust-lang/rust/pull/121501 cc #60715 This trait is useful for generic constants (associated consts of generic traits). See the test (`tests/ui/associated-consts/freeze.rs`) added in this PR for a usage example. The builtin `Freeze` trait is the only way to do it, users cannot work around this issue. It's also a useful trait for building some very specific abstrations, as shown by the usage by the `zerocopy` crate: https://github.com/google/zerocopy/issues/941 cc ```@RalfJung``` T-lang signed off on reexposing this unstably: https://github.com/rust-lang/rust/pull/121501#issuecomment-1969827742
2024-03-05only set noalias on Box with the global allocatorRalf Jung-2/+5