This is part of a series to get rid of the RegisterPressure class.
Details
Diff Detail
- Repository
- rL LLVM
Event Timeline
tl;dr LGTM
In general, it is important to separate result state from analysis state, which is why RegisterPressure and RegisterPressureTracker should have separate classes. Their lifetimes should not be tied together. The RegisterPressure interfaces were designed to support a variety of schedulers and expected to be used in various MI passes. However, this code has been around a while, and it still isn't used outside the one main scheduler driver, ScheduleDAGMILive. Since the current incarnation of the scheduler is stable now and does not need this modularity, I'd say that it is over-engineered. I'm fine consolidating things in the interest of readability.
So, just address the one possible correctness issue.
lib/CodeGen/RegisterPressure.cpp | ||
---|---|---|
573 ↗ | (On Diff #34581) | I think this should be LiveOutRegs.clear(), rather than preserving the old incorrect behavior. |
Sorry this was an accidental commit which I reverted now. The code review was of course not finished yet.