This is an archive of the discontinued LLVM Phabricator instance.

Add an assertion to protect against missing Dialect registration in a pass pipeline (NFC)
ClosedPublic

Authored by mehdi_amini on Aug 20 2020, 7:24 PM.

Diff Detail

Event Timeline

mehdi_amini created this revision.Aug 20 2020, 7:24 PM
Herald added a project: Restricted Project. · View Herald TranscriptAug 20 2020, 7:24 PM
mehdi_amini requested review of this revision.Aug 20 2020, 7:24 PM

Improve error message

Fix build with stdlibc++

flaub added a subscriber: flaub.Aug 21 2020, 11:02 AM

Rename the API to be generic for any multi-threaded context and not mention the pass pipeline

rriddle added inline comments.Aug 23 2020, 9:27 PM
mlir/include/mlir/IR/MLIRContext.h
161

nit: on misuses of some APIs

mlir/lib/IR/MLIRContext.cpp
267

nit: executing in a

270

Can you wrap this within NDEBUG? It should be a complete NOOP in release.

rriddle accepted this revision.Aug 23 2020, 9:27 PM
rriddle added inline comments.
mlir/lib/IR/MLIRContext.cpp
497

Can you add asserts to the other non-thread safe APIs?

This revision is now accepted and ready to land.Aug 23 2020, 9:27 PM
rriddle added inline comments.Aug 23 2020, 9:27 PM
mlir/include/mlir/IR/MLIRContext.h
26

nit: This shouldn't be necessary anymore.

Address comments

mehdi_amini marked 5 inline comments as done.Aug 23 2020, 11:14 PM