No matter how one constructs their SerializeTo* pass, we want to
ensure that the LLVM initialization code runs once and only once. This
commit adds a static once_flag to ensure that.
I've run into mysterious segfaults when calling MLIR GPU compiles from
multiple threads, and this commit is a potential fix for the issue.
Shouldn't this be llvm::once_flag?, they aren't always alias:
https://github.com/llvm/llvm-project/blob/main/llvm/include/llvm/Support/Threading.h#L56C1-L72C7