[PATCH] D111799: [DebugInfo][InstrRef] Improve compile-time performance by handling a single variable at a time
Orlando Cazalet-Hyams via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Oct 15 08:41:30 PDT 2021
Orlando accepted this revision.
Orlando added a comment.
This revision is now accepted and ready to land.
LGTM!
================
Comment at: llvm/lib/CodeGen/LiveDebugValues/InstrRefBasedImpl.cpp:2044
return None;
-
- auto It = LiveOutMap->second->find(Var);
- if (It == LiveOutMap->second->end())
- // There's no value recorded for this variable in this predecessor,
- // leave an empty set of locations.
- return None;
-
- const DbgValue &OutVal = It->second;
+ DbgValue &OutVal = *OutValIt->second;
----------------
Can this no longer be const?
================
Comment at: llvm/lib/CodeGen/LiveDebugValues/InstrRefBasedImpl.cpp:2183
+ // here, or b) we eliminated the PHI that was here. If so, we can just
+ // propagate in the first parents incoming value.
+ if (LiveIn.Kind != DbgValue::VPHI || LiveIn.BlockNo != MBB.getNumber()) {
----------------
nit: `parents` -> `parent's`, while you're nearby.
================
Comment at: llvm/lib/CodeGen/LiveDebugValues/InstrRefBasedImpl.cpp:2441
+
+ // If this blocks live-in value is a VPHI, try to pick a machine-value
+ // for it. This makes the machine-value available and propagated
----------------
nit: blocks -> block's
================
Comment at: llvm/lib/CodeGen/LiveDebugValues/InstrRefBasedImpl.h:649-650
/// Live in/out structure for the variable values: a per-block map of
/// variables to their values. XXX, better name?
+ using LiveIdxT = DenseMap<const MachineBasicBlock *, DbgValue *>;
----------------
The part of the comment after the colon seems redundant now?
================
Comment at: llvm/lib/CodeGen/LiveDebugValues/InstrRefBasedImpl.h:874
/// or PHI elimination.
bool vlocJoin(MachineBasicBlock &MBB, LiveIdxT &VLOCOutLocs,
SmallPtrSet<const MachineBasicBlock *, 8> &InScopeBlocks,
----------------
Doc-comment is out of date.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D111799/new/
https://reviews.llvm.org/D111799
More information about the llvm-commits
mailing list