summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--mlir/lib/Dialect/GPU/Transforms/SerializeToBlob.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/mlir/lib/Dialect/GPU/Transforms/SerializeToBlob.cpp b/mlir/lib/Dialect/GPU/Transforms/SerializeToBlob.cpp
index f8be171d1f5d..6ae466200608 100644
--- a/mlir/lib/Dialect/GPU/Transforms/SerializeToBlob.cpp
+++ b/mlir/lib/Dialect/GPU/Transforms/SerializeToBlob.cpp
@@ -42,10 +42,10 @@ gpu::SerializeToBlobPass::translateToISA(llvm::Module &llvmModule,
std::string targetISA;
llvm::raw_string_ostream stream(targetISA);
- llvm::legacy::PassManager codegenPasses;
-
{ // Drop pstream after this to prevent the ISA from being stuck buffering
llvm::buffer_ostream pstream(stream);
+ llvm::legacy::PassManager codegenPasses;
+
if (targetMachine.addPassesToEmitFile(codegenPasses, pstream, nullptr,
llvm::CGFT_AssemblyFile))
return llvm::None;