[MachineLICM] Should we set RegLimit using RegisterClassInfo::getRegPressureSetLimit()?

Hi there,

In MachineLICM.cpp, RegLimit is set using TRI->getRegPressureSetLimit(MF, i) (around line 259) whose default implementation (from TableGen) is not adjusted for the reserved registers. However, it seems wrong to override it with reserved registers excluded because RegisterClassInfo::computePSetLimit() calls TRI->getRegPressureSetLimit() then subtracts number of reserved registers. If TRI->getRegPressureSetLimit() excludes reserved registers already, then RegisterClassInfo::computePSetLimit() would end up excludes them twice.

RegisterClassInfo::getRegPressureSetLimit() is adjusted for the reserved registers. Should MachineLICM use it to set RegLimit instead?

Thanks!
Qunyan