Skip to content

Sync v3 #520

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 67 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
67 commits
Select commit Hold shift + click to select a range
3ca0c59
Forbid implementing `Freeze` even if the trait is stabilized
oli-obk Feb 23, 2024
929e12d
Stabilize associated type bounds
compiler-errors Mar 5, 2024
d0dc943
Introduce perma-unstable `wasm-c-abi` flag
daxpedda Feb 27, 2024
dd9407d
use Instance::expect_resolve() instead of unwraping Instance::resolve()
RalfJung Mar 10, 2024
915646f
Rename `IntoDiagnostic` as `Diagnostic`.
nnethercote Mar 6, 2024
0031b21
Auto merge of #122132 - nnethercote:diag-renaming3, r=nnethercote
bors Mar 11, 2024
a6202e2
Rollup merge of #121840 - oli-obk:freeze, r=dtolnay
jhpratt Mar 11, 2024
be24d39
Use published gccjit dependency instead of git repository
GuillaumeGomez Mar 11, 2024
e3a9b1d
Check whether a static is mutable instead of passing it down
oli-obk Oct 6, 2023
8fdfbf5
Make some functions private that are only ever used in the same module
oli-obk Feb 26, 2024
6d573e9
Ensure nested allocations in statics do not get deduplicated
oli-obk Feb 26, 2024
e7795ed
Some comment nits
oli-obk Mar 11, 2024
a64942a
Mark codegen_gcc fields used only on feature master as such
krtab Jan 4, 2024
9476fe7
avoid naming LLVM basic blocks when fewer_names is true
erikdesjardins Mar 15, 2024
ff2b405
revert changes and just delete the fixme
erikdesjardins Mar 16, 2024
678e624
Auto merge of #122055 - compiler-errors:stabilize-atb, r=oli-obk
bors Mar 19, 2024
c8cb091
Codegen const panic messages as function calls
Mark-Simulacrum Mar 18, 2024
83eaede
Make RawPtr take Ty and Mutbl separately
compiler-errors Mar 21, 2024
a951158
Auto merge of #119552 - krtab:dead_code_priv_mod_pub_field, r=cjgillo…
bors Mar 23, 2024
95c7fde
Unbox and unwrap the contents of `StatementKind::Coverage`
Zalathar Mar 23, 2024
abbe1ba
CFI: Use Instance at callsites
maurer Mar 15, 2024
1a05106
Add+Use `mir::BinOp::Cmp`
scottmcm Mar 6, 2023
1ee4ae9
Rollup merge of #122937 - Zalathar:unbox, r=oli-obk
matthiaskrgr Mar 24, 2024
211b585
Auto merge of #122671 - Mark-Simulacrum:const-panic-msg, r=Nilstrieb
bors Mar 29, 2024
cc98f86
stabilize ptr.is_aligned, move ptr.is_aligned_to to a new feature gate
Gankra Mar 3, 2024
27ba1ba
Auto merge of #118310 - scottmcm:three-way-compare, r=davidtwco
bors Apr 2, 2024
f7a6ac1
Rollup merge of #122334 - GuillaumeGomez:vendor-cg_gcc, r=Mark-Simula…
GuillaumeGomez Apr 5, 2024
040afd3
Save/restore more items in cache with incremental compilation
pacak Apr 6, 2024
b9b05d5
Make `PlaceRef` hold a `PlaceValue` for the non-layout fields (like `…
scottmcm Apr 11, 2024
cccf379
Put `PlaceValue` into `OperandValue::Ref`, rather than 3 tuple fields
scottmcm Apr 11, 2024
4ea3389
use [N x i8] for alloca types
erikdesjardins Feb 24, 2024
50a1471
restore location in gcc alloca codegen
erikdesjardins Apr 12, 2024
6f36e82
static_mut_refs: use raw pointers to remove the remaining FIXME
RalfJung Apr 15, 2024
0f17e5a
Auto merge of #117919 - daxpedda:wasm-c-abi, r=wesleywiser
bors Apr 19, 2024
dd50f45
Fixup `rustc_codegen_gcc` test signature
WaffleLapkin Apr 20, 2024
224285d
Rollup merge of #123967 - RalfJung:static_mut_refs, r=Nilstrieb
jieyouxu Apr 20, 2024
2d082ae
Stabilize the size of incr comp object file names
saethlin Apr 3, 2024
79d217f
Rollup merge of #124003 - WaffleLapkin:dellvmization, r=scottmcm,Ralf…
matthiaskrgr Apr 23, 2024
752af44
Auto merge of #122053 - erikdesjardins:alloca, r=nikic
bors Apr 24, 2024
df0639b
Error on using `yield` without also using `#[coroutine]` on the closure
oli-obk Apr 11, 2024
2b875f0
Step bootstrap cfgs
Mark-Simulacrum Apr 29, 2024
3ea32a7
Inline & delete `Ty::new_unit`, since it's just a field access
WaffleLapkin May 2, 2024
7ed351a
Rollup merge of #124624 - WaffleLapkin:old_unit, r=fmease
matthiaskrgr May 2, 2024
efa15eb
Auto merge of #123441 - saethlin:fixed-len-file-names, r=oli-obk
bors May 3, 2024
f26221a
Refactor float `Primitive`s to a separate `Float` type
beetrees May 6, 2024
6b7db50
Simplify `use crate::rustc_foo::bar` occurrences.
nnethercote May 8, 2024
7ad7346
codegen: memmove/memset cannot be non-temporal
RalfJung May 9, 2024
ce11a86
Rollup merge of #124797 - beetrees:primitive-float, r=davidtwco
matthiaskrgr May 10, 2024
06f1ba4
Auto merge of #124972 - matthiaskrgr:rollup-3fablim, r=matthiaskrgr
bors May 10, 2024
51c58b9
Merge branch 'master' into sync_v3
GuillaumeGomez May 15, 2024
53a8bfd
Fix libcore patch
GuillaumeGomez Mar 26, 2024
854870d
Fix non-master build
GuillaumeGomez Mar 26, 2024
b3df523
Format code
GuillaumeGomez May 15, 2024
ee565e8
Update libgccjit version
GuillaumeGomez Mar 27, 2024
a10a610
Fix casts
GuillaumeGomez Apr 3, 2024
5dd1381
Fix usage of `get_size` for gcc 12
GuillaumeGomez Apr 3, 2024
58f2cce
Remove usage of `-Zno-parallel-llvm`
GuillaumeGomez Mar 27, 2024
f3a7326
Fix clippy lint
GuillaumeGomez Mar 27, 2024
0dd03da
Fix stdarch crate add patch
GuillaumeGomez Apr 2, 2024
9540201
If the type of a global is not the same, we remove the global and rep…
GuillaumeGomez Apr 19, 2024
2df8185
Update gcc version to 272d0ccced960394fe6ff2b40b01610208cb4940
GuillaumeGomez Apr 25, 2024
85fa75c
Add shl and shr missing casts
GuillaumeGomez May 21, 2024
958bf79
Add missing cast for function_ptr arguments
GuillaumeGomez May 21, 2024
cd9596a
Update rustc version to 2024-05-15
GuillaumeGomez May 21, 2024
75adc87
Fix warnings
GuillaumeGomez May 21, 2024
2834382
Add explanations for ptr func call argument cast
GuillaumeGomez May 22, 2024
d137c6f
Remove the hack in zext
antoyo Jun 12, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@ master = ["gccjit/master"]
default = ["master"]

[dependencies]
gccjit = { git = "https://github.com/antoyo/gccjit.rs" }
#gccjit = "2.0"
gccjit = { git = "https://github.com/rust-lang/gccjit.rs" }

# Local copy.
#gccjit = { path = "../gccjit.rs" }
Expand Down
7 changes: 4 additions & 3 deletions example/example.rs
Original file line number Diff line number Diff line change
Expand Up @@ -153,9 +153,10 @@ fn array_as_slice(arr: &[u8; 3]) -> &[u8] {
arr
}

unsafe fn use_ctlz_nonzero(a: u16) -> u16 {
intrinsics::ctlz_nonzero(a)
}
// FIXME: fix the intrinsic implementation to work with the new ->u32 signature
// unsafe fn use_ctlz_nonzero(a: u16) -> u32 {
// intrinsics::ctlz_nonzero(a)
// }

fn ptr_as_usize(ptr: *const u8) -> usize {
ptr as usize
Expand Down
33 changes: 31 additions & 2 deletions example/mini_core.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#![feature(
no_core, lang_items, intrinsics, unboxed_closures, type_ascription, extern_types,
decl_macro, rustc_attrs, transparent_unions, auto_traits,
decl_macro, rustc_attrs, transparent_unions, auto_traits, freeze_impls,
thread_local
)]
#![no_core]
Expand Down Expand Up @@ -418,6 +418,35 @@ pub fn panic(_msg: &'static str) -> ! {
}
}

