summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen
diff options
context:
space:
mode:
authorDevang Patel <dpatel@apple.com>2010-06-24 21:51:19 +0000
committerDevang Patel <dpatel@apple.com>2010-06-24 21:51:19 +0000
commitc657c621b7c13c36fcd5439c326c9c04f930553b (patch)
tree27f60620f989e7370c7cf0a141173dcc7d40e7c4 /llvm/lib/CodeGen
parent24e98486a3b6076bfa1b5fac5c2be0ec264d10c9 (diff)
downloadbcm5719-llvm-c657c621b7c13c36fcd5439c326c9c04f930553b.tar.gz
bcm5719-llvm-c657c621b7c13c36fcd5439c326c9c04f930553b.zip
DBG_VALUE machine instruction pointing to undefined register for a variable justify a separate scope if the variable is inlined function's argument.
Radar 8122864. llvm-svn: 106792
Diffstat (limited to 'llvm/lib/CodeGen')
-rw-r--r--llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp5
1 files changed, 1 insertions, 4 deletions
diff --git a/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp b/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
index 89993ae9fd4..abd42dcdf4c 100644
--- a/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
+++ b/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
@@ -2390,8 +2390,6 @@ DbgScope *DwarfDebug::getOrCreateDbgScope(const MDNode *Scope, const MDNode *Inl
static bool hasValidLocation(LLVMContext &Ctx,
const MachineInstr *MInsn,
const MDNode *&Scope, const MDNode *&InlinedAt) {
- if (MInsn->isDebugValue())
- return false;
DebugLoc DL = MInsn->getDebugLoc();
if (DL.isUnknown()) return false;
@@ -2655,7 +2653,6 @@ void DwarfDebug::beginFunction(const MachineFunction *MF) {
assert (MI->getNumOperands() > 1 && "Invalid machine instruction!");
DIVariable DV(MI->getOperand(MI->getNumOperands() - 1).getMetadata());
if (!DV.Verify()) continue;
- if (isDbgValueInUndefinedReg(MI)) continue;
// If DBG_VALUE is for a local variable then it needs a label.
if (DV.getTag() != dwarf::DW_TAG_arg_variable)
InsnNeedsLabel.insert(MI);
@@ -2663,7 +2660,7 @@ void DwarfDebug::beginFunction(const MachineFunction *MF) {
else if (!DISubprogram(DV.getContext()).describes(MF->getFunction()))
InsnNeedsLabel.insert(MI);
// DBG_VALUE indicating argument location change needs a label.
- else if (!ProcessedArgs.insert(DV))
+ else if (isDbgValueInUndefinedReg(MI) == false && !ProcessedArgs.insert(DV))
InsnNeedsLabel.insert(MI);
} else {
// If location is unknown then instruction needs a location only if
OpenPOWER on IntegriCloud