LLVM 22.0.0git
|
Go to the source code of this file.
Functions | |
static bool | isIdempotentRMW (AtomicRMWInst &RMWI) |
Return true if and only if the given instruction does not modify the memory location referenced. | |
static bool | isSaturating (AtomicRMWInst &RMWI) |
Return true if the given instruction always produces a value in memory equivalent to its value operand. |
|
static |
Return true if and only if the given instruction does not modify the memory location referenced.
Note that an idemptent atomicrmw may still have ordering effects on nearby instructions, or be volatile. TODO: Common w/ the version in AtomicExpandPass, and change the term used. Idemptotent is confusing in this context.
Definition at line 23 of file InstCombineAtomicRMW.cpp.
References llvm::AtomicRMWInst::Add, llvm::AtomicRMWInst::And, llvm::CallingConv::C, llvm::dyn_cast(), llvm::AtomicRMWInst::FAdd, llvm::AtomicRMWInst::FSub, llvm::AtomicRMWInst::getOperation(), llvm::AtomicRMWInst::getValOperand(), llvm::AtomicRMWInst::Max, llvm::AtomicRMWInst::Min, llvm::AtomicRMWInst::Or, llvm::AtomicRMWInst::Sub, llvm::AtomicRMWInst::UMax, llvm::AtomicRMWInst::UMin, and llvm::AtomicRMWInst::Xor.
Referenced by llvm::InstCombinerImpl::visitAtomicRMWInst().
|
static |
Return true if the given instruction always produces a value in memory equivalent to its value operand.
Definition at line 61 of file InstCombineAtomicRMW.cpp.
References llvm::AtomicRMWInst::And, llvm::CallingConv::C, llvm::dyn_cast(), llvm::AtomicRMWInst::FAdd, llvm::AtomicRMWInst::FMax, llvm::AtomicRMWInst::FMin, llvm::AtomicRMWInst::FSub, llvm::AtomicRMWInst::getOperation(), llvm::AtomicRMWInst::getValOperand(), llvm::AtomicRMWInst::Max, llvm::AtomicRMWInst::Min, llvm::AtomicRMWInst::Or, llvm::AtomicRMWInst::UMax, llvm::AtomicRMWInst::UMin, and llvm::AtomicRMWInst::Xchg.
Referenced by llvm::InstCombinerImpl::visitAtomicRMWInst().