summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms/Utils
diff options
context:
space:
mode:
authorAdrian Prantl <aprantl@apple.com>2014-04-25 17:01:04 +0000
committerAdrian Prantl <aprantl@apple.com>2014-04-25 17:01:04 +0000
commit0840a22452f70d09bed5c9e114e6df21f3ea9963 (patch)
tree04b871e151d4ec010697b6add61df66d7eee23c6 /llvm/lib/Transforms/Utils
parentf5834a4b4905cda81cdda3cb24be98e31c01b242 (diff)
downloadbcm5719-llvm-0840a22452f70d09bed5c9e114e6df21f3ea9963.tar.gz
bcm5719-llvm-0840a22452f70d09bed5c9e114e6df21f3ea9963.zip
Reapply r207135 without modifications.
Debug info: Let dbg.values inserted by LowerDbgDeclare inherit the location of the dbg.value. This gets rid of tons of redundant variable DIEs in subscopes. rdar://problem/14874886, rdar://problem/16679936 llvm-svn: 207236
Diffstat (limited to 'llvm/lib/Transforms/Utils')
-rw-r--r--llvm/lib/Transforms/Utils/Local.cpp20
1 files changed, 3 insertions, 17 deletions
diff --git a/llvm/lib/Transforms/Utils/Local.cpp b/llvm/lib/Transforms/Utils/Local.cpp
index a55971ea454..773099f9ab8 100644
--- a/llvm/lib/Transforms/Utils/Local.cpp
+++ b/llvm/lib/Transforms/Utils/Local.cpp
@@ -995,14 +995,7 @@ bool llvm::ConvertDebugDeclareToDebugValue(DbgDeclareInst *DDI,
DbgVal = Builder.insertDbgValueIntrinsic(ExtendedArg, 0, DIVar, SI);
else
DbgVal = Builder.insertDbgValueIntrinsic(SI->getOperand(0), 0, DIVar, SI);
-
- // Propagate any debug metadata from the store onto the dbg.value.
- DebugLoc SIDL = SI->getDebugLoc();
- if (!SIDL.isUnknown())
- DbgVal->setDebugLoc(SIDL);
- // Otherwise propagate debug metadata from dbg.declare.
- else
- DbgVal->setDebugLoc(DDI->getDebugLoc());
+ DbgVal->setDebugLoc(DDI->getDebugLoc());
return true;
}
@@ -1022,14 +1015,7 @@ bool llvm::ConvertDebugDeclareToDebugValue(DbgDeclareInst *DDI,
Instruction *DbgVal =
Builder.insertDbgValueIntrinsic(LI->getOperand(0), 0,
DIVar, LI);
-
- // Propagate any debug metadata from the store onto the dbg.value.
- DebugLoc LIDL = LI->getDebugLoc();
- if (!LIDL.isUnknown())
- DbgVal->setDebugLoc(LIDL);
- // Otherwise propagate debug metadata from dbg.declare.
- else
- DbgVal->setDebugLoc(DDI->getDebugLoc());
+ DbgVal->setDebugLoc(DDI->getDebugLoc());
return true;
}
@@ -1068,7 +1054,7 @@ bool llvm::LowerDbgDeclare(Function &F) {
auto DbgVal =
DIB.insertDbgValueIntrinsic(AI, 0,
DIVariable(DDI->getVariable()), I);
- DbgVal->setDebugLoc(I->getDebugLoc());
+ DbgVal->setDebugLoc(DDI->getDebugLoc());
}
DDI->eraseFromParent();
}
OpenPOWER on IntegriCloud