Skip to content

Commit eddedaa

Browse files
committed
RegisterPressureTracker: reword stale comments.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@237544 91177308-0d34-0410-b5e6-96231b3b80d8
1 parent 2bb2ea8 commit eddedaa

File tree

2 files changed

+13
-9
lines changed

2 files changed

+13
-9
lines changed

lib/CodeGen/MachineScheduler.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2611,8 +2611,7 @@ void GenericScheduler::tryCandidate(SchedCandidate &Cand,
26112611
TryCand, Cand, PhysRegCopy))
26122612
return;
26132613

2614-
// Avoid exceeding the target's limit. If signed PSetID is negative, it is
2615-
// invalid; convert it to INT_MAX to give it lowest priority.
2614+
// Avoid exceeding the target's limit.
26162615
if (DAG->isTrackingPressure() && tryPressure(TryCand.RPDelta.Excess,
26172616
Cand.RPDelta.Excess,
26182617
TryCand, Cand, RegExcess))

lib/CodeGen/RegisterPressure.cpp

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -750,9 +750,11 @@ void RegPressureTracker::bumpUpwardPressure(const MachineInstr *MI) {
750750
///
751751
/// This assumes that the current LiveOut set is sufficient.
752752
///
753-
/// FIXME: This is expensive for an on-the-fly query. We need to cache the
754-
/// result per-SUnit with enough information to adjust for the current
755-
/// scheduling position. But this works as a proof of concept.
753+
/// This is expensive for an on-the-fly query because it calls
754+
/// bumpUpwardPressure to recompute the pressure sets based on current
755+
/// liveness. This mainly exists to verify correctness, e.g. with
756+
/// -verify-misched. getUpwardPressureDelta is the fast version of this query
757+
/// that uses the per-SUnit cache of the PressureDiff.
756758
void RegPressureTracker::
757759
getMaxUpwardPressureDelta(const MachineInstr *MI, PressureDiff *PDiff,
758760
RegPressureDelta &Delta,
@@ -809,10 +811,8 @@ getMaxUpwardPressureDelta(const MachineInstr *MI, PressureDiff *PDiff,
809811
#endif
810812
}
811813

812-
/// This is a prototype of the fast version of querying register pressure that
813-
/// does not directly depend on current liveness. It's still slow because we
814-
/// recompute pressure change on-the-fly. This implementation only exists to
815-
/// prove correctness.
814+
/// This is the fast version of querying register pressure that does not
815+
/// directly depend on current liveness.
816816
///
817817
/// @param Delta captures information needed for heuristics.
818818
///
@@ -950,6 +950,11 @@ void RegPressureTracker::bumpDownwardPressure(const MachineInstr *MI) {
950950
/// register units of that pressure set introduced by this instruction.
951951
///
952952
/// This assumes that the current LiveIn set is sufficient.
953+
///
954+
/// This is expensive for an on-the-fly query because it calls
955+
/// bumpDownwardPressure to recompute the pressure sets based on current
956+
/// liveness. We don't yet have a fast version of downward pressure tracking
957+
/// analagous to getUpwardPressureDelta.
953958
void RegPressureTracker::
954959
getMaxDownwardPressureDelta(const MachineInstr *MI, RegPressureDelta &Delta,
955960
ArrayRef<PressureChange> CriticalPSets,

0 commit comments

Comments
 (0)