[Mlir-commits] [llvm] [mlir] [OMPIRBuilder] Move debug records to correct blocks. (PR #157125)
Abid Qadeer
llvmlistbot at llvm.org
Tue Apr 7 05:07:36 PDT 2026
================
@@ -8363,29 +8350,54 @@ static void FixupDebugInfoForOutlinedFunction(
OldVar->getFlags(), OldVar->getAlignInBits(), OldVar->getAnnotations());
return NewVar;
};
-
- auto UpdateDebugRecord = [&](auto *DR) {
+ auto UpdateDebugRecord = [&](DbgVariableRecord *DR) {
DILocalVariable *OldVar = DR->getVariable();
unsigned ArgNo = 0;
- for (auto Loc : DR->location_ops()) {
- auto Iter = ValueReplacementMap.find(Loc);
- if (Iter != ValueReplacementMap.end()) {
- DR->replaceVariableLocationOp(Loc, std::get<0>(Iter->second));
- ArgNo = std::get<1>(Iter->second) + 1;
- }
+ if (DR->getNumVariableLocationOps() != 1u)
----------------
abidh wrote:
This hunk was not really part of this PR. Was done to keep 2 lambda similar but I agree with your point that it can result in broken IR. I have reverted this bit as it is not required.
https://github.com/llvm/llvm-project/pull/157125
More information about the Mlir-commits
mailing list