macro_rules! panic_const {
($($lang:ident = $message:expr,)+) => {
pub mod panic_const {
use super::*;

$(
#[track_caller]
#[lang = stringify!($lang)]
pub fn $lang() -> ! {
panic($message);
}
)+
}
}
}

panic_const! {
panic_const_add_overflow = "attempt to add with overflow",
panic_const_sub_overflow = "attempt to subtract with overflow",
panic_const_mul_overflow = "attempt to multiply with overflow",
panic_const_div_overflow = "attempt to divide with overflow",
panic_const_rem_overflow = "attempt to calculate the remainder with overflow",
panic_const_neg_overflow = "attempt to negate with overflow",
panic_const_shr_overflow = "attempt to shift right with overflow",
panic_const_shl_overflow = "attempt to shift left with overflow",
panic_const_div_by_zero = "attempt to divide by zero",
panic_const_rem_by_zero = "attempt to calculate the remainder with a divisor of zero",
}

#[lang = "panic_cannot_unwind"]
fn panic_cannot_unwind() -> ! {
unsafe {
Expand Down Expand Up @@ -563,7 +592,7 @@ pub mod intrinsics {
pub fn min_align_of_val<T: ?Sized>(val: *const T) -> usize;
pub fn copy<T>(src: *const T, dst: *mut T, count: usize);
pub fn transmute<T, U>(e: T) -> U;
pub fn ctlz_nonzero<T>(x: T) -> T;
pub fn ctlz_nonzero<T>(x: T) -> u32;
#[rustc_safe_intrinsic]
pub fn needs_drop<T: ?Sized>() -> bool;
#[rustc_safe_intrinsic]
Expand Down
6 changes: 2 additions & 4 deletions example/mini_core_hello_world.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

#![feature(
no_core, unboxed_closures, start, lang_items, never_type, linkage,
extern_types, thread_local
extern_types, thread_local, raw_ref_op
)]
#![no_core]
#![allow(dead_code, internal_features, non_camel_case_types)]
Expand Down Expand Up @@ -99,9 +99,7 @@ fn start<T: Termination + 'static>(

static mut NUM: u8 = 6 * 7;

// FIXME: Use `SyncUnsafeCell` instead of allowing `static_mut_refs` lint
#[allow(static_mut_refs)]
static NUM_REF: &'static u8 = unsafe { &NUM };
static NUM_REF: &'static u8 = unsafe { &* &raw const NUM };

macro_rules! assert {
($e:expr) => {
Expand Down
4 changes: 2 additions & 2 deletions example/std_example.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#![allow(internal_features)]
#![feature(core_intrinsics, coroutines, coroutine_trait, is_sorted)]
#![feature(core_intrinsics, coroutines, coroutine_trait, is_sorted, stmt_expr_attributes)]

#[cfg(feature="master")]
#[cfg(target_arch="x86_64")]
Expand Down Expand Up @@ -103,7 +103,7 @@ fn main() {
test_simd();
}

Box::pin(move |mut _task_context| {
Box::pin(#[coroutine] move |mut _task_context| {
yield ();
}).as_mut().resume(0);

Expand Down
2 changes: 1 addition & 1 deletion libgccjit.version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
b6f163f52
272d0ccced960394fe6ff2b40b01610208cb4940
2 changes: 1 addition & 1 deletion patches/0001-Add-stdarch-Cargo.toml-for-testing.patch
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ index 0000000..4c63700
+members = [
+ "crates/core_arch",
+ "crates/std_detect",
+ "crates/stdarch-gen",
+ "crates/stdarch-gen-arm",
+ #"examples/"
+]
+exclude = [
Expand Down
2 changes: 1 addition & 1 deletion patches/0022-core-Disable-not-compiling-tests.patch
Original file line number Diff line number Diff line change
Expand Up @@ -39,4 +39,4 @@ index 42a26ae..5ac1042 100644
+#![cfg(test)]
#![feature(alloc_layout_extra)]
#![feature(array_chunks)]
#![feature(array_windows)]
#![feature(array_ptr_get)]
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ index d0a119c..76fdece 100644
@@ -89,7 +89,6 @@
#![feature(never_type)]
#![feature(unwrap_infallible)]
#![feature(pointer_is_aligned)]
#![feature(pointer_is_aligned_to)]
-#![feature(portable_simd)]
#![feature(ptr_metadata)]
#![feature(lazy_cell)]
Expand All @@ -27,6 +27,6 @@ index d0a119c..76fdece 100644
mod slice;
mod str;
mod str_lossy;
--
--
2.42.1

2 changes: 1 addition & 1 deletion rust-toolchain
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
[toolchain]
channel = "nightly-2024-03-10"
channel = "nightly-2024-05-15"
components = ["rust-src", "rustc-dev", "llvm-tools-preview"]
2 changes: 1 addition & 1 deletion src/asm.rs
Original file line number Diff line number Diff line change
Expand Up @@ -539,7 +539,7 @@ impl<'a, 'gcc, 'tcx> AsmBuilderMethods<'tcx> for Builder<'a, 'gcc, 'tcx> {
let builtin_unreachable = self.context.get_builtin_function("__builtin_unreachable");
let builtin_unreachable: RValue<'gcc> =
unsafe { std::mem::transmute(builtin_unreachable) };
self.call(self.type_void(), None, None, builtin_unreachable, &[], None);
self.call(self.type_void(), None, None, builtin_unreachable, &[], None, None);
}

// Write results to outputs.
Expand Down
2 changes: 2 additions & 0 deletions src/back/write.rs
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,8 @@ pub(crate) unsafe fn codegen(
config.emit_obj != EmitObj::None,
cgcx.target_can_use_split_dwarf && cgcx.split_debuginfo == SplitDebuginfo::Unpacked,
config.emit_bc,
config.emit_asm,
config.emit_ir,
&cgcx.output_filenames,
))
}
Expand Down
Loading
Loading