[PATCH] D70676: [DebugInfo] Don't repeatedly created undef DBG_VALUEs during machine-sinking

Adrian Prantl via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Dec 12 09:18:58 PST 2019


aprantl added inline comments.


================
Comment at: llvm/lib/CodeGen/MachineSink.cpp:140
+    struct SunkDebugDef {
+      SinkingVarSet InstsToSink; /// Set of DBG_VALUEs to recreate.
+      MachineInstr *MI;          /// Location to place DBG_VALUEs.
----------------
Either
```
 struct SunkDebugDef {
      /// Set of DBG_VALUEs to recreate.
      SinkingVarSet InstsToSink; 
    /// Location to place DBG_VALUEs.
      MachineInstr *MI;          
    };
```
or
```
 struct SunkDebugDef {
      SinkingVarSet InstsToSink; ///< Set of DBG_VALUEs to recreate.
      MachineInstr *MI;          ///< Location to place DBG_VALUEs.
    };
```


================
Comment at: llvm/lib/CodeGen/MachineSink.cpp:210
+    /// in this function.
+    void reinsertSunkDebugDefs(MachineFunction &MF);
+
----------------
I find the nomenclature very confusing.

In line 137 the comment makes it sound as if
```
%foo = some_insn
DBG_VALUE %foo, "x"
DBG_VALUE %foo, "y"
```
%foo is a DebugDef and the two DB_VALUEs are insts, but here it sounds more like the DBG_VALUEs are DebugDefs ... can this be unified?


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D70676/new/

https://reviews.llvm.org/D70676





More information about the llvm-commits mailing list