summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/AsmPrinter
diff options
context:
space:
mode:
authorTom Weaver <Tom.Weaver@Sony.com>2019-12-20 14:03:34 +0000
committerTom Weaver <Tom.Weaver@Sony.com>2019-12-20 14:03:34 +0000
commit453dc4d7ec5a3c3d8f54fc358bc5673834516d48 (patch)
treef6a5334c2664efb76c4b46e79f11b91bb8d3253c /llvm/lib/CodeGen/AsmPrinter
parent59811f454df08924fc35f7e8fb8cb61e8f40e869 (diff)
downloadbcm5719-llvm-453dc4d7ec5a3c3d8f54fc358bc5673834516d48.tar.gz
bcm5719-llvm-453dc4d7ec5a3c3d8f54fc358bc5673834516d48.zip
[OPT-DBG] Teach DbgEntityHistoryCalculator about meta-instructions.
The calculator was considering instructions such as KILLs as clobbers of a physical address. This is wrong as meta instructions such as KILLs produce no output in the final program and thus don't clobber or change any physical location's value. As a result they're safe to ignore whilst calculating location list ranges. reviewers: aprantl, vsk diff revision: https://reviews.llvm.org/D70497 fixes: https://bugs.llvm.org/show_bug.cgi?id=38753
Diffstat (limited to 'llvm/lib/CodeGen/AsmPrinter')
-rw-r--r--llvm/lib/CodeGen/AsmPrinter/DbgEntityHistoryCalculator.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/AsmPrinter/DbgEntityHistoryCalculator.cpp b/llvm/lib/CodeGen/AsmPrinter/DbgEntityHistoryCalculator.cpp
index 7f9d6c618ad..170fc8b6d49 100644
--- a/llvm/lib/CodeGen/AsmPrinter/DbgEntityHistoryCalculator.cpp
+++ b/llvm/lib/CodeGen/AsmPrinter/DbgEntityHistoryCalculator.cpp
@@ -262,7 +262,9 @@ void llvm::calculateDbgEntityHistory(const MachineFunction *MF,
DbgLabels.addInstr(L, MI);
}
- if (MI.isDebugInstr())
+ // Meta Instructions have no output and do not change any values and so
+ // can be safely ignored.
+ if (MI.isMetaInstruction())
continue;
// Not a DBG_VALUE instruction. It may clobber registers which describe
OpenPOWER on IntegriCloud