forked from OSchip/llvm-project
Mark most PPC register classes to avoid write-after-write.
For processors with the G5-like instruction-grouping scheme, this helps avoid early group termination due to a write-after-write dependency within the group. It should also help on pipelined embedded cores. On POWER7, over the test suite, this gives an average 0.5% speedup. The largest speedups are: SingleSource/Benchmarks/Stanford/Quicksort - 33% MultiSource/Applications/d/make_dparser - 21% MultiSource/Benchmarks/FreeBench/analyzer/analyzer - 12% MultiSource/Benchmarks/MiBench/telecomm-FFT/telecomm-fft - 12% Largest slowdowns: SingleSource/Benchmarks/Stanford/Bubblesort - 23% MultiSource/Benchmarks/Prolangs-C++/city/city - 21% MultiSource/Benchmarks/BitBench/uuencode/uuencode - 16% MultiSource/Benchmarks/mediabench/mpeg2/mpeg2dec/mpeg2decode - 13% llvm-svn: 158719
This commit is contained in:
parent
f98d813948
commit
d465810f7c
|
@ -199,6 +199,20 @@ PPCRegisterInfo::getRegPressureLimit(const TargetRegisterClass *RC,
|
|||
}
|
||||
}
|
||||
|
||||
bool
|
||||
PPCRegisterInfo::avoidWriteAfterWrite(const TargetRegisterClass *RC) const {
|
||||
switch (RC->getID()) {
|
||||
case PPC::G8RCRegClassID:
|
||||
case PPC::GPRCRegClassID:
|
||||
case PPC::F8RCRegClassID:
|
||||
case PPC::F4RCRegClassID:
|
||||
case PPC::VRRCRegClassID:
|
||||
return true;
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
//===----------------------------------------------------------------------===//
|
||||
// Stack Frame Processing methods
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
|
|
@ -47,6 +47,8 @@ public:
|
|||
|
||||
BitVector getReservedRegs(const MachineFunction &MF) const;
|
||||
|
||||
virtual bool avoidWriteAfterWrite(const TargetRegisterClass *RC) const;
|
||||
|
||||
/// requiresRegisterScavenging - We require a register scavenger.
|
||||
/// FIXME (64-bit): Should be inlined.
|
||||
bool requiresRegisterScavenging(const MachineFunction &MF) const;
|
||||
|
|
Loading…
Reference in New Issue