diff options
author | Devang Patel <dpatel@apple.com> | 2011-03-17 22:18:16 +0000 |
---|---|---|
committer | Devang Patel <dpatel@apple.com> | 2011-03-17 22:18:16 +0000 |
commit | aad34d882d4f478249828fa32e57a288d706ba34 (patch) | |
tree | a7665a24f62aff67a21536bca7e4502db864d7a0 /llvm/lib/Transforms/InstCombine/InstructionCombining.cpp | |
parent | 221a014ea3b4d7d1ad324aa630ad1c17b845908f (diff) | |
download | bcm5719-llvm-aad34d882d4f478249828fa32e57a288d706ba34.tar.gz bcm5719-llvm-aad34d882d4f478249828fa32e57a288d706ba34.zip |
Try to not lose variable's debug info during instcombine.
This is done by lowering dbg.declare intrinsic into dbg.value intrinsic.
Radar 9143931.
llvm-svn: 127834
Diffstat (limited to 'llvm/lib/Transforms/InstCombine/InstructionCombining.cpp')
-rw-r--r-- | llvm/lib/Transforms/InstCombine/InstructionCombining.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/llvm/lib/Transforms/InstCombine/InstructionCombining.cpp b/llvm/lib/Transforms/InstCombine/InstructionCombining.cpp index 37123d0621e..d88162a703f 100644 --- a/llvm/lib/Transforms/InstCombine/InstructionCombining.cpp +++ b/llvm/lib/Transforms/InstCombine/InstructionCombining.cpp @@ -1648,6 +1648,10 @@ bool InstCombiner::runOnFunction(Function &F) { bool EverMadeChange = false; + // Lower dbg.declare intrinsics otherwise their value may be clobbered + // by instcombiner. + EverMadeChange = LowerDbgDeclare(F); + // Iterate while there is work to do. unsigned Iteration = 0; while (DoOneIteration(F, Iteration++)) |