[PATCH] D59942: [DebugInfo] Track multiple registers in DbgEntityHistoryCalculator
Adrian Prantl via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Apr 2 16:36:36 PDT 2019
aprantl added inline comments.
================
Comment at: lib/CodeGen/AsmPrinter/DbgEntityHistoryCalculator.cpp:183
+ if (unsigned NewReg = isDescribedByReg(DV)) {
+ if (TrackedRegs.count(NewReg) == 0)
+ addRegDescribedVar(RegVars, NewReg, Var);
----------------
`if (!TrackedRegs.count(NewReg))`
================
Comment at: lib/CodeGen/AsmPrinter/DbgEntityHistoryCalculator.cpp:186
+ LiveEntries[Var].insert(NewIndex);
+ TrackedRegs[NewReg] = true;
}
----------------
for symmetry, perhaps write this as `TrackedRegs.insert({NewReg, true})`;
================
Comment at: lib/CodeGen/AsmPrinter/DbgEntityHistoryCalculator.cpp:190
+ // Drop tracking of registers that are no longer used.
+ for (auto I : TrackedRegs)
+ if (!I.second)
----------------
Is it safe to iterate over the map here, or can this introduce nondeterminism?
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D59942/new/
https://reviews.llvm.org/D59942
More information about the llvm-commits
mailing list