[Mlir-commits] [mlir] [mlir][IR] Add transient scope support for resettable MLIRContext. (PR #217320)

Mehdi Amini llvmlistbot at llvm.org
Wed Aug 19 06:22:18 PDT 2026


================

----------------
joker-eph wrote:

You can read `isInTransientScope` without a lock as long as there can't be any write in another thread, and these writes are forbidden.

Basically we could assert something like:

```
bool isInTransientScope() const {
  assert(!transientAllocator || !getContext()->isMultithreadingEnabled());
   return transientAllocator != nullptr;
}
```


https://github.com/llvm/llvm-project/pull/217320


More information about the Mlir-commits mailing list