aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Transforms/Utils/CloneFunction.cpp
diff options
context:
space:
mode:
authorCarlos Alberto Enciso <Carlos.Enciso@sony.com>2024-04-26 13:35:09 +0100
committerGitHub <noreply@github.com>2024-04-26 13:35:09 +0100
commit7696d36b4ed595bf9681fd379d1dcbaf30c1ef0a (patch)
treefd92ee1a15187ef9709a3c64cf5f0de4f6a1f111 /llvm/lib/Transforms/Utils/CloneFunction.cpp
parentc4c9d4f306732c854fa88d2f30c1a22bb025d0c9 (diff)
downloadllvm-7696d36b4ed595bf9681fd379d1dcbaf30c1ef0a.zip
llvm-7696d36b4ed595bf9681fd379d1dcbaf30c1ef0a.tar.gz
llvm-7696d36b4ed595bf9681fd379d1dcbaf30c1ef0a.tar.bz2
[Transforms] Debug values are not remapped when cloning. (#87747)
When cloning instructions from one basic block to another, the debug values are not remapped, in the same was as the normal instructions.
Diffstat (limited to 'llvm/lib/Transforms/Utils/CloneFunction.cpp')
-rw-r--r--llvm/lib/Transforms/Utils/CloneFunction.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/llvm/lib/Transforms/Utils/CloneFunction.cpp b/llvm/lib/Transforms/Utils/CloneFunction.cpp
index 3eac726..303a098 100644
--- a/llvm/lib/Transforms/Utils/CloneFunction.cpp
+++ b/llvm/lib/Transforms/Utils/CloneFunction.cpp
@@ -1131,6 +1131,9 @@ BasicBlock *llvm::DuplicateInstructionsInSplitBetween(
if (I != ValueMapping.end())
New->setOperand(i, I->second);
}
+
+ // Remap debug variable operands.
+ remapDebugVariable(ValueMapping, New);
}
return NewBB;