refactor: replace LLVMRustAtomicLoad/Store with LLVM built-in functions

This commit is contained in:
AMS21
2025-10-08 10:43:16 +02:00
parent 4fd3181552
commit 1aed495ed7
3 changed files with 7 additions and 70 deletions

View File

@@ -1151,6 +1151,7 @@ unsafe extern "C" {
// Operations on load/store instructions (only)
pub(crate) fn LLVMSetVolatile(MemoryAccessInst: &Value, volatile: Bool);
pub(crate) fn LLVMSetOrdering(MemoryAccessInst: &Value, Ordering: AtomicOrdering);
// Operations on phi nodes
pub(crate) fn LLVMAddIncoming<'a>(
@@ -2090,22 +2091,6 @@ unsafe extern "C" {
RHS: &'a Value,
) -> &'a Value;
// Atomic Operations
pub(crate) fn LLVMRustBuildAtomicLoad<'a>(
B: &Builder<'a>,
ElementType: &'a Type,
PointerVal: &'a Value,
Name: *const c_char,
Order: AtomicOrdering,
) -> &'a Value;
pub(crate) fn LLVMRustBuildAtomicStore<'a>(
B: &Builder<'a>,
Val: &'a Value,
Ptr: &'a Value,
Order: AtomicOrdering,
) -> &'a Value;
pub(crate) fn LLVMRustTimeTraceProfilerInitialize();
pub(crate) fn LLVMRustTimeTraceProfilerFinishThread();