[PATCH] D69955: [DebugInfo] Add helper for finding entry value candidates [NFC]
Djordje Todorovic via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Nov 8 00:01:05 PST 2019
djtodoro added a comment.
Thanks! This looks good to me, with minor nits inlined.
================
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())
----------------
probinson wrote:
> 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.
Yes, If we are using lambdas, it is better to use an explicit capture instead of the default capture.
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