[PATCH] D106856: [LiveDebugValues] Cleanup Transfers when removing Entry Value Location
Nikola Tesic via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Jul 28 05:34:38 PDT 2021
ntesic added inline comments.
================
Comment at: llvm/lib/CodeGen/LiveDebugValues/VarLocBasedImpl.cpp:1258-1260
+ if (EntryVL.Var == EmittedEV.Var &&
+ EntryVL.Locs[0].Value.RegNo == EmittedEV.Locs[0].Value.RegNo &&
+ EntryVL.Expr == EmittedEV.Expr) {
----------------
jmorse wrote:
> Any reason to not use the VarLoc operator==?
Well, the EntryVL is of a "backup" kind, and EmittedEV isn't. So, the == operator doesn't see them as equal.
================
Comment at: llvm/lib/CodeGen/LiveDebugValues/VarLocBasedImpl.cpp:1443
LocIndices EntryValueIDs = VarLocIDs.insert(EntryLoc);
- Transfers.push_back({&MI, EntryValueIDs.back()});
+ EntryValTransfers.insert({&MI, EntryValueIDs.back()});
OpenRanges.insert(EntryValueIDs, EntryLoc);
----------------
jmorse wrote:
> Could I recommend `assert(EntryValueIDs.size() == 1 && "EntryValue loc should not be variadic");`.
>
> (Purely for communicating the assumptions this is based on to the reader)
Sure, I agree with that proposal.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D106856/new/
https://reviews.llvm.org/D106856
More information about the llvm-commits
mailing list