mirror of
https://github.com/RPCSX/llvm.git
synced 2025-02-01 01:54:21 +00:00
pre-RA-sched: Cleanup register pressure tracking.
Removed the check that peeks past EXTRA_SUBREG, which I don't think makes sense any more. Intead treat it as a normal register def. No significant affect on x86 or ARM benchmarks. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@133917 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
e8431ba8cb
commit
4ef4c171db
@ -2029,13 +2029,9 @@ void RegReductionPQBase::UnscheduledNode(SUnit *SU) {
|
|||||||
unsigned POpc = PN->getMachineOpcode();
|
unsigned POpc = PN->getMachineOpcode();
|
||||||
if (POpc == TargetOpcode::IMPLICIT_DEF)
|
if (POpc == TargetOpcode::IMPLICIT_DEF)
|
||||||
continue;
|
continue;
|
||||||
if (POpc == TargetOpcode::EXTRACT_SUBREG) {
|
if (POpc == TargetOpcode::EXTRACT_SUBREG ||
|
||||||
EVT VT = PN->getOperand(0).getValueType();
|
POpc == TargetOpcode::INSERT_SUBREG ||
|
||||||
unsigned RCId = TLI->getRepRegClassFor(VT)->getID();
|
POpc == TargetOpcode::SUBREG_TO_REG) {
|
||||||
RegPressure[RCId] += TLI->getRepRegClassCostFor(VT);
|
|
||||||
continue;
|
|
||||||
} else if (POpc == TargetOpcode::INSERT_SUBREG ||
|
|
||||||
POpc == TargetOpcode::SUBREG_TO_REG) {
|
|
||||||
EVT VT = PN->getValueType(0);
|
EVT VT = PN->getValueType(0);
|
||||||
unsigned RCId = TLI->getRepRegClassFor(VT)->getID();
|
unsigned RCId = TLI->getRepRegClassFor(VT)->getID();
|
||||||
RegPressure[RCId] += TLI->getRepRegClassCostFor(VT);
|
RegPressure[RCId] += TLI->getRepRegClassCostFor(VT);
|
||||||
|
@ -520,15 +520,7 @@ void ScheduleDAGSDNodes::RegDefIter::Advance() {
|
|||||||
for (;DefIdx < NodeNumDefs; ++DefIdx) {
|
for (;DefIdx < NodeNumDefs; ++DefIdx) {
|
||||||
if (!Node->hasAnyUseOfValue(DefIdx))
|
if (!Node->hasAnyUseOfValue(DefIdx))
|
||||||
continue;
|
continue;
|
||||||
if (Node->isMachineOpcode() &&
|
ValueType = Node->getValueType(DefIdx);
|
||||||
Node->getMachineOpcode() == TargetOpcode::EXTRACT_SUBREG &&
|
|
||||||
Node->getOperand(0).getValueType() != MVT::untyped) {
|
|
||||||
// Propagate the incoming (full-register) type. I doubt it's needed.
|
|
||||||
ValueType = Node->getOperand(0).getValueType();
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
ValueType = Node->getValueType(DefIdx);
|
|
||||||
}
|
|
||||||
++DefIdx;
|
++DefIdx;
|
||||||
return; // Found a normal regdef.
|
return; // Found a normal regdef.
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user