[Mlir-commits] [mlir] [mlir][LLVM] Model side effects of volatile and atomic load-store (PR #65730)
Tobias Gysi
llvmlistbot at llvm.org
Fri Sep 8 04:01:22 PDT 2023
================
@@ -812,6 +812,17 @@ Type GEPOp::getResultPtrElementType() {
// LoadOp
//===----------------------------------------------------------------------===//
+void LoadOp::getEffects(
+ SmallVectorImpl<SideEffects::EffectInstance<MemoryEffects::Effect>>
+ &effects) {
+ effects.emplace_back(MemoryEffects::Read::get(), getAddr());
+ if (getVolatile_() || (getOrdering() != AtomicOrdering::not_atomic &&
----------------
gysit wrote:
Can you put a comment, possibly with the link to LLVM's implementation, that explains the additional effect for atomics and volatile operations.
https://github.com/llvm/llvm-project/pull/65730
More information about the Mlir-commits
mailing list