[Mlir-commits] [mlir] [mlir] Fix bug that prevents application of PrintingFlags in Location (PR #119373)

llvmlistbot at llvm.org llvmlistbot at llvm.org
Tue Dec 10 05:04:12 PST 2024


llvmbot wrote:


<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-mlir

Author: Michael Jungmair (jungmair)

<details>
<summary>Changes</summary>

The current implementation of LocationSnapshotPass takes an OpPrintingFlags argument and stores it as member, but does not use it for printing.
Small fix: use already stored flags for printing (as originally intended)

---
Full diff: https://github.com/llvm/llvm-project/pull/119373.diff


1 Files Affected:

- (modified) mlir/lib/Transforms/LocationSnapshot.cpp (+1-1) 


``````````diff
diff --git a/mlir/lib/Transforms/LocationSnapshot.cpp b/mlir/lib/Transforms/LocationSnapshot.cpp
index b85850acda91bd..b8f3817db9db6e 100644
--- a/mlir/lib/Transforms/LocationSnapshot.cpp
+++ b/mlir/lib/Transforms/LocationSnapshot.cpp
@@ -140,7 +140,7 @@ struct LocationSnapshotPass
 
   void runOnOperation() override {
     Operation *op = getOperation();
-    if (failed(generateLocationsFromIR(fileName, op, OpPrintingFlags(), tag)))
+    if (failed(generateLocationsFromIR(fileName, op, flags, tag)))
       return signalPassFailure();
   }
 

``````````

</details>


https://github.com/llvm/llvm-project/pull/119373


More information about the Mlir-commits mailing list