summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorrdzhabarov <rdzhabarov@google.com>2021-11-19 21:13:17 +0000
committerrdzhabarov <rdzhabarov@google.com>2021-11-19 21:30:43 +0000
commit6f62380b2b5b20f16ea8365718735814abbff58f (patch)
tree9ddf99b773f94653025574d8fcf00659389f0123
parenta075d67222832c234296ffd605f19e33023e6060 (diff)
downloadllvm-fix_asan.tar.gz
[mlir] Bug fix. Stream must outlive the pass manager.fix_asan
Bug fix. Stream must outlive the pass manager. Differential Revision: https://reviews.llvm.org/D114277
-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;