[PATCH] D69955: [DebugInfo] Add helper for finding entry value candidates [NFC]

Paul Robinson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Nov 7 11:25:29 PST 2019


probinson added a comment.

Please remember to provide full-context diffs.



================
Comment at: llvm/lib/CodeGen/LiveDebugValues.cpp:1304
   // unmodified throughout the function and located in a register.
-  // TODO: Add support for parameters that are described as fragments.
-  // TODO: Add support for modified arguments that can be expressed
-  // by using its entry value.
-  // TODO: Add support for local variables that are expressed in terms of
-  // parameters entry values.
+  auto IsEntryValueCandidate = [&](const MachineInstr &MI) {
+    if (!MI.isDebugValue())
----------------
Not clear why a lambda is better than a static function. The [&] captures way more than you need, for one thing.  The only values it uses are MI (already passed as a parameter) and DebugEntryVals.


Repository:
  rL LLVM

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

https://reviews.llvm.org/D69955





More information about the llvm-commits mailing list