summaryrefslogtreecommitdiffstats
path: root/lib/Transforms/InstCombine
diff options
context:
space:
mode:
authorDevang Patel <dpatel@apple.com>2011-03-17 22:18:16 +0000
committerDevang Patel <dpatel@apple.com>2011-03-17 22:18:16 +0000
commit813c9a0f19c0d27085a3ea81eb44033747007741 (patch)
tree62f672bd1b588cc0bbb49f142864ab808a221e24 /lib/Transforms/InstCombine
parente68d8ec25296574109b586359d37318c725442ac (diff)
downloadexternal_llvm-813c9a0f19c0d27085a3ea81eb44033747007741.zip
external_llvm-813c9a0f19c0d27085a3ea81eb44033747007741.tar.gz
external_llvm-813c9a0f19c0d27085a3ea81eb44033747007741.tar.bz2
Try to not lose variable's debug info during instcombine.
This is done by lowering dbg.declare intrinsic into dbg.value intrinsic. Radar 9143931. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@127834 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms/InstCombine')
-rw-r--r--lib/Transforms/InstCombine/InstructionCombining.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/Transforms/InstCombine/InstructionCombining.cpp b/lib/Transforms/InstCombine/InstructionCombining.cpp
index 37123d0..d88162a 100644
--- a/lib/Transforms/InstCombine/InstructionCombining.cpp
+++ b/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++))