[PATCH] D58042: [LiveDebugValues] Emit parameter's entry value

Adrian Prantl via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Apr 24 13:14:51 PDT 2019


aprantl added inline comments.


================
Comment at: lib/CodeGen/LiveDebugValues.cpp:213
+        return Var < Other.Var;
+      if (Other.Kind == Kind)
         return Loc.Hash < Other.Loc.Hash;
----------------
Now we're mixing both styles ;-)

```
if (Var != Other.Var)
  return Var < Other.Var;
if (Other.Kind != Kind)
  return Other.Kind < Kind;
return Loc.Hash < Other.Loc.Hash;
```


================
Comment at: lib/CodeGen/LiveDebugValues.cpp:457
+
+    const MachineInstr *CurrDMI = &VarLocIDs[ID].MI;
+    auto DMI = std::find_if(ParamEntryVals.begin(), ParamEntryVals.end(),
----------------
I'm having trouble making sense of `DMI` (debug machine instruction?) is there a better name?


================
Comment at: lib/CodeGen/LiveDebugValues.cpp:956
+        !MI.getDebugLoc()->getInlinedAt() && MI.getOperand(0).isReg() &&
+        MI.getOperand(0).getReg() && MI.getOperand(0).getReg() != SP) {
+      if (IsNewParameter(MI) && MI.getOperand(0).isReg())
----------------
Could this be a helper variable or function with a descriptive name that explains what this condition checks for?


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

https://reviews.llvm.org/D58042





More information about the llvm-commits mailing list