Add thread-safe utilities to LLVMType to allow constructing llvm types in a multi...
authorRiver Riddle <riverriddle@google.com>
Wed, 22 May 2019 21:56:07 +0000 (14:56 -0700)
committerMehdi Amini <joker.eph@gmail.com>
Sun, 2 Jun 2019 02:57:03 +0000 (19:57 -0700)
commit5953d12b959a2905bd2f32b7429d3196ea274db2
tree4735fac6e5fb6a309e886ad8ba317f8296797225
parentc33862b0ed8c7b07160470c86ad281d777bfcd13
Add thread-safe utilities to LLVMType to allow constructing llvm types in a multi-threaded environment. The LLVMContext is not thread-safe and directly constructing a raw llvm::Type can create situations where the LLVMContext is modified by multiple threads at the same time.

--

PiperOrigin-RevId: 249526233
mlir/examples/Linalg/Linalg1/lib/ConvertToLLVMDialect.cpp
mlir/examples/Linalg/Linalg3/lib/ConvertToLLVMDialect.cpp
mlir/examples/toy/Ch5/mlir/LateLowering.cpp
mlir/include/mlir/LLVMIR/LLVMDialect.h
mlir/include/mlir/LLVMIR/LLVMLowering.h
mlir/lib/LLVMIR/IR/LLVMDialect.cpp
mlir/lib/LLVMIR/Transforms/ConvertToLLVMDialect.cpp
mlir/lib/Linalg/Transforms/LowerToLLVMDialect.cpp