[PATCH] D61600: [DebugInfo] More precise variable range for stack locations
Adrian Prantl via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri May 24 08:42:33 PDT 2019
aprantl added inline comments.
================
Comment at: lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp:610
- // Check if variable is described by a DBG_VALUE instruction.
- if (const MachineInstr *DVInsn = DV.getMInsn()) {
- assert(DVInsn->getNumOperands() == 4);
- if (DVInsn->getOperand(0).isReg()) {
- auto RegOp = DVInsn->getOperand(0);
- auto Op1 = DVInsn->getOperand(1);
- // If the second operand is an immediate, this is an indirect value.
- assert((!Op1.isImm() || (Op1.getImm() == 0)) && "unexpected offset");
- MachineLocation Location(RegOp.getReg(), Op1.isImm());
- addVariableAddress(DV, *VariableDie, Location);
- } else if (DVInsn->getOperand(0).isImm()) {
- // This variable is described by a single constant.
- // Check whether it has a DIExpression.
+ // CHeck if variable has single location description.
+ if (auto *DVal = DV.getValueLoc()) {
----------------
typo: `Check` and `has a single`
================
Comment at: lib/CodeGen/AsmPrinter/DwarfDebug.cpp:247
+// Get .debug_loc entry for the instruction range starting at MI.
+static DebugLocEntry::Value getDebugLocValue(const MachineInstr *MI) {
----------------
///
================
Comment at: lib/CodeGen/AsmPrinter/DwarfDebug.cpp:270
+
+/// Initialize from a DBG_VALUE instruction.
+void DbgVariable::initializeDbgValue(const MachineInstr *DbgValue) {
----------------
per coding style this comment should be on the decl inside the class not on the implementation
================
Comment at: lib/CodeGen/AsmPrinter/DwarfDebug.cpp:1177
/// strict monotonically increasing begin addresses and will never
-/// overlap.
+/// overlap. If built list has only one entry that is valid throughout
+/// variable's scope return true.
----------------
`If the resulting list`
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D61600/new/
https://reviews.llvm.org/D61600
More information about the llvm-commits
mailing list