::mlir::Op class does not have a size of 8 when targeting the MSVC ABI caused by a longstanding bug of MSVC.
This may slow down the speed of MLIR Pass on Windows. See the example code with
and the example code with
The example shows that the size of
mlir::Op<Traits...> without optimization is 72 (
The optimized one with
__declspec(empty_bases) is 8 (
::mlir::Op also affects the function call without inlining.
But I did not see much workaround in the LLVM project, other than this commit.
libc: Fix std::tuples EBO when targeting the MSVC ABI.
Should we add the attribute
__declspec(empty_bases) for the