[Mlir-commits] [mlir] [mlir] Fix compile error in Inliner.cpp when NDEBUG is set (PR #150850)
llvmlistbot at llvm.org
llvmlistbot at llvm.org
Sun Jul 27 12:45:35 PDT 2025
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-mlir-core
Author: Timo Nicolai (Time0o)
<details>
<summary>Changes</summary>
I just noticed this while trying to build the current main branch. The way `LDBG` is defined it must be possible to evaluate its arguments even when it turns into a no-op and there seems to be this one case here where that is not true.
---
Full diff: https://github.com/llvm/llvm-project/pull/150850.diff
1 Files Affected:
- (modified) mlir/lib/Transforms/Utils/Inliner.cpp (+2)
``````````diff
diff --git a/mlir/lib/Transforms/Utils/Inliner.cpp b/mlir/lib/Transforms/Utils/Inliner.cpp
index dc780652cbe9d..d8d87c18d6457 100644
--- a/mlir/lib/Transforms/Utils/Inliner.cpp
+++ b/mlir/lib/Transforms/Utils/Inliner.cpp
@@ -667,9 +667,11 @@ Inliner::Impl::inlineCallsInSCC(InlinerInterfaceImpl &inlinerIface,
auto historyToString = [](InlineHistoryT h) {
return h.has_value() ? std::to_string(*h) : "root";
};
+#ifndef NDEBUG
LDBG() << "* new inlineHistory entry: " << newInlineHistoryID << ". ["
<< getNodeName(call) << ", " << historyToString(inlineHistoryID)
<< "]";
+#endif
for (unsigned k = prevSize; k != calls.size(); ++k) {
callHistory.push_back(newInlineHistoryID);
``````````
</details>
https://github.com/llvm/llvm-project/pull/150850
More information about the Mlir-commits
mailing list