This is an archive of the discontinued LLVM Phabricator instance.

[mlir] take MLIRContext instead of LLVMDialect in getters of LLVMType's
ClosedPublic

Authored by ftynse on Aug 5 2020, 3:58 PM.

Details

Summary

Historical modeling of the LLVM dialect types had been wrapping LLVM IR types
and therefore needed access to the instance of LLVMContext stored in the
LLVMDialect. The new modeling does not rely on that and only needs the
MLIRContext that is used for uniquing, similarly to other MLIR types. Change
LLVMType::get<Kind>Ty functions to take MLIRContext * instead of
LLVMDialect * as first argument. This brings the code base closer to
completely removing the dependence on LLVMContext from the LLVMDialect,
together with additional support for thread-safety of its use.

Depends On D85371

Diff Detail

Event Timeline

ftynse created this revision.Aug 5 2020, 3:58 PM
ftynse requested review of this revision.Aug 5 2020, 3:58 PM
rriddle accepted this revision.Aug 5 2020, 4:05 PM
This revision is now accepted and ready to land.Aug 5 2020, 4:05 PM
This revision was landed with ongoing or failed builds.Aug 6 2020, 2:05 AM
This revision was automatically updated to reflect the committed changes.