Skip to content

Commit 79dfd0a

Browse files
committed
remove 'unordered' atomic intrinsics
1 parent 0eb0b8c commit 79dfd0a

File tree

5 files changed

+1
-16
lines changed

5 files changed

+1
-16
lines changed

compiler/rustc_codegen_gcc/src/builder.rs

-1
Original file line numberDiff line numberDiff line change
@@ -2454,7 +2454,6 @@ impl ToGccOrdering for AtomicOrdering {
24542454
use MemOrdering::*;
24552455

24562456
let ordering = match self {
2457-
AtomicOrdering::Unordered => __ATOMIC_RELAXED,
24582457
AtomicOrdering::Relaxed => __ATOMIC_RELAXED, // TODO(antoyo): check if that's the same.
24592458
AtomicOrdering::Acquire => __ATOMIC_ACQUIRE,
24602459
AtomicOrdering::Release => __ATOMIC_RELEASE,

compiler/rustc_codegen_llvm/src/llvm/ffi.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -415,6 +415,7 @@ impl AtomicRmwBinOp {
415415
pub(crate) enum AtomicOrdering {
416416
#[allow(dead_code)]
417417
NotAtomic = 0,
418+
#[allow(dead_code)]
418419
Unordered = 1,
419420
Monotonic = 2,
420421
// Consume = 3, // Not specified yet.
@@ -428,7 +429,6 @@ impl AtomicOrdering {
428429
pub(crate) fn from_generic(ao: rustc_codegen_ssa::common::AtomicOrdering) -> Self {
429430
use rustc_codegen_ssa::common::AtomicOrdering as Common;
430431
match ao {
431-
Common::Unordered => Self::Unordered,
432432
Common::Relaxed => Self::Monotonic,
433433
Common::Acquire => Self::Acquire,
434434
Common::Release => Self::Release,

compiler/rustc_codegen_ssa/src/common.rs

-1
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,6 @@ pub enum AtomicRmwBinOp {
6161

6262
#[derive(Copy, Clone, Debug)]
6363
pub enum AtomicOrdering {
64-
Unordered,
6564
Relaxed,
6665
Acquire,
6766
Release,

compiler/rustc_codegen_ssa/src/mir/intrinsic.rs

-1
Original file line numberDiff line numberDiff line change
@@ -336,7 +336,6 @@ impl<'a, 'tcx, Bx: BuilderMethods<'a, 'tcx>> FunctionCx<'a, 'tcx, Bx> {
336336
};
337337

338338
let parse_ordering = |bx: &Bx, s| match s {
339-
"unordered" => Unordered,
340339
"relaxed" => Relaxed,
341340
"acquire" => Acquire,
342341
"release" => Release,

library/core/src/intrinsics/mod.rs

-12
Original file line numberDiff line numberDiff line change
@@ -439,12 +439,6 @@ pub unsafe fn atomic_load_acquire<T: Copy>(src: *const T) -> T;
439439
#[rustc_intrinsic]
440440
#[rustc_nounwind]
441441
pub unsafe fn atomic_load_relaxed<T: Copy>(src: *const T) -> T;
442-
/// Do NOT use this intrinsic; "unordered" operations do not exist in our memory model!
443-
/// In terms of the Rust Abstract Machine, this operation is equivalent to `src.read()`,
444-
/// i.e., it performs a non-atomic read.
445-
#[rustc_intrinsic]
446-
#[rustc_nounwind]
447-
pub unsafe fn atomic_load_unordered<T: Copy>(src: *const T) -> T;
448442

449443
/// Stores the value at the specified memory location.
450444
/// `T` must be an integer or pointer type.
@@ -473,12 +467,6 @@ pub unsafe fn atomic_store_release<T: Copy>(dst: *mut T, val: T);
473467
#[rustc_intrinsic]
474468
#[rustc_nounwind]
475469
pub unsafe fn atomic_store_relaxed<T: Copy>(dst: *mut T, val: T);
476-
/// Do NOT use this intrinsic; "unordered" operations do not exist in our memory model!
477-
/// In terms of the Rust Abstract Machine, this operation is equivalent to `dst.write(val)`,
478-
/// i.e., it performs a non-atomic write.
479-
#[rustc_intrinsic]
480-
#[rustc_nounwind]
481-
pub unsafe fn atomic_store_unordered<T: Copy>(dst: *mut T, val: T);
482470

483471
/// Stores the value at the specified memory location, returning the old value.
484472
/// `T` must be an integer or pointer type.

0 commit comments

Comments
 (0